EasyManua.ls Logo

Siemens Simatic S7 Series

Siemens Simatic S7 Series
726 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
Loading...
Program instructions
7.5 Convert
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
199
LAD / FBD
STL
Description
ROUND IN, OUT
TRUNC IN, OUT
Round
:
Convert the 32-bit real-number value IN to a double integer value and place the
rounded result at the address assigned to OUT. If the fraction portion is 0.5 or
greater, the number is rounded up.
Truncate
:
Convert the 32-bit real-number value IN into a double integer value and place
the result at the address assigned to OUT. Only the whole number portion of
the real number is converted, and the fraction is discarded.
Note:
If the value that you are converting is not a valid real number or is too
large to be represented in the output, then the overflow bit is set and the output
is not affected.
SEG IN, OUT
SEG:
To illuminate the segments of a seven-segment display, the Segment instruc-
tion converts the character byte specified by IN to generate a bit pattern byte at
the address assigned to OUT.
The illuminated segments represent the character in the least significant digit of
the input byte.
Non-fatal error conditions with ENO = 0
SM bits affected
0006H Indirect address
SM1.1 Overflow
SM1.6 Invalid BCD
SM1.1 Overflow
SM1.6 Invalid BCD
Input / output
Data type
Operand
IN
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
WORD (BCD_I,
I_BCD), INT
IW, QW, VW, MW, SMW, SW, T, C, LW, AIW, AC, *VD, *LD, *AC, Constant
DINT
ID, QD, VD, MD, SMD, SD, LD, HC, AC, *VD, *LD, *AC, Constant
REAL ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC, Constant
OUT
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC
WORD (BCD_I,
I_BCD)
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, *VD, *LD, *AC
INT (B_I, DI_I)
IW, QW, VW, MW, SMW, SW, T, C, LW, AC,, AQW, *VD, *LD, *AC
DINT, REAL
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC

Table of Contents

Other manuals for Siemens Simatic S7 Series

Related product manuals