EasyManua.ls Logo

Siemens SIMATIC S7-200 - GSM;GPRS and Ethernet Communication

Siemens SIMATIC S7-200
606 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 Concepts for Programming an S7-200 CPU
4-17
S7-200 Programmable Controller System Manual
A5E00066097-02
Using Conversion Instructions
Conversion instructions permit the movement from one data type to another.
STEP 7-Micro/WIN 32 supports the conversion instructions shown in Table 4-10 for
moving values between the simple data types.
Table 4-10 Conversion Instructions
Conversion Instruction
Strong Data Type Checking
Allowed Operands
Data Type Checking
Allowed Operands
BYTE to INT IN: BYTE
OUT: INT
IN: BYTE
OUT: WORD, INT
INT to BYTE IN: INT
OUT: BYTE
IN: WORD, INT
OUT: BYTE
INT to DINT IN: DINT
OUT DINT
IN: WORD, INT
OUT: DWORD, DINT
DINT to INT IN: DINT
OUT: INT
IN: DWORD, DINT
OUT: WORD, INT
DINT to REAL IN: DINT
OUT: REAL
IN: DWORD, DINT
OUT: REAL
REAL to DINT (ROUND) IN: REAL
OUT: DINT
IN: REAL
OUT: DWORD, DINT
Under the IEC 1131-3 editing mode you can use the overloaded MOVE instruction
to convert between INT and WORD, and DINT and DWORD. The MOVE
instruction allows data types of the same size to be moved without the compiler
generating errors. See Table 4-11.
Table 4-11 Using Overloaded MOVE Instruction.
IEC 1131-3 Overloaded Move
IN OUT
MOVE (INT to WORD) INT WORD
MOVE (WORD to INT) WORD INT
MOVE (DINT to DWORD) DINT DWORD
MOVE (DWORD to DINT) DWORD DINT

Table of Contents

Other manuals for Siemens SIMATIC S7-200

Related product manuals