Complete list of data types for PLC variables!

Currently, high-end PLC variables need to be defined by themselves. This article summarizes the data types of PLC variables

 

1、 BOOL

 

Boolean variables can be assigned “TRUE” true or “FALSE” false. This value is a logical quantity, occupying 1 bit of storage space

 

Can be seen as an auxiliary relay for a common PLC

 

 

2、 Integer variable

 

BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, and UDINT.

 

Note that when converting a longer data type to a shorter data type, high order information will be lost

 

3、 REAL and LREAL

 

Is a floating point number used to display rational numbers. You can display decimal data, including fractional parts.

 

REAL is a 32-bit floating point number,

 

LREAL is a 64 bit floating point number

 

4、 STRING

 

It is a string type and is rarely used

 

5、 DATE, TIME, TOD, DT

 

Several are time type variables used to input time data

 

6、 Array

 

Any data type can be defined as an array in the program

 

ARRAY[0..15] OF BOOL

 

ARRAY[0..15] OF INT

 

ARRAY[0..15] OF STRUCT

 

7、 Enumeration

 

Enumeration is a user-defined data type composed of character constants. These constants are referred to as enumeration values.

 

Enumeration is generally used to define IO tables, such as defining DI as an array, and then defining the enumeration of IO tables. DI [Start] makes it convenient to view programs in this way

 

8、 Structure

 

Is also the most commonly used data type in programs

 

 


Post time: Mar-23-2023