Program instructions
7.5 Convert
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
199
TRUNC IN, OUT
:
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.
:
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.
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
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
Non-fatal error conditions with ENO = 0
• 0006H Indirect address
• SM1.1 Overflow
• SM1.6 Invalid BCD
• SM1.1 Overflow
• SM1.6 Invalid BCD
IN
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
WORD (BCD_I,
IW, QW, VW, MW, SMW, SW, T, C, LW, AIW, AC, *VD, *LD, *AC, Constant
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
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
IW, QW, VW, MW, SMW, SW, T, C, LW, AC,, AQW, *VD, *LD, *AC
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC