EasyManuals Logo

Siemens Simatic S7-200 CPU 210 User Manual

Siemens Simatic S7-200 CPU 210
140 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
Page #88 background imageLoading...
Page #88 background image
5-4
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Compare Word Integer
The Compare Word Integer instruction is used to compare two
values: n1 = n2, n1 >= n2, or n1 <= n2.
Operands: n1: T, C, MW, SMW
n2: T, C, MW, SMW, Constant
In ladder, the contact is on when the comparison is true.
In STL, the instructions Load, AND, or OR a 1 with the top of
stack when the comparison is true.
Word comparisons are signed (16#7FFF > 16#8000).
You can create a <>, <, or > comparison by using the Not
instruction with the =, >=, or <= compare instruction. The
following sequence is equivalent to a <> comparison of MW0 to
50:
LDW= MW0, 50
NOT
Contact Examples
NETWORK 1
LD I0.0
A I0.1
= Q0.0
NETWORK 2
LD I0.0
NOT
= Q0.1
NETWORK 3
LD I0.1
ED
= Q0.2
NETWORK 4
LDW>= MW0, MW2
= Q0.3
Network 1
Q0.0
LAD STL
I0.0 I0.1
Network 2
Q0.1I0.0
NOT
Network 3
Q0.2I0.1
N
Network 4
Q0.3MW0
MW2
>=I
Timing Diagram
I0.0
I0.1
Q0.0
Q0.1
Q0.2
Q0.3
MW0 >= MW2 MW0 < MW2
On for one scan
Figure 5-1 Example of Boolean Contact Instructions
Instruction Set
L
A
D
S
T
L
LDW= n1, n2
AW= n1, n2
OW= n1, n2
LDW>= n1, n2
AW>= n1, n2
OW>= n1, n2
LDW<= n1, n2
AW<= n1, n2
OW<= n1, n2
n1
==I
n2
n1
>=I
n2
n1
<=I
n2

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7-200 CPU 210 and is the answer not in the manual?

Siemens Simatic S7-200 CPU 210 Specifications

General IconGeneral
Digital Inputs6
Digital Outputs4
Program Memory2 KB
Data Memory1 KB
Timers128
Counters128
Analog Inputs0
Analog Outputs0
Communication Ports1 x RS-485
Power Supply24 V DC
TypeCPU

Related product manuals