Compare; Integer Math - Siemens SIMATIC S7-200 Manual

Software conversion tool
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

4.4

Compare

Table 4- 4
Compare conversion
S7-200 instruction
==B, ==I, ==D, ==R, ==S Equal
<>B, <>I, <>D, <>R, <>S Not equal
>=B, >=I, >=D, >=R Greater than or equal
<=B, <=I, <=D, <=R Less than or equal
>B, >I, >D, >R Greater than
<B, <I, <D, <R Less than
* For string comparisons (==S and <>S), only S7-200 literal string (ex. "123456") input parameters are converted. Due to
differences between the S7-200 and S7-1200 string storage format, S7-200 string direct address and indirect address
parameters are not converted.
4.5

Integer math

Table 4- 5
Integer math conversion
S7-200 instruction
ADD_I Add Integer
ADD_DI Add Double Integer
SUB_I Subtract Integer
SUB_DI Subtract Double Integer
MUL_I Multiply Integer
MUL_DI Multiply Double Integer
DIV_I Divide Integer
DIV_DI Divide Double Integer
INC_B Increment Byte
INC_W Increment Word
INC_ DW Increment Double Word
DEC_B Decrement Byte
DEC_W Decrement Word
DEC_DW Decrement Double Word
MUL Multiply two 16-bit integers and produce a 32-bit product
DIV Divide two 16-bit integers and produce a 32-bit result consisting of a
16-bit remainder (most-significant word) and a 16-bit quotient (least-
significant word).
* The S7-200 increment/decrement instructions can have a separate IN and OUT address. The S7-1200
increment/decrement instructions have one IN/OUT parameter and must use a single address. If the S7-200
increment/decrement instruction uses a single IN and OUT address, then the instruction and parameters are converted.
If the S7-200 increment/decrement instruction uses separate IN and OUT addresses, then the instruction is converted
but not the parameters.
SIMATIC S7-200 to SIMATIC S7-1200 software conversion tool
Manual, 1/2010
Converted?
S7-1200 instruction
Yes *
==
Yes *
<>
Yes
>=
Yes
<=
Yes
>
Yes
<
S7-200 LAD instruction conversion
Converted?
S7-1200 instruction
Yes
ADD
Yes
Yes
SUB
Yes
Yes
MUL
Yes
Yes
DIV
Yes
Yes *
INC
Yes *
Yes *
Yes *
DEC
Yes *
Yes *
No
No
4.4 Compare
25

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents