EasyManua.ls Logo

Siemens S7-1200 - Conversion Instructions for SCL

Siemens S7-1200
1028 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...
Basic instructions
7.7 Conversion operations
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
245
Table 7- 74 Data types for the parameters
Parameter
Data type
Description
IN Bit string
1
, SInt, USInt, Int, UInt, DInt, UDInt, Real, LReal,
BCD16, BCD32
Input value
OUT Bit string
1
, SInt, USInt, Int, UInt, DInt, UDInt, Real, LReal,
BCD16, BCD32
Input value converted to a new data type
1
The instruction does not allow you to select Bit strings (Byte, Word, DWord). To enter an operand of data type Byte,
Word, or DWord for a parameter of the instruction, select an unsigned integer with the same bit length. For example,
select USInt for a Byte, UInt for a Word, or UDInt for a DWord.
After you select the (convert from) data type, a list of possible conversions is shown in the
(convert to) dropdown list. Conversions from and to BCD16 are restricted to the Int data
type. Conversions from and to BCD32 are restricted to the DInt data type.
Table 7- 75 ENO status
ENO
Description
Result OUT
1
No error
Valid result
0
IN is +/- INF or +/- NaN
+/- INF or +/- NaN
0
Result exceeds valid range for OUT data type
OUT is set to the IN value
7.7.2
Conversion instructions for SCL
Conversion instructions for SCL
Table 7- 76 Conversion from a Bool, Byte, Word, or DWord
Data type
Instruction
Result
Bool
BOOL_TO_BYTE, BOOL_TO_WORD,
BOOL_TO_DWORD, BOOL_TO_INT,
BOOL_TO_DINT
The value is transferred to the least significant bit of the
target data type.
Byte
BYTE_TO_BOOL
The least significant bit is transferred into the destination
data type.
BYTE_TO_WORD, BYTE_TO_DWORD
The value is transferred to the least significant byte of the
target data type.
BYTE_TO_SINT, BYTE_TO_USINT
The value is transferred to the target data type.
BYTE_TO_INT, BYTE_TO_UINT,
BYTE_TO_DINT, BYTE_TO_UDINT
The value is transferred to the least significant byte of the
target data type.
Word
WORD_TO_BOOL
The least significant bit is transferred into the destination
data type.
WORD_TO_BYTE
The least significant byte of the source value is
transferred to the target data type
WORD_TO_DWORD
The value is transferred to the least significant word of
the target data type.

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals