Signaling Errors and Diagnostics in the User Program
4.2Example: Reading the Delta List
STL Example
The following example in STL applies to a CPU 222 with a CP
If an
To obtain more detailed information (which slave has failed), you can read in the delta list via bank 1 of the analog input area (see Section 2.5.1).
Table
OB1 (STL)
NETWORK 1 |
| |
LD | SM0.1 | //If: bit ªFirst Scanº: |
SI | Q1.7, 1 | //PLC_RUN = 1 |
RI | Q1.0, 6 | //Select bank 0 |
LD | I1.1 | //If: CP_READY |
CALL 2 | //Then: |
SBR 2 (STL)
NETWORK 1 | //Read delta list | |
LD | SM0.0 | //Always 1 |
=I | Q1.0 | //Select bank 1 |
BMW AIW0, VW316, 4 | //Read delta list | |
NOT |
|
|
=I | Q1.0 | //Select bank 0 |
//Below, there are several accesses to the delta list: | ||
LD | V316.1 | //If slave 1 has failed |
O | V319.7 | //Or if slave 31 has failed |
= | Q0.0 | //Then CPU output bit = 1 |
SIMATIC NET CP | |