Conversion Operations; Conv (Convert Value) Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Basic instructions

7.7 Conversion operations

Table 7- 72
Data types for the parameters
Parameter
Data type
IN
Word, DWord
OUT
Word, DWord
Example 1
Address
W#16#1234
WORD
Example 2
Address
DW#16#
12345678
DWORD
7.7
Conversion operations
7.7.1

CONV (Convert value) instruction

Table 7- 73
Convert (CONV) instruction
LAD / FBD
SCL
out := <data type in>_TO_<data type out>(in);
For LAD and FBD: Click the "???" and select the data types from the drop-down menu.
1
For SCL: Construct the conversion instruction by identifying the data type for the input parameter (in) and output
2
parameter (out). For example, DWORD_TO_REAL converts a DWord value to a Real value.
244
Parameter IN = MB0
(before execution)
MW0
MB1
12
34
MSB
LSB
Parameter IN = MB0
(before execution)
MD0
MB1
MB2
12
34
56
MSB
Description
Ordered data bytes IN
Reverse ordered data bytes OUT
Parameter OUT = MB4,
(after execution)
MW4
34
MSB
Parameter OUT = MB4,
(after execution)
MB3
MD4
78
78
LSB
MSB
Description
Converts a data element from one
data type to another data type.
System Manual, 03/2014, A5E02486680-AG
MB5
12
LSB
MB5
MB6
MB7
56
34
12
LSB
S7-1200 Programmable controller

Advertisement

Table of Contents
loading

Table of Contents