EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 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
8.7 Conversion operations
S7-1200 Programmable controller
290 System Manual, V4.2, 09/2016, A5E02486680-AK
8.7
Conversion operations
8.7.1
CONV (Convert value)
Table 8- 102 Convert (CONV) instruction
LAD / FBD
SCL
Description
out := <data type in>_TO_<data type out>(in);
Converts a data element from one
data type to another data type.
1
For LAD and FBD: Click the "???" and select the data types from the drop-down menu.
2
For SCL: Construct the conversion instruction by identifying the data type for the input parameter (in) and output pa-
rameter (out). For example, DWORD_TO_REAL converts a DWord value to a Real value.
Table 8- 103 Data types for the parameters
Parameter
Data type
Description
IN Bit string
1
, SInt, USInt, Int, UInt, DInt, UDInt, Real, LReal,
BCD16, BCD32, Char, WChar
Input value
OUT Bit string
1
, SInt, USInt, Int, UInt, DInt, UDInt, Real, LReal,
BCD16, BCD32, Char, WChar
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, se-
lect 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 8- 104 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

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals