EasyManua.ls Logo

Siemens S5-100U - Page 441

Siemens S5-100U
512 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
S5-100U 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.
DescriptionSTL
...
A I 97.0
JC FB 20
...
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.
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 Description
...
AN I 121.1
JC= L001
LFW 0
T QW 120
L001 AN I 121.2
JC= L002
LFW 2
T QW 122
L002 BE
...
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
and transfer it to the counter module.
Block end
15-40
EWA 4NEB 812 6120-02

Table of Contents

Related product manuals