Siemens SIMATIC S5 CP 523 Manual page 90

Serial i/o module
Hide thumbs Also See for SIMATIC S5 CP 523:
Table of Contents

Advertisement

CP 523
Example:
Scanning the status of the module
The module is set to start address 128.
An unconfigured memory submodule is plugged into the module. When the error is detected,
output 4.0 is to be set.
STL FB 100
NAME
:ERROR1
:L
KH 0000
:T
PW 128*
:L
KH 000F
:L
PY 128
:AW
:L
KH 0002
:><F
:BEC
:S
Q
:BE
*
5.2
Status of the printer and day (byte 1)
Byte 1 is divided into two half-bytes. The status of the printer is specified in bits 4 to 7 of the left,
the current day is in bits 0 to 3 of the right half-byte. The half-bytes are independent of each
other.
They can be combined in any way.
Byte 1
Bit 4 to 7
Bit 0 to 3
X
1 to 7
0
1
X= Signal state irrelvant for other half-byte
EWA 4NEB 811 6044-02a
Transfer nonrelevant data to the CP. The CP then updates the
transfer memory with current data.
Evaluation of "Status of the module" byte.
Compare status byte with 0002
If not equal,
block End
Otherwise, set output 4.0
4.0
Block End.
Table 6-16. Status of the Printer and Day of the Week
1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday,
5=Thursday, 6=Friday, 7=Saturday
X
Printer ready
X
Printer not ready
Explanation
.
H
Meaning
Print Mode
6-35

Advertisement

Table of Contents
loading

Table of Contents