Siemens SIMATIC S7 System Manual page 237

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

LAD / FBD
STL
ROUND
TRUNC
SEG
Non-fatal error conditions with ENO = 0
0006H Indirect address
SM1.1 Overflow
SM1.6 Invalid BCD
Input / output
Data type
IN
BYTE
WORD (BCD_I,
I_BCD), INT
DINT
REAL
OUT
BYTE
WORD (BCD_I,
I_BCD)
INT (B_I, DI_I)
DINT, REAL
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
Description
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:
IN, OUT
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.
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.
SM bits affected
SM1.1 Overflow
SM1.6 Invalid BCD
Operand
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
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
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC, Constant
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC
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
Program instructions
7.5 Convert
237

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents