Bit Logic Output Examples - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

7.1.12

Bit logic output examples

LAD
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
Output instructions assign bit values to external I/O
(I, Q) and internal memory (M, SM, T, C, V, S, L).
Set a sequential group of 6 bits to a value of 1. Spec-
ify 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.
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.
Sets and resets 8 output bits (Q1.0 to Q1.7) as a
group.
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 as-
signment 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.
Program instructions
7.1 Bit logic
STL
Network 1
LD I0.0
= Q0.0
= Q0.1
= V0.0
Network 2
LD I0.1
S Q0.2, 6
Network 3
LD I0.2
R Q0.2, 6
Network 4
LD I0.3
LPS
A I0.4
S Q1.0, 8
LPP
A I0.5
R Q1.0, 8
Network 5
LD I0.6
= Q1.0
183

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents