Data types

Data types say what a variable holds: a bit, an integer, a real, a duration, or the memory of a timer or a counter.

What it does

Every variable has a type. The type sets the possible values, the memory used and the instructions that can use it: a contact reads a BOOL, an addition works on INT, DINT or REAL, a timer needs a TIMER variable.

When to use it

When creating each variable: BOOL for a button or an output, DINT for a part counter, REAL for a measurement, TIME for a duration.

In this category