Siemens SIMATIC S7-200 System Manual page 88

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

Advertisement

S7-200 Programmable Controller System Manual
Example: Coil Instructions
Timing Diagram
Network 1
I0.0
Q0.0, Q0.1, V0.0
Networks 2 and 3
I0.1 (Set)
I0.2 (Reset)
Reset to 0 overwrites Set to 1 because the program scan
executes the Network 3 Reset after the Network 2 Set
Networks 4 and 5
I0.3
I0.4 (Set)
I0.5 (Reset)
I0.6
Q1.0
74
Network 1
//Output instructions assign bit values to external I/O (I, Q)
//and internal memory (M, SM, T, C, V, S, L).
LD
I0.0
=
Q0.0
=
Q0.1
=
V0.0
Network 2
//Set a sequential group of 6 bits to a value of 1. Specify a
//starting bit address and how many bits to set. The program
//status indicator for Set is ON when the value of the first bit
//(Q0.2) is 1.
LD
I0.1
S
Q0.2, 6
Network 3
//Reset a sequential group of 6 bits to a value of 0.
//Specify a starting bit address and how many bits to reset.
//The program status indicator for Reset is ON when the value
//of the first bit (Q0.2) is 0.
LD
I0.2
R
Q0.2, 6
Network 4
//Sets and resets 8 output bits (Q1.0 to Q1.7) as a group.
LD
I0.3
LPS
A
I0.4
S
Q1.0, 8
LPP
A
I0.5
R
Q1.0, 8
Network 5
//The Set and Reset instructions perform the function of a latched
//relay. To isolate the Set/Reset bits, make sure they are not
//overwritten by another assignment instruction. In this example,
//Network 4 sets and resets eight output bits (Q1.0 to Q1.7)
//as a group. In RUN mode, Network 5 can overwrite
//the Q1.0 bit value and control the Set/Reset program
//status indicators in Network 4.
LD
I0.6
=
Q1.0
Network 5 Output bit (=) instruction overwrites the first bit (Q1.0) Set/Reset in
Network 4 because the program scan executes the Network 5 assignment last

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents