1. Problem Overview
A SIMOCODE-DP motor protection and control unit connected to a SIMATIC S7-315 CPU over PROFIBUS-DP fails to return data record 131 (display / diagnosis) when accessed through the system function block SFC 59 RD_REC. The call completes with status code 7001 on the first execution (BUSY = 1) and then returns error code 80A2 in RET_VAL, indicating a DP layer 2 protocol error. Standard control word / status word telegrams (start, stop, reset) continue to function through the cyclic I/O exchange, but acyclic parameter access remains unreachable. The same SFC pattern is commonly used to read SIMOCODE statistics such as operating hours, number of starts, last trip current, I-max, and the analog sensor value, and to write data record 133 (statistical data). The fault must be cleared before any of these non-cyclic values can be displayed on a TP 170A / TP 177A panel.
SIEM8031.GSF. The CPU is an S7-315 with integrated DP master port. Equivalents on S7-300/400 with CP 342-5 / CP 443-5 follow the same logic but require the external DP master address.2. SIMOCODE-DP Data Record Architecture
SIMOCODE-DP exposes process and diagnostic data through two key acyclic records on top of the cyclic I/O frame. Both records are read with RD_REC (SFC 59). Record 131 is read-only and contains the display / diagnosis dataset. Record 133 is read/write and contains statistical data that can be reset by the PLC.
2.1 Data Record 131 - Display / Diagnosis (Read-Only)
| Byte.Bit | Parameter | Data Type | Value Range | Units |
|---|---|---|---|---|
| 0.0 | Operating Hours | Byte[2] | 0 - 65535 | 10 h |
| 2.0 | Number of Starts | Byte[3] | 0 - 16777216 | count |
| 5.0 | Counter Value 1 | Byte[2] | 0 - 65535 | count |
| 7.0 | Counter Value 2 | Byte[2] | 0 - 65535 | count |
| 9.0 | Cooling Time | Byte[2] | 0 - 35999 | 100 ms |
| 11.0 | Number of Overload Trips | Byte[2] | 0 - 65535 | count |
| 13.0 | I-max | Byte[2] | 0 - 65535 | % Is |
| 15.0 | Last Trip Current | Byte[2] | 0 - 65535 | % Is |
| 17.0 | Analog Sensor Value | Byte | 0 - 255 | 20 Ohm |
The full record length is 18 bytes. All multi-byte values are stored in big-endian order (Motorola format). The I-max and Last Trip Current values are expressed as a percentage of the set current Is and must be scaled by 0.01 % in the HMI tag.
2.2 Data Record 133 - Statistical Data (Read / Write)
| Byte.Bit | Parameter | Data Type | Value Range |
|---|---|---|---|
| 0.0 | Operating Hours | Byte[2] | 0 - 65535 |
| 2.0 | Number of Starts | Byte[3] | 0 - 16777216 |
| 5.0 | Number of Overload Trips | Byte[2] | 0 - 65535 |
Writing to record 133 is the supported path to reset statistical counters from the PLC (for example after a motor rebuild). Use SFC 58 WR_REC with the same IOID and LADDR as the read call.
3. SFC 59 RD_REC Interface Specification
SFC 59 RD_REC reads a data record from a DP slave using the acyclic DPV1 services of PROFIBUS-DP. The parameter assignment must match the actual slot and logical address configured in STEP 7 hardware configuration (HW Config). For SIMOCODE-DP, the call used in OB1 is typically:
CALL "RD_REC"
REQ := M_20_0_SFC59 // rising edge triggers read
IOID := B#16#54 // input area (PII)
LADDR := W#16#100 // logical base address = 256
RECNUM := B#16#83 // data record 131 (0x83)
RET_VAL := MW220 // error / status
BUSY := M_20_1_BUSY // 1 while transaction active
RECORD := P#DB20.DBX0.0 BYTE 18 // 18-byte destination buffer
3.1 IOID Encoding (B#16#54 / B#16#55)
The IOID byte defines the I/O type and access direction. The two valid values for RD_REC on a SIMOCODE-DP are:
| IOID | Meaning | Usage |
|---|---|---|
| B#16#54 | Input area (PII) | Read DS 131 (display / diagnosis) |
| B#16#55 | Output area (PIQ) | Write DS 133 (statistics) via SFC 58 |
Reading a write-only or output record with B#16#54 still succeeds but returns zeros. Reading record 133 with B#16#54 is permitted because SIMOCODE accepts read on both sides; writing must always use B#16#55.
3.2 LADDR Selection
LADDR is the logical base address (diagnostic address) of the SIMOCODE-DP module as configured in HW Config. The value must be entered in hex. Common values:
-
W#16#100= 256 decimal - typical when SIMOCODE is the only DP slave on the master - Calculated as
W#16#(1024 + 4 * DP_node_address)when the master auto-assigns diagnostic addresses, but HW Config always overrides this default
LADDR in the SFC call and the diagnostic address displayed in HW Config under Properties > SIMOCODE-DP > Address must match exactly. A mismatch is the single most common cause of 80A2.3.3 RECNUM Selection
| RECNUM (Hex) | RECNUM (Dec) | Record |
|---|---|---|
| 0x83 | 131 | Display / diagnosis (read) |
| 0x85 | 133 | Statistical data (read / write) |
4. Error Code Decoded - 7001 and 80A2
The first scan returns RET_VAL = W#16#7001 and BUSY = 1. This is the standard job initiated acknowledgement from SFC 59. After the PROFIBUS stack has tried to dispatch the acyclic read, the call returns the actual error code:
| RET_VAL | Meaning (per STEP 7 Online Help) | Action |
|---|---|---|
| W#16#7001 | First call with REQ = 1, BUSY = 1, no data transfer active | Normal; wait and re-evaluate BUSY |
| W#16#80A2 | DP protocol error at layer 2 of PROFIBUS-DP (DP slave cannot be addressed) | Resolve before re-trying |
| W#16#80B0 | Slave does not recognise the data record | Wrong RECNUM, or record not enabled in slave |
| W#16#80B1 | Wrong length specified for RECORD | Adjust RECORD target length |
| W#16#80B2 | Slot not configured | LADDR mismatch |
| W#16#80C3 | Access timeout (DPV1 slot) | SIMOCODE busy with another acyclic job |
| W#16#80C4 | DPV1 service rejected by SIMOCODE | Wrong IOID or RECNUM, or SIMOCODE in fault state |
80A2 is generated locally on the DP master when the slave does not respond on the bus. It is therefore a layer-2 visibility issue rather than a parameter error inside SIMOCODE. The fault must be cured at the bus level before any acyclic access can succeed.
5. Root Cause Analysis
When the same SIMOCODE responds to cyclic commands (start, stop, reset, status) but rejects acyclic RD_REC, the fault tree narrows to:
- PROFIBUS node address mismatch. SIMOCODE ships with factory default node address 126. If HW Config assigns any other address and Win-SIMOCODE-DP has not been used to overwrite the unit's DIP / software setting, the master polls the slave at the wrong address and reports a layer-2 error.
-
LADDR / diagnostic address mismatch. The
LADDRargument inSFC 59does not match the diagnostic address in HW Config (Properties > SIMOCODE-DP > Address tab). -
GSD file mismatch. The GSD installed in STEP 7 does not match the SIMOCODE firmware revision.
SIEM8031.GSFcovers the standard DP-V0 acyclic subset; older or newer GSD revisions may rearrange the diagnostic slot. -
DPV1 disabled. Some STEP 7 builds default to DPV0 acyclic. SIMOCODE-DP returns
80A2when the master requests a DPV1-style read on a slot that was configured as DPV0. -
Diagnostic slot 0 not assigned. SIMOCODE expects a slot 0 for acyclic access. If the GSD mapping drops slot 0 in the rack view,
RD_RECcannot resolve the slot. -
Physical layer fault. Missing bus terminator, broken shield, or address conflict on the same segment (two slaves with the same DIP setting) yield the same
80A2.
6. Configuration Prerequisites
- Hardware. S7-315 (or S7-300/400 with DP master port), SIMOCODE-DP basic unit (3UF50 / 3UF70), PROFIBUS-DP connection module, terminated PROFIBUS cable with shields grounded at both ends.
-
Software - STEP 7 V5.x. SIMATIC Manager with HW Config, installed GSD
SIEM8031.GSF, S7-300 family support package. Reference: Configuring PROFIBUS DP for the S7-1200 equivalent flow. - Software - Win-SIMOCODE-DP. Win-SIMOCODE-DP Professional V1.2.0.4 (or later) on a PC with a PROFIBUS interface (CP 5512 / CP 5611 / CP 5613) for direct access to the unit.
- Operator panel. TP 170A / TP 177A with ProTool / WinCC flexible 200x configuration, connected to the S7-315 over MPI or PROFIBUS.
- Documentation. SIMOCODE-DP system manual, Entry ID 6008561 in the Siemens Industry Online Support portal.
7. Resolving the PROFIBUS Node Address
The PROFIBUS node address cannot be written from STEP 7 - it must be set with the SIMOCODE-DP parameterisation tool. Skip this step only if the unit was delivered pre-addressed by the panel builder.
- Connect the PC running Win-SIMOCODE-DP Professional to the SIMOCODE-DP service interface or to the PROFIBUS segment with the CP 5611 / CP 5613.
- Open Win-SIMOCODE-DP, select Online > Available nodes. The tool lists the SIMOCODE at address 126 with its current firmware revision.
- Double-click the node and change the PROFIBUS address to the value reserved in HW Config (for example, address 3).
- Download the new address to the SIMOCODE. The unit restarts the DP stack and is reachable on the new address.
- Verify the change by browsing the device again. The new node number appears in the title bar.
8. Correcting the SFC 59 Call
With the slave address fixed, revisit every parameter of the SFC 59 call against HW Config.
-
Read the diagnostic address. In SIMATIC Manager, open HW Config, click the SIMOCODE-DP icon, and read the value under Properties > Address > Diagnostic address. Convert to hex and assign to
LADDR. -
Validate IOID. For reading record 131 keep
IOID = B#16#54. For writing record 133 withSFC 58 WR_REC, switch toB#16#55. -
Confirm RECNUM. Use
B#16#83for record 131 andB#16#85for record 133. -
Size RECORD. Declare a destination DB of at least 18 bytes for record 131 (24 bytes is recommended so that any future revision of the record still fits). Wrong length returns
80B1. -
Handshake logic. Trigger
REQwith a rising-edge flag, monitorBUSY, and evaluateRET_VALonly afterBUSYreturns to 0. Re-trigger only after the previous job has settled. -
Watchdog. If
BUSYremains set for more than 5 s, clear the trigger flag and re-issue the request on the next OB1 cycle. Persistent bus errors are typically the symptom of an80A2rather than a watchdog timeout.
// STL reference - OB1 call
A M 20.0 // trigger flag (pulse from HMI button)
= M 20.0_SFC59 // drive REQ
CALL "RD_REC"
REQ := M_20_0_SFC59
IOID := B#16#54
LADDR := W#16#100
RECNUM := B#16#83
RET_VAL:= MW 220
BUSY := M_20_1_BUSY
RECORD := P#DB 20.DBX 0.0 BYTE 18
NOP 0
9. TP 177A HMI Integration
The TP 177A panel reads SIMOCODE-DP process data via the S7-315 cyclic tags. Acyclic records 131 and 133 must be copied from the receive DB (DB20) into the HMI tag area before they can be displayed.
- Create an HMI connection in WinCC flexible / ProTool from TP 177A to the S7-315, area pointer Coordination not required.
- Define DB tags of the matching data type for every record element. Use
INTforOperating Hours,DINTforNumber of Starts,INTforI-maxandLast Trip Current,BYTEforAnalog Sensor Value. - Wire each tag to its absolute address inside
DB20. Apply byte-swap on the multi-byte values because record 131 stores them big-endian while the S7-315 stores INTs little-endian. A simple swap is performed by FC:
// FC 100 - swap DS131 INT fields from big-endian to S7 INT
// In: srcDBW : WORD (DB20.DBW from acyclic read)
// Out: dstDBW : INT
L #srcDBW
T #tmpWORD
L #tmpWORD
SRW 8 // shift right by 8 bits
T #lowByte
L #tmpWORD
SLW 8 // clear high byte
L #lowByte
OW
T #dstDBW
- Insert an output field on the TP 177A screen and bind it to the swapped INT tag. For the percentage values, define a linear scaling of
0.01so the display showsI-max = 105.42 %instead of10542. - For
Analog Sensor Value, apply a linear scalingy = 20 / 255 * xto read out the resistance in ohms (the raw byte is the ratio of the analog sensor resistance). - Refresh the screen from the SFC trigger - the panel only updates when the SFC writes new data. If the data appears stale, increase the trigger frequency from OB35 / OB1 or add a manual refresh button on the panel.
10. Verification Procedure
Validate the fix end to end before commissioning the panel on site.
- Online diagnosis in STEP 7. Open PLC > Diagnostics > Diagnostics of the Slave. SIMOCODE must report OK and its DP address must equal the one set in Win-SIMOCODE-DP.
-
Monitor RET_VAL. In VAT, force
M 20.0 = 1for one OB1 cycle, then monitorMW 220. Expected result after the fix:W#16#0000withM 20.1 = 0after a few cycles. -
Inspect DB20. After a successful read, the bytes
DB20.DBB 0..17match the table in section 2.1. Sanity-checkOperating Hoursagainst the value in Win-SIMOCODE-DP. - TP 177A live display. Press the refresh button on the screen. All counters update within one PLC cycle of the trigger.
-
Write test (record 133). Use
SFC 58 WR_RECto reset the Number of Overload Trips counter. Read record 131 back and confirm the counter has rolled to 0.
11. Troubleshooting Matrix
| Symptom | Most likely cause | Resolution |
|---|---|---|
RET_VAL = 80A2, BUSY = 0 |
Slave not on bus, wrong DP address, no termination | Check address with Win-SIMOCODE-DP, inspect termination and shield |
RET_VAL = 80A2 only on record 133 |
SIMOCODE firmware rejects write on this slot | Switch to firmware update, check write protection DIP |
RET_VAL = 80B0 |
RECNUM not enabled in slave | Enable record in Win-SIMOCODE-DP > parameter set |
RET_VAL = 80B1 |
Wrong RECORD length | Adjust DB length to exactly 18 / 8 bytes |
RET_VAL = 80B2 |
Slot not configured | Re-check slot 0 mapping in GSD |
RET_VAL = 80C3 |
SIMOCODE busy on another acyclic job | Serialize acyclic requests with a state machine |
| BUSY stuck high > 5 s | Bus fault or duplicate node | Scan segment with BT 200, fix duplicate address |
| Cyclic I/O works, acyclic fails | DPV0 / DPV1 mismatch | Activate DPV1 in HW Config > Properties > DP slave |
| HMI shows zeros, DB20 valid | Endian swap missing | Apply FC 100 byte-swap on multi-byte fields |
| Panel refreshes too slowly | Trigger fired only on operator input | Add cyclic OB35 trigger every 1 s |
12. Preventive Best Practices
- Address plan. Keep a printed PROFIBUS address plan in the cabinet. SIMOCODE units leave the factory on 126 - assign, mark and download before they leave pre-assembly.
- Parameter set freeze. Once the DP address is committed, freeze the Win-SIMOCODE-DP parameter file and store it in the project archive so that a replacement unit can be cloned without going on-site.
- Diagnostic address reservation. Reserve a unique diagnostic address slot for every SIMOCODE in HW Config, even if the cyclic I/O address is unchanged. This isolates acyclic faults.
- Single acyclic master. Multiple HMIs polling the same record simultaneously can starve the SIMOCODE acyclic handler. Use one CPU-side polling task and mirror the values into HMI tags.
-
Firmware alignment. SIMOCODE-DP firmware
E06and later supports DPV1 acyclic reads withRD_REC. Older firmware requiresWR_REC/RD_RECon the diagnostic slot only. Update firmware before commissioning if the GSD is on the latest revision. - Shielding and termination. PROFIBUS termination must be active at both physical ends of the segment only. SIMOCODE is shipped without bus termination; install an active terminator on the last unit.
- Documentation references. Keep the SIMOCODE-DP system manual (Entry ID 6008561) and the S7-300 / S7-400 system manuals handy. For other PROFIBUS-DP adapter modules such as ABB drives, the parameter read / write pattern is similar - see the FPBA-01 PROFIBUS DP adapter module user's manual for a vendor-side comparison of PKW parameter channels.
What does SFC 59 error code 80A2 mean on SIMOCODE-DP?
80A2 is a DP layer-2 protocol error generated by the master. SIMOCODE did not respond to the acyclic DPV1 read. Check the PROFIBUS node address (factory default 126), the LADDR diagnostic address in HW Config, the bus termination, and confirm the slave is on the same PROFIBUS segment.
How do I read data record 131 from SIMOCODE-DP on an S7-315?
Call SFC 59 RD_REC with IOID = B#16#54, LADDR matching the SIMOCODE diagnostic address from HW Config (for example W#16#100), RECNUM = B#16#83, and a destination area of at least 18 bytes (for example P#DB20.DBX0.0 BYTE 18). Trigger REQ with a rising-edge flag.
Why is the default PROFIBUS address 126 on SIMOCODE-DP?
126 is the PROFIBUS-DP factory default reserved for uncommissioned slaves. Every SIMOCODE-DP leaves production on address 126 and must be re-addressed with Win-SIMOCODE-DP Professional / Smart before the master can poll it on its planned node number.
Can I write record 133 from the S7-315 to reset SIMOCODE statistics?
Yes. Use SFC 58 WR_REC with IOID = B#16#55, the same LADDR as the read call, RECNUM = B#16#85, and a source DB containing the new statistics block. The write path is typically used to clear Operating Hours, Number of Starts, and Number of Overload Trips after a motor rebuild.
Why do cyclic commands work but acyclic reads fail?
Cyclic I/O uses PROFIBUS-DP data-exchange telegrams and runs as long as the slave powers up and answers the poll. Acyclic reads (RD_REC) use the DPV1 read/write service on a specific slot. They can fail even when the cyclic layer is healthy if the slave address or diagnostic address is wrong, the GSD file is mismatched, or DPV1 is disabled in HW Config. Resolving the bus-level fault is mandatory before acyclic access becomes available.