30.3.2.2 Variable Type

There are nine variable types: Bit, Integer, Float, Real, Timer, Counter, Time, Date, and PID.

Bit Variable

1-bit variable that indicates ON/OFF with a value of either 0 (OFF) or 1 (ON).

Integer Variable

Signed variable with a 32-bit length that has integer values of -2147483648 (16#80000000) - 2147483647 (16#7FFFFFFF).

Float Variable

32-bit variables have a floating point value of +/-1.175494351e-38 to +/-3.402823466e+38 and 0. You can use up to 7 decimal places.

Real Variable

64-bit variables have a floating point value of +/-2.2250738585072014e-308 to +/-1.7976931348623158e+308 and 0. You can use up to 15 decimal places.

Timer Variable

Use timer variables to enable timer instructions.

Timer variables consist of the following five variables.

For details on instructions, refer to 32. Logic Instruction List Logic Instruction List.

Variable

Description

Variables Settings

PT

Value

32-Bit Integer

ET

Current Value

32-Bit Integer

Q

Output

Bit

TI

Time Count

Bit

R

Timer Reset

Bit

Counter Variable

Use counter variables to enable counter instructions.

Counter variables consist of the following seven variables.

For details on instructions, refer to 32. Logic Instruction List Logic Instruction List.

Variable

Description

Variables Settings

PV

Value

32-Bit Integer

CV

Current Value

32-Bit Integer

Q

Output

Bit

QD

Down Counter Output

Bit

QU

Up Counter Output

Bit

UP

Up Counter

Bit

R

Counter Reset

Bit

Date/Time Variable

Use date/time variables to enable date/time instructions.

Date/time variables consist of the following three variables.

For details on instructions, refer to 32. Logic Instruction List Logic Instruction List.

Variable

Description

Variables Settings

YR

Year (0-99)

32-Bit Integer

MO

Month (1-12)

32-Bit Integer

DAY

Day (1-31)

32-Bit Integer

Time Variable

Use time variables to enable time instructions.

The time variable consists of the following three variables.

For details on instructions, refer to 32. Logic Instruction List Logic Instruction List.

Variable

Description

Variables Settings

HR

Hour (0-23)

32-Bit Integer

MIN

Minute (0-59)

32-Bit Integer

SEC

Second (0-59)

32-Bit Integer

PID Variable

Use PID variables to enable PID instructions.

PID variables consist of the following eleven variables.

For details on instructions, refer to 32. Logic Instruction List Logic Instruction List.

Variable

Description

Variables Settings

KP

Constant Proportion (x1000)

32-Bit Integer

TR

Integral time (x1000)

32-Bit Integer

TD

Differential time (x1000)

32-Bit Integer

PA

Processing Deadband Range

32-Bit Integer

BA

Bias

32-Bit Integer

ST

Sampling Frequency

32-Bit Integer

Q

PID Processing Complete Flag

Bit

UO

Exceeding the Minimum Scaled Value

Bit

TO

Exceeding the Maximum Scaled Value

Bit

PF

Processing Deadband Range Flag

Bit

IF

Integral Range Processing Flag

Bit