Siemens SIMATIC S5-100U System Manual page 454

Simatic s5 series cpu 100/102/103
Hide thumbs Also See for SIMATIC S5-100U:
Table of Contents

Advertisement

Function Modules
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
121.1
JC=
L001
L
FW
0
T
QW
120
L001
AN
I
121.2
JC=
L002
L
FW
T
QW
122
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
branch is made to label 1.
Read in setpoint 1
and transfer it to the counter module.
If setpoint 2 has not yet been reached (bit 2=0), a
branch is made to label 2.
Read in setpoint 2
2
and transfer it to the counter module.
Block end
Description
Description
EWA 4NEB 812 6120-02b
S5100U

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents