Identifiers for POUs and DUTs

When naming POUs and user-defined data unit types (DUTs), you should consider the following points.

Static Analysis:

Also note the option to check programming conventions using TE1200 PLC Static Analysis.

Prefixes:

Object

Prefix

Description

Sample

Static Analysis
Name Convention ID

FUNCTION_BLOCK

FB_

Function block

FB_WritePersistentData

NC0103

ACTION

 

Action (of a function block or a program)

MoveAbsolute

NC0106

METHOD

 

Method (of a function block or an interface)

Reset

NC0105

PROPERTY

according to the return type (see Identifiers for variables and instances)

Property (of a function block, a program or an interface)

nErrorID
fMotorTempC

NC0107

 

See also:

Placeholder {datatype}

PROGRAM

 

Program

ModuleControl

NC0102

FUNCTION

F_

Function

F_MeterToInch

NC0104

STRUCT

ST_

Structure

ST_BufferEntry

NC0151

ENUM

E_

Enumeration type

E_MachineState
E_Quality

NC0152

Type

T_

Alias type

T_Nibble

NC0154

UNION

U_

Union

U_Control

NC0153

INTERFACE

I_

Interface

I_Cylinder

NC0108

GVL

GVL as name or GVL_ as prefix

Global Variable List

GVL
GVL_Axis
GVL_Subsystem

 

GCL

Global constant list

GCL

 

Param

Param as name or Param_ as prefix

Global parameter list

Param
Param_Subsystem

 

If a property <name> is directly represented by a variable of the function block, this variable is referred to as _<name>.

Enumeration:
When defining an enumeration, use the attribute {attribute 'qualified_only'}, which simplifies the use of the enumeration and at the same time makes it unnecessary to abbreviate the enumeration type. See also the topics Use attributes 'qualified_only' and 'strict' for enumeration in section Programming.

{attribute 'qualified_only'}
{attribute 'strict'}
TYPE E_SignalStates :
(
     Red    := 0,
     Yellow,
     Green
);
END_TYPE