Siemens SIMATIC S5 CP 523 Manual page 53

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

Advertisement

Address Assignment
Example:
Writing to word 0 of the transfer memory with the CPU 944 in the user program
Initial address 128 is set in the P area on the CP. The job number for "Print message text No. 20" is
to be written to word 0.
STL FB XYZ
L
KH 0030
T
PY 128
L
KF+20
T
PY 129
Example:
Writing to word 0 of the transfer memory with the CPU 944 using the programmer's
"FORCE VAR" function
Start address 128 is set in the P area on the CP. The job number for "Print all configured message
texts" (8000
) is to be transferred to word 0 using the "FORCE VAR" function.
H
Only when you convert a peripheral (I/O) word (PW) to a flag word (FW) can you force it with the
"FORCE VAR" function. For this reason, store PW 128 in FW 128 of FY 10. FW 128 can then be
forced in the "FORCE VAR" screen form. FW 228 is an auxiliary word for comparing the old/new
values.
Operand
PY 128
KH=80
PY 129
KH=00
STL FB 10
:
:L
FW 228
:L
FW 128
:! = F
:BEC
:L
FW 128
:T
FW 228
:L
FY 128
:T
PY 128
:L
FY 129
:T
PY 129
:BE
5-4
Load ACCUM 1 with the job number "Print message text".
Transfer the low byte of ACCUM 1 to the CP.
Load messsage text number into ACCUM 1.
Transfer the low byte of ACCUM 1 to the CP.
Signal States
Write the "Print all configured message texts" job
number 8000
transfer memory
Load old value
Load new value
Compare for equal
Block end if equal
Update old value
if not equal and
Transfer flag word byte by byte
to the peripheral (I/O) word
Block End
Explanation
Explanation
to bytes 0 (80
) and 1 (00
H
H
Explanation
CP 523
) of the
H
EWA 4NEB 811 6044-02a

Advertisement

Table of Contents
loading

Table of Contents