Programming Industrial Control Systems Using IEC 1131-3, Revised Edition

3.6: Data types

3.6 Data types

As PLCs are now being used in an ever widening range of industrial applications, IEC 1131-3 recognises the need for handling a variety of different types of data. The standard provides a comprehensive range of standard elementary data types designed for dealing with values of typical industrial variables.

The range [3] includes floating point (REAL) [4] numbers for arithmetic computations, integers for counts and identities, booleans for logic operations, times and dates for timing and managing batch systems, strings for holding textual information and bits, bytes and words for low level device operations.

The format of literals for each data type is also given in the following descriptions. A literal is a constant that defines how a given value for a particular data type is represented; e.g. integer literals are 12, 342, 0. Where the data type of a literal may be ambiguous, the data type can be prefixed, e.g. INT#12, LINT#342.

Integer

There are a number of different integer types defined. Integers are used for holding values such as counts and identities, i.e. whole numbers. The unsigned set of integers should be used where there is no requirement to hold negative values and where the increased positive range can be exploited. The type of integer used for a particular variable will depend on the range of values that need to be stored in the variable.

Table 3.1: Integer data types

IEC data type

Description

Bits

Range

SINT

Short integer

8

? 128 to...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Logic Adders
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.