Skip to main content

For Custom Data Types in CODESYS V3 Libraries

Identifier designation recommendation for

Description

Example

DUTs in CODESYS 3 libraries

The namespace replaces the need for the library prefix. Therefore, it is omitted. Enumeration values are also defined without a library prefix.

Library with CAL namespace:

TYPE DAY :
(
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
SUNDAY
);

Declaration:

eToday: CAL.Day;

Usage in the application

IF eToday = CAL.Day.MONDAY THEN