Siemens S5-100U User Manual page 441

Simatic s5 programmable controller
Hide thumbs Also See for S5-100U:
Table of Contents

Advertisement

S5-100U
Examples for Data Exchange between the Programmable Controller and the Counter Module
Example 1:
The counter module is plugged into slot 4. If you now wish to check whether your system for
position decoding has been synchronized by a reference point approach, you must scan the sync bit
in the diagnostic byte (bit 0). If this bit is set, a branch is to be made to FB20. The position
decoding operation is started in FB20.
STL
...
A
I
97.0
JC
FB 20
...
Example 2:
Transferring the setpoints stored in flag words 0 and 2 to the counter module inserted into slot 7.
The module has only to accept the setpoints when the old setpoints have been reached or
exceeded.
STL
...
AN
I
JC=
L001
L
FW
T
QW
L001
AN
I
JC=
L002
L
FW
T
QW
L002
BE
...
15-40
Read in bit 0 of the diagnostic byte (sync bit).
If this bit is set, a branch is made to FB20.
If the bit is not set, program scanning is continued
with the statement following the block call.
If setpoint 1 has not yet been reached (bit 1=0), a
121.1
branch is made to label 1.
Read in setpoint 1
0
and transfer it to the counter module.
120
If setpoint 2 has not yet been reached (bit 2=0), a
121.2
branch is made to label 2.
Read in setpoint 2
2
and transfer it to the counter module.
122
Block end
Function Modules
Description
Description
EWA 4NEB 812 6120-02

Advertisement

Table of Contents
loading

Table of Contents