Simatic And Iec 1131-3 Variable Data Types; Iec 1131-3 Elementary Data Types - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Consider these points when you select IEC 1131-3 instructions:
It is usually easier to learn how to create programs for different brands of PLCs.
Fewer instructions are available (as specified by the standard) but you can
always use many of the SIMATIC instructions as well.
Some instructions operate differently than their SIMATIC counterparts (timers,
counters, multiply, divide, etc.)
These instructions may have longer execution times.
These instructions can only be used within the LAD and FBD editors.
IEC 1131-3 specifies that variables must be declared with a type and supports
system checking of data type.

SIMATIC and IEC 1131-3 Variable Data Types

Every SIMATIC and IEC 1131-3 instruction or parameterized subroutine is
identified by a precise definition referred to as a signature. For all standard
instructions, the allowable data types for each instruction operand is obtained from
the signature. For parameterized subroutines, the signature of the subroutine is
created by the user through the Local Variable Table.
STEP 7-Micro/WIN 32 implements simple data type checking for the SIMATIC
mode, and strong data type checking for the IEC 1131-3 mode. When a data type
is specified for either a local or global variable, STEP 7-Micro/WIN 32 ensures that
the operand data type matches the instruction signature to the level specified.
Table 4-2 defines elementary data types and Table 4-3 shows complex data types
available in STEP 7-Micro/WIN 32.
Table 4-2
Elementary Data Types
BOOL (1 bit)
BYTE (8 bits)
WORD (16 bits)
INT (16 bits)
DWORD (32 bits)
DINT (32 bits)
REAL (32 bits)
S7-200 Programmable Controller System Manual
A5E00066097-02
Basic Concepts for Programming an S7-200 CPU

IEC 1131-3 Elementary Data Types

Data Type Size
1 bit
8 bits
16 bits
16 bits
32 bits
32 bits
32 bits
Description
Boolean
0 to 1
Unsigned byte
0 to 255
Unsigned integer
0 to 65,535
Signed integer
-32768 to +32767
Unsigned double
0 to 2
integer
Signed double integer
-2
IEEE 32-bit floating
-10
point
Data Range
32
- 1
31
31
to +2
- 1
38
38
to +10
4-11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents