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

All derived data types can be assigned new initial values that will override the defaults of the elementary data types. The new default value is defined with the type definition.
Examples:
TYPE PRESSURE: REAL := 1.0; (* Default 1 bar *) END_TYPE TYPE PRESSURE_SENSOR: STRUCT INPUT: PRESSURE := 2.0; (* Override default *) STATUS: BOOL := 0; (* Default 0 *) CALIBRATION: DATE := DT#1994-01-10; (* Install Date*) HIGH_LIMIT: REAL := 30.0; (* Default limit*); ALARM_COUNT: INT := 0; (* No alarms *) END_STRUCT; END_TYPE TYPE DEVICE_MODE: (INITIALISING, RUNNING, STANDBY, FAULTY ) := STANDBY; (* Default enumerated value *) END_TYPE
In array initialisation, each element in the array can be assigned a value. In the following example the first ten elements are assigned the value 1.1, the next five the value 1.3 and the last five the value 1.7.