IEC 61131-3 defines the subrange for all integer data types (ANY_INT) which excludes real values.

OPC UA has no standard concept to limit the range on the data type.

Example for a subrange data type declaration in IEC 61131-3:

TYPE

ANALOG_DATA : INT (-4095..4095) ;

END_TYPE

Example for use of a subrange in a Ctrl Variable instantiation in IEC 61131-3:

VAR

Z : SINT (5..95) ;

END_VAR

The IEC 61131-3 subrange is mapped to two OPC UA properties defined in Table 30.

Table 30 – Subrange Property Definition

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Instance of any Variable Type or a Data Type Node.

HasProperty

Variable

SubrangeMin

Number

PropertyType

Mandatory

HasProperty

Variable

SubrangeMax

Number

PropertyType

Mandatory

The Property SubrangeMin contains the lower bound of the subrange. The data type depends on the elementary data type used for the subrange.

The Property SubrangeMax contains the upper bound of the subrange. The data type depends on the elementary data type used for the subrange.

The IEC 61131-3 subrange data type is mapped to an OPC UA number data type derived from the corresponding elementary data types defined in Table 27. The data type has the two Properties defined in Table 30. The IEC example in this chapter is mapped to an OPC UA data type with the name ANALOG_DATA which is a subtype of Int16.

The IEC 61131-3 subrange in a Ctrl Variable declaration is mapped to the two Properties defined in Table 30. The Properties are children of the OPC UA Variable representing the Ctrl Variable.