(CAA_Types.library)
The more code they share the more probable it is for libraries to show the same behaviour on different platforms. The realization of this principle for CoDeSys V3 is to be made easier with the following data types. Libraries are to be able to assess at compile time which one of the three possible implementations (large, medium, small) is to be chosen for a certain task.
{IF hastype(variable:usgValue, ULINT)}
(* process ULINT value *)
{ELSIF hastype(variable:usgValue, UDINT}
(* process UDINT value *)
{ELSIF hastype(variable:usgValue, UINT}
(* process UDINT value *)
{ELSE}
{error „please use one of these types ULINT, UDINT, UINT“ compile}
{END_IF}