Siemens SIMATIC S5 CP 523 Manual page 91

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

Advertisement

Print Mode
Example:
Evaluating the status of the printer
The module is set to start address 128.
If the printer is not ready, output 4.1 is to be set.
STL FB 101
NAME
:ERROR2
:L
KH 0000
:T
PW 128*
:L
KH 00F0
:L
PY 129
:AW
:L
KH 0010
:><F
:BEC
:S
Q
:BE
*
5.2
Date and time of day (bytes 1 to 7)
The CP 523 supplies the current clock data in BCD.
The status of the printer is specified in byte 1, bit 4. This information is independent of the current
day of the week, which is specified in byte 1, bits 0 to 3.
Byte
Value Range
1
1 to 7
2
01
BCD
3
01
BCD
4
00
BCD
5
00
BCD
01
BCD
81
BCD
6
00
BCD
7
00
BCD
6-36
Transfer nonrelevant data to the CP. The CP then updates the
transfer memory with current data.
Evaluation of "Status of the printer" byte.
Compare status byte with 10
If not equal,
block End
Otherwise, set output 4.1.
Block end.
4.1
Table 6-17. Status of the Printer, Date and Time of Day
Bit 0 to 3
Bit 4=0
Bit 4=1
to 31
Day
BCD
to 12
Month
BCD
to 99
Year
BCD
to 23
Hour
24h clock
BCD
to 12
12h clock a. m. (Bit 7=0)
BCD
to 92
12h clock p. m.(Bit 7=1)
BCD
to 59
Minute
BCD
to 59
Second
BCD
Explanation
.
H
Meaning
:
1=Sunday, 2=Monday, 3=Tuesday,
4=Wednesday, 5=Thursday, 6=Friday,
7=Saturday
:
Printer ready
:
Printer not ready
CP 523
EWA 4NEB 811 6044-02a

Advertisement

Table of Contents
loading

Table of Contents