Siemens Simatic S7-200 System Manual page 281

Programmable controller
Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

The following is true of Segmentation instructions:
All logic between the LSCR and the SCRE instructions make up the SCR segment and
are dependent upon the value of the S stack for its execution. Logic between the SCRE
and the next LSCR instruction have no dependency upon the value of the S stack.
The SCRT instruction sets an S bit to enable the next SCR and also resets the S bit that
was loaded to enable this section of the SCR segment.
Restrictions
Restrictions for using SCRs follow:
You can use SCRs in the main program, but you cannot use them in subroutines and
interrupt routines.
You cannot use the JMP and LBL instructions in an SCR segment. This means that
jumps into, within, or out of an SCR segment are not allowed. You can use jump and
label instructions to jump around SCR segments.
You cannot use the FOR, NEXT, and END instructions in an SCR segment.
SCR Example
Figure 10-39 shows an example of the operation of SCRs.
In this example, the first scan bit SM0.1 is used to set S0.1, which will be the active
State 1 on the first scan.
After a 2-second delay, T37 causes a transition to State 2. This transition deactivates the
State 1 SCR (S0.1) segment and activates the State 2 SCR (S0.2) segment.
Network 1
SM0.1
Network 2
Network 3
SM0.0
Network 4
T37
Network 5
Figure 10-39
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02
LAD
S0.1
On the first scan,
S
enable State 1.
1
S0.1
Beginning of State 1
SCR
control region
Q0.4
Turn on the red light on
S
First Street.
1
Q0.5
Turn off the yellow and
R
green lights on First
2
Street.
T37
IN
TON
Start a 2-second timer.
20
PT
S0.2
Transition to State 2
SCRT
after a 2-second delay.
End of SCR region for
SCRE
State 1
(Program continued on next page)
Example of Sequence Control Relays (SCRs)
Instruction Set
STL
Network 1
LD
SM0.1
S
S0.1, 1
Network 2
LSCR
S0.1
Network 3
LD
SM0.0
S
Q0.4, 1
R
Q0.5, 2
TON
T37, 20
Network 4
LD
T37
SCRT
S0.2
Network 5
SCRE
10-93

Advertisement

Table of Contents
loading

Table of Contents