Reading SINUMERIK 840D sl Drive Current to R-Parameter

David Krause22 min read
Motion ControlSiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Reading SINUMERIK 840D sl Actual Current and Speed to R-Parameters

Extracting live drive quantities (smoothed current, torque, actual speed) from a SINUMERIK 840D sl + SINAMICS S120 system into an NC R-parameter (or directly into the PLC) is a recurring requirement for adaptive machining, capture/replay, peak-load monitoring, and tool-protection routines. The naive approach of reading machine data MD1706 (ACTUAL_CURRENT) or MD1707 (ACTUAL_SPEED) as standard NC variables in part programs does not return a real-time drive value; those MDs are HMI-service variables. The correct path is the PROFINET telegram, the NC-Var-Selector mapping, and a PLC DB that you read through a Siemens macro / standard FB. This article walks through every working method, the unit conversions that always trip up the unwary, and a complete commissioning sequence for an S120 axis on a SINUMERIK 840D sl NCU.

Scope. This reference covers the SINUMERIK 840D sl (NCU 710.3 / 720.3 / 730.3) with SINAMICS S120 drives, PROFINET IO, and an integrated SIMATIC S7-300/400/1500 PLC (or ET200SP F-CPU). It assumes a current firmware line: SINUMERIK Operate 4.7 SP2 / 4.8 / 5.x with SINAMICS V4.7 / V4.8 / V5.1. Behavior is consistent for the older SW 2.6/2.7 line with minor deviations called out below.

1. Drive Data Path Inside the 840D sl NCU

The 840D sl NCU is the host for both the NC kernel and the SINAMICS drive objects. The physical data path is:

  1. The SINAMICS S120 CU320-2 / CU310-2 control unit samples currents, voltages, and encoder feedback at the cycle time defined by p0115[0] (current controller cycle, typically 125 µs).
  2. The drive objects publish the cyclically relevant values to the controller across the PROFINET IRT link using the configured standard telegram (typically telegram 105, 106, 116, 118, 125, 126, 136, 139, or 166).
  3. The NCK samples the configured PZDs from the IRT bus at the position controller cycle (MD10050 SYSCLOCK_CYCLE_TIME, typically 2 ms or 4 ms) and makes them available in the channel and axis interface.
  4. The PLC samples the same PZDs through the standard telegram image in the I/O area of the integrated S7 (the I/O addresses are auto-generated by the Telegram-Configuration tool in TIA Portal / STEP 7).

Two important consequences flow from this architecture:

  • The cycle time matters. An R-parameter updated by the NC part program at IPO cycle (~1-2 ms) is up-to-date. An R-parameter updated from the PLC at the OB1 cycle (~10 ms) is 5-10x slower and not suitable for peak-current latching.
  • The unit is not always base units. The PZD "current" payload in the drive telegram is the smoothed torque-producing current in the unit system of the drive (typically % of rated motor current). The NC exposes it in the unit system configured in MD10220 and following. A unit conversion is mandatory when writing back to an R-parameter if the R-parameter is to be displayed in A or in %.

2. PROFINET Telegram 139 (PZD 15/19) Layout

Telegram 139 is the most flexible of the SINUMERIK telegrams and the one Siemens configures by default for axes with extended drive-side diagnostics. Its 15/19 PZD layout is:

PZD Direction Signal Width Source / Sink
1 NCK → drive STW1 (control word 1) 16 bit NC axis DB3x.DBX...
2 NCK → drive STW2 (control word 2) 16 bit NC axis DB3x.DBX...
3 NCK → drive NSOLL_B (position setpoint) 32 bit MD32...
4 NCK → drive Position setpoint HI 32 bit setpoint
5 NCK → drive Override 16 bit channel
6 NCK → drive Reserved 16 bit —
7 NCK → drive Md additional setpoint 32 bit axis
8 NCK → drive Mode selection 16 bit MD...
9 drive → NCK ZSW1 (status word 1) 16 bit NC axis DB3x.DBX...
10 drive → NCK ZSW2 (status word 2) 16 bit NC axis DB3x.DBX...
11 drive → NCK Actual position value 1 (XIST_A) 32 bit position controller
12 drive → NCK Actual position value 2 (XIST_B) 32 bit encoder 2
13 drive → NCK Actual current (Iq smoothed, % of rated) 16 bit drive object r0078[1]
14 drive → NCK Actual torque (M_act, % of rated) 16 bit drive object r0080
15 drive → NCK Actual speed (N_act, rpm) 16 bit drive object r0063
16 drive → NCK Reserved 16 bit —
17 drive → NCK Status word 3 / faults 16 bit ZSW3
18 drive → NCK Active warning 16 bit drive object r2132
19 drive → NCK Active fault 16 bit drive object r2131

The signals that map to the user's question are PZD 13 (Iq), PZD 14 (M), and PZD 15 (n). They are scaled to the drive-side reference: 100% = rated motor current / rated motor torque / reference speed. To express them in SI units, the conversion must use the SINAMICS parameters p0304 (rated current), p0305 (rated power), p0311 (rated speed), and p0334 (rated torque).

Other useful telegrams. Telegram 105 is the most compact (PZD 6/10) and is what 840D sl axes are wired with by default. Telegram 125 (PZD 6/12) is used on linear motors. Telegram 136 (PZD 7/13) is the precision variant for spindles with second encoder. The mapping logic below works for any of these as long as you adjust the PZD index.

3. MD 1706 (ACTUAL_CURRENT) and MD 1707 (ACTUAL_SPEED) - Scope and Limits

The machine data in question is part of the HMI/communication layer of the NC, not the drive data path:

  • MD17060 $NC_ACTUAL_CURRENT - exposes the current of the spindle or the axis. In modern NCU versions (SW 4.5+) it is implemented as an HMI service variable read via the STF-ES interface (NC services to the HMI). It is intended for screen refresh, not for program use.
  • MD17070 $NC_ACTUAL_SPEED - same, for speed.

Reading them in a synchronous action or an NC part program is technically possible (using the NC system variable selector with HMI access rights) but the value is sampled at HMI refresh rate, which is typically 100 ms-1 s. That is far too coarse for any closed-loop adaptive application and several orders of magnitude slower than what the NCK position controller needs.

Bottom line. Treat MD1706/1707 as display values. For control, monitoring, or capture use one of the four methods in section 6.

4. R-Parameters, GUD, and LUD - What's Available

When the question says "transfer to an R-parameter", the intent is to have a named, addressable real number in the NC part-program context. The valid targets are:

Target Scope Persists across resets Visible to HMI Addressable in PLC
R-parameter (R0..R99, R100+ extended) global NC depends on $MC_MM_NUM_CC_PARAM (default 0 → no persistence) yes (R variables in HMI form) yes via FB2/FB7 or NC-VAR
GUD (Global User Data) global NC, named yes (via NCK restart) yes yes via NC-VAR
LUD (Local User Data) part program no limited limited
Setting data $SC/$SN/$SS global NC yes yes yes via NC-VAR
Axis interface DB (e.g. DB32..DB61) PLC axis image cycle via NC-VAR direct (DB access)

For periodic drive value capture, the R-parameter is the most common target because:

  • It is accessible from any NC program and any synchronized action without configuration overhead.
  • It can be latched by the PLC using the standard FB2 ("NCK read") with access type "VAR", area "R", block "R", column index "N" and a line index of the parameter number.
  • It can be displayed in the HMI's Parameters operating area without additional configuration if the proper MDs are set.

5. Why "read drive data into R" is not free

R parameters, GUD, and LUD are number containers. They do not carry unit information. When you assign a raw PZD value (e.g. 0x4000 = 16384) to R100, you are storing a binary fraction of 0.0-1.0 in the unit that the drive-side telegram scaling uses (typically % of rated). To display "A" you must multiply by the rated current. To display "Nm" you must multiply by the rated torque. To display "rpm" for a speed PZD you do not have to convert at all, because telegram 139 PZD15 is already in rpm.

Synchronization. The R-parameter you read in the part program is sampled at IPO cycle. The actual speed of the drive is a moving average over the speed-controller cycle and the smoothing time p0045. If the comparison or decision logic is fast, expect a 1-2 cycle lag. Add hysteresis in the application.

6. Reading Drive Values into R-Parameters - The Four Real Methods

6.1 Method 1 - Synchronized action reading the axis variable

The cleanest method: declare a synchronized action on the axis that latches the actual current into an R-parameter every IPO cycle. This is the method Siemens explicitly recommends for high-frequency capture inside the NC.

Step 1 - Identify the system variable. For an axis (drive object SERVO), the system variable holding the smoothed current is $AA_IM[x] (drive actual current, x = axis name). The actual speed is $AA_VACTM[x] (axis actual velocity, measured). The torque is $AA_LOAD[x] (drive load in %).

Step 2 - Declare the synchronized action in the part program or in a separate modal file:

; Declare modal synchronized action ID 1: latch actual current
; and speed of axis X every IPO cycle into R100/R101
IDS=1 WHENEVER TRUE DO $R100 = $AA_IM[X] $R101 = $AA_VACTM[X] DO $R102 = $AA_LOAD[X]

Step 3 - Start the synchronized action (in the part program or in a PSB file):

; Start synchronized action ID 1
IDS=1
G4 F0.1   ; allow 100 ms of latching
; ... machining ...
CANCEL(1) ; stop latch

Step 4 - Verify in HMI: Open Parameters operating area, R-variable tab, scroll to R100/101/102. With the axis moving you should see updates at 1-4 ms.

This method has zero PLC load, runs at IPO cycle, and survives part program restarts. The only catch is the $AA_IM unit: the unit is the NC-side unit system. MD10220 PROG_UNIT_OF_MEASUR_SYSTEM and the MD10240 SCALING_SYSTEM metrology determine whether the value is in A or %.

6.2 Method 2 - Siemens Macro FB2 (PLC reads R-parameter)

FB2 ("read from NC") and FB7 ("write to NC") are the legacy/standard Siemens NC-VAR access blocks. If the value is already in an R-parameter (e.g. through Method 1 or because it is set in the part program), the PLC can pull it with FB2.

The standard Siemens macro NCK_R_PARAM_READ ships in the SINUMERIK Toolbox CD and is the macro referenced in older PLC programs.

Function block interface (FB2):

VAR
   Req   : BOOL;   ; start read with rising edge
   NumVar: INT;    ; R-parameter number 0..99, 100..199 (extended)
   Value : REAL;   ; output value (REAL)
   Error : BOOL;
   Status: WORD;   ; 0 = OK, F0xx = error
END_VAR

Call example in the PLC program (SCL):

// Read R100 from NC, store in DB100.DBD0 (REAL)
"NCK_R_PARAM_READ"(Req := TRUE, NumVar := 100, Value => DB100.DBD0, Error => DB100.DBX4.0, Status => DB100.DBW6);

The FB2 call eventually resolves to an NC-VAR selector entry:

  • Module: NCK
  • Area: NCVAR (or "R")
  • Block: R
  • Line index: NumVar
  • Column index: 1

The PLC scan time of 10-20 ms is the bottleneck for any peak-latching logic. Use the synchronized action (Method 1) to find the peak in the NC, and the FB2 to ship the peak value to the PLC for display.

6.3 Method 3 - NC VAR Selector + PLC DB (Direct Drive Telegram Access)

This is the canonical way Siemens documentation describes for cases where you want the raw drive telegram PZD in a PLC DB. The NC-VAR selector generates a DB whose data block contains a structured access list. The PLC cyclic task reads the access list and pulls drive values directly from the PZD image of telegram 139.

Step 1 - Configure PROFINET telegram. In TIA Portal / STEP 7, with the SINAMICS S120 PROFINET device on the topology editor, open Device View → Drive object → Telegram Configuration and assign telegram 139 to the axis. Compile and download the HW config.

Step 2 - Open the NC-VAR Selector tool. The tool ships in the SINUMERIK toolbox and as part of SINUMERIK Operate. The path on Operate is Start-up → NCK → NC Var Selector (the executable is NCVarSelector.exe). Create a new selection file with extension .nvs.

Step 3 - Add the variables of interest. In the variable tree navigate to AXIS or to YFA / A and pick the system variables for the actual current and speed. The selector generates a data block on the NC side and an access list in a binary file you import into STEP 7.

Step 4 - Import the access list into STEP 7. In SIMATIC Manager, install the SINUMERIK toolbar, then NC → Import. A DB (default DB120) is created that contains a header (transfer area length, data record number) and the variable values. The PLC scans this DB and reads the values directly from the drive's PZD image.

Step 5 - Use the values in PLC logic. The DB layout is:

DB120 - NC-VAR Access (read)
  DBB0   =  access request (header byte)
  DBB1   =  number of variables in this access
  DBB2.. =  variable references (each 6 bytes)
  DBBn+  =  return values (REAL for current, REAL for speed)

Example, real offset 24 onwards: REAL Iq_smoothed_x
                real offset 28 onwards: REAL n_act_x

For the specific case of telegram 139 PZD 13 (current) on axis X, the NC-VAR selector entry resolves to axis drive variable r0078[1]. The unit returned is % of rated motor current. The PLC must multiply by p0304 to get amperes.

6.4 Method 4 - PLC FB reading directly from the PZD I/O area

For maximum speed, skip the NC-VAR selector and access the I/O image directly. TIA Portal's HW config places the I/O addresses for the SINAMICS device in the standard I/O area. Telegram 139's PZD 13 is the 13th word of the input image of the PROFINET device.

Step 1 - Note the I/O address range. After the HW config is compiled, the input address range of the SINAMICS drive is given. Example: input words 256..274 for a single telegram 139 axis (15 words output, 19 words input → I/Q area 256..274 / 256..270).

Step 2 - Read PZD 13 (current) directly in SCL:

// Direct PZD access for SINAMICS telegram 139, axis X
// PZD 13 = current, PZD 14 = torque, PZD 15 = speed
// PZD offset for the second axis (DO index 1) = base + 19 words

// Assuming axis X is the first axis in the PROFINET config,
// base I-address = 256

// Word = 16 bit, drive-side scaling: 16384 = 100% (0x4000)

lAxisXCurrentRaw := INT_TO_REAL(WORD_TO_INT(%IW264));    // 256 + 8 = PZD 13
lAxisXSpeedRaw   := INT_TO_REAL(WORD_TO_INT(%IW266));    // PZD 15

// Convert to % (drive-side scaling)
lAxisXCurrentPct := lAxisXCurrentRaw / 16384.0 * 100.0;
lAxisXSpeedRpm   := lAxisXSpeedRaw;   // PZD 15 is already rpm

// Convert to A: multiply by p0304 (rated motor current)
lAxisXCurrentA   := lAxisXCurrentPct / 100.0 * DB_DriveParams.RatedCurrentX;

This method bypasses the NC entirely and runs in OB1 (or OB35 if you need a faster cycle). It is the most responsive for PLC-side monitoring and requires no NC-VAR selector work.

7. Unit Conversion (Current, Torque, Speed)

The drive side uses reference variables. Always confirm by reading them from the drive's online view in STARTER or Startdrive:

Quantity Drive parameter Telegram scale Conversion to SI
Smoothed Iq (active current) r0078[1] 0x4000 = 100% of p0304 (rated motor current) A = raw / 16384 × p0304
Smoothed torque r0080 0x4000 = 100% of p0334 (rated torque) Nm = raw / 16384 × p0334
Actual speed r0063 1 LSB = 1 rpm (telegram 105/106/139 PZD 15) rpm = raw (already SI)
Actual speed (PZD 5 on telegram 105) r0063 1 LSB = 0.001 rpm, range ±32768 rpm = raw / 1000
Drive load % r0084 0x4000 = 100% % = raw / 16384 × 100
Telegram 105 vs 139 difference. Telegram 105 (compact, 6/10 PZD) has the actual speed on PZD 5 with 0.001 rpm scaling; telegram 139 (extended, 15/19 PZD) has it on PZD 15 with 1 rpm scaling. Read the exact telegram layout from the device's GSDXML before committing to a scaling factor.

8. Step-by-Step Configuration (Telegram + Synchronized Action + PLC DB)

The following end-to-end configuration implements a live actual current + actual speed capture into R-parameter and PLC DB for axis X on a SINUMERIK 840D sl + SINAMICS S120, telegram 139, NCU 720.3 PN.

8.1 Prerequisites

  • SINUMERIK Operate 4.8 SP3 or later, with NCK SW 4.8 SP3.
  • SINAMICS S120 with STARTER / Startdrive V15.1 or later, firmware V4.8 or V5.1.
  • TIA Portal V15.1 or STEP 7 V5.6 with SINUMERIK add-on toolset installed.
  • Active commissioning archive of the machine (so the axis is on a configured telegram).
  • Operator access to Start-up operating area, with password for manufacturer level (Siemens 0-3).

8.2 Configure PROFINET telegram 139 in the axis DO

  1. Open STARTER / Startdrive and load the drive commissioning archive.
  2. For the axis DO (typically SERVO_2 or SERVO_3), open Configuration → Telegram Configuration.
  3. Click Add telegram, select 139, click Transfer to drive. The standard telegram for the NC must be 105 or 139; the drive must match the NC. Mismatch between the drive's HW Config telegram and the NC's MD13060 $MN_DRIVE_TELEGRAM_TYPE results in alarm 26017 "Axis %1 drive %2 configuration error".
  4. Download to the drive and perform a power-up reset of the drive DO.

8.3 Confirm the telegram in the NC

  1. On the HMI, Start-up → NCK → MD and set MD13060[AX5] to 139 (matching the axis index that maps to this drive).
  2. Set MD13070[AX5] $MN_FM_TELEGRAM_TYPE to 0 (no feed-forward) unless you need the FM telegram.
  3. NCK reset (PI service _N_KS_RST). The configuration is read on the next NCK ramp-up.

8.4 Create the synchronized action in the NC

Edit the machine manufacturer's initialization file _N_CMA_DIR/_N_USER_MPF or, for testing, write a small part program:

; Program header
DEF INT iSnapCount = 0

; Declare modal synchronized action
IDS=10 WHENEVER TRUE DO $R100 = $AA_IM[X] DO $R101 = $AA_VACTM[X] DO $R102 = $AA_LOAD[X]

; Optional: latch peak current with $AA_IM[...] and direct comparison
IDS=11 WHENEVER $AA_IM[X] > 0.8 * 80.0 DO $R105 = $AA_IM[X] $R106 = $AA_VACTM[X]

; Start
IDS=10
G4 F2
CANCEL(10)

; Print to HMI / log
R100 = R100  ; keep value for FB2 read

This is the most-tested mechanism and matches Siemens reference applications like the tool-monitoring cycle CUST_TOOLMONITOR provided with Operate.

8.5 PLC FB2 macro for shipping the R-parameter to the PLC

In the PLC, instance the standard macro or build a call to FB2:

// FB2 = "PUT" / "GET" in older naming; FB2 = "Read variable from NCK"
// NW 0 = header, NW 1 = variable reference, NW 2+ = result

// Build a one-line call in SCL
IF bRequest_R100 THEN
   "FB_NCK_Read"(REQ := bRequest_R100,
                 DB_NO := 100,
                 OFFSET := 100,     // R-parameter 100
                 READ := TRUE,
                 ERR => bErr,
                 STATE => wState,
                 VALUE := lValueR100);
   lValueR100_REAL := LREAL_TO_REAL(DWORD_TO_LREAL(lValueR100));
   bRequest_R100 := FALSE;
END_IF;

The macro "FB_NCK_Read" is the modern name for the standard NC-VAR access FB shipped with the SINUMERIK Toolbox. Older code uses "FB2" with a different interface. Refer to the function manual Function Manual Basic Functions, PLC for SINUMERIK 840D sl for the exact version installed on the machine.

8.6 Verification at the HMI

  1. Open Parameters operating area, scroll to R100/101/102.
  2. Jog axis X at a constant feed.
  3. Confirm R100 (current) and R101 (speed) update with no alarm 26017, 26025, 25202 (axis-telegram mismatch), or 20143 (NCK-I/O write error).
  4. From the PLC side, in TIA Portal Watch table, open DB100 and confirm DBD0 changes at OB1 cycle.

9. Alarms, Fault Codes, and Their Meaning

Alarm Meaning Cause Remedy
20143 NCK: error in PLC I/O access Wrong area/index, wrong access type Verify the NC-VAR selector; check $MN_USER_DATA_R_PARAM (default 0) and $MN_NUM_CC_PARAM
26017 Axis %1 drive %2 config error NC telegram MD does not match drive telegram Set MD13060 / MD13070 to the actual telegrams of the drive
26025 Axis %1 drive %2: not ready for cyclic op Drive firmware older than NC expects, or telegram type mismatch Upgrade drive firmware to match NC; reset drive
25202 Axis %1 wait for drive Drive has not yet ramped up Wait for drive ON; check CUD enable pulses
300901 (drive) SINAMICS telegram failure Wrong PZD word count in HW config Recheck HW config: telegram 139 = 15/19 PZD
20118 (PLC) PI service rejected NCK in a state that does not accept PI services Wait for NCK ready; do not call FB2 during ramp-up
20119 (PLC) PI service not available Variable selector not loaded, or wrong access rights Confirm the .nvs file is loaded; check PLC access rights in MD20xxx

10. Troubleshooting Matrix

Symptom Likely root cause Fix
R100 always zero Synchronized action never started Confirm IDS=N before G4. Use HMI Diagnosis → Sync Act to see status
R100 jumps wildly Unit mismatch (% vs A) Check MD10220 / MD10240; convert using p0304
PLC reads wrong R-number FB2 block index off by one FB2 indexes R-parameters from 1; R100 = index 100
Current value stuck at 100% Drive in torque limit; current controller saturating Inspect r0067 / r0068 for the limit source; consider r1538 / r1539 torque limits
Alarm 26017 at NCK start-up MD13060 telegram does not match drive telegram Make both 139 (or both 105) for axis X
Speed value half the expected Measuring-system MD set to 1:1 but motor is a 2-pole with gearbox 1:2 Apply gearbox ratio in r0063 conversion: r0063 / gear_ratio
Peak current latch never triggers Synchronized action condition uses raw %, not motor current Compare against 0.8 × p0304 instead of 80.0
PLC scan too slow to catch peak OB1 cycle 20 ms cannot latch 1 ms peak Move peak detection to synchronized action, ship only the result
$AA_IM returns 0.0 always Drive object type wrong (SERVO vs VECTOR) or axis is not assigned Check MD30220[AX] $MA_ASSIGNM_TO_AX, MD30130 CTRLOUT_TYPE

11. Safety, Watchdog, and HMI Considerations

Do not feed the captured current directly back into a control loop without:

  • Validating the unit conversion once at commissioning with a reference load test (use a torque wrench on a known flywheel).
  • Confirming the watchdog time of the synchronized action: by default, missing conditions latch the last value indefinitely. Use DOF $R100 = 0.0 in the synchronized action to clear on the falling edge of the condition.
  • Confirming PLC access right MDs: MD28100 $MN_MM_NUM_R_PARAM and the access rights for the operator password are set. Otherwise the operator can change the value through the HMI form.
  • Limiting the FB2 call frequency: every PLC call to FB2 reserves bandwidth on the NCK services bus. If the PLC is calling FB2 once per OB1 (10 ms) for 30 variables, the bus can saturate. Group variables into a single access list and call once per OB35.
Safety integrations. Do not use the captured current in a Safety Integrated (SI) or F-PLC decision path. SINAMICS safety functions (STO, SS1, SS2, SLS, SOS) take priority and must be wired through Safety Integrated SINAMICS or PROFIsafe. Use the captured value only for non-safety visualization or process monitoring.

12. Glossary

  • NCK - Numerical Control Kernel, the program that runs the part-program interpreter and the position controller inside the NCU.
  • PZD - Prozessdaten, the cyclic process data area of a PROFIdrive / PROFINET telegram.
  • STW/ZSW - Steuerwort / Zustandswort, the drive control/status word.
  • SINAMICS r0078 - smoothed torque-producing current actual value.
  • SINAMICS r0063 - speed actual value (rotational), smoothed.
  • $AA_IM[x] - axis-actual current system variable in NC part-program context.
  • $AA_VACTM[x] - axis-actual velocity (measured, encoder-2 if available).

Can I read MD1706 / MD1707 directly in a part program?

Not in the way you would expect. MD1706 (ACTUAL_CURRENT) and MD1707 (ACTUAL_SPEED) are HMI service variables served via the STF-ES interface, not real-time drive values. They are valid for screen refresh at 100 ms-1 s but are far too slow and not consistent with the drive PZD cycle. Use $AA_IM[x] and $AA_VACTM[x] in a synchronized action, or read the drive PZD directly in a PLC FB.

What is the difference between telegram 105 and telegram 139?

Telegram 105 is the compact 6/10 PZD telegram used by default for axes. It carries the minimum signals (control word, setpoint position, status word, actual position, actual speed at 0.001 rpm scaling, current 0x4000 = 100%). Telegram 139 is the extended 15/19 PZD telegram with second-encoder actual position, smoothed current and torque, status word 3, active warning and active fault. Use 139 when you need the extended diagnostics; use 105 when bus bandwidth is constrained.

Why is the R-parameter value in % and not in A?

Because the drive telegram PZD current is in the unit system of the drive, and 100% of that is the rated motor current (p0304). R parameters, GUD, and LUD are unitless containers. The convention in NC programs is to keep them in the unit system configured by MD10220 / MD10240. To display A, multiply by p0304 / 100 in the synchronized action or in the PLC FB.

Can I do this without synchronized actions?

Yes. Use a PLC FB that reads the PZD I/O area directly (Method 4) or use the NC-VAR selector to read the drive variable into a PLC DB (Method 3). The cost is PLC scan rate. The benefit is that the PLC code is self-contained and does not depend on the part program being started.

What is the Siemens Macro FB2 referenced in older code?

FB2 ("read variable from NCK") and FB7 ("write variable to NCK") are the standard NC-VAR access function blocks shipped in the SINUMERIK Toolbox. The "Siemens macro" refers to the example FB_NCK_Read shipped in the toolbox project templates; it is a thin wrapper around FB2 / FB7 with the correct header and area parameters preset for R-parameter access. On current machines use the FB2 with the correct PI service (_N_VAR_ACCESS) directly.

How often can I read R-parameters from the PLC?

Every call to FB2 / FB7 reserves bandwidth on the NCK services bus. The guideline is no more than 30-50 variables per OB1 cycle on an NCU 7x0, and prefer a single access list of 20-30 variables once per OB35 (100 ms). Excessive PLC-driven NCK reads cause alarm 20118 "PI service rejected" or simply slow down the part-program interpreter.

Does this work on SINUMERIK ONE / 828D / Power Line?

Yes. The same PROFINET telegrams are available on the SINUMERIK ONE (NCU 1740 / 1750). The Power Line (FM-NC / 810D) uses PROFIBUS telegrams 3 / 4 and the same r0078 / r0063 source variables, but the MD indices differ and the synchronized action system variable is $AA_IM. On the 828D the telegram is the same PROFINET layout as the 840D sl.

Back to blog