Beckhoff Automation GmbH & Co. KG TX1200 — 7.6 Programming conventions for creating the IEC61131-3

Reference programming TcTempCtrlBC.Lb6 Identifier The identifier should be named with a uniform prefix, so that the object type can easily be recognised. The recommended conventions are listed below: Definition of object names Generating instances of objects Generating instances of variables Other prefixes that may also be used Upper / lower case The object name prefix will always be upper case. Underscore (_) is used as a separator between prefix and object name. For variable and instance names, the prefix will always be lower case. The first letter of an identifier will always be upper case. If an identifier consists of several words, the first letter of a word will always be upper case.

Separators (e.g. _ ) between the two words should not be used (see examples above). TX1200 250 Version:

1.3 Object Prefix Description Example FUNCTION BLOCK _ FB _ Function Block FB GetData _ STRUCT ST _ Structure ST BufferEntry _ ENUM E _ Type of Enumeration E SignalStates _ TYPE T _ Reference T Nibble _ PROGRAM P _ Program P Axis _ FUNCTION F _ Function F Convert _ Object Prefix Description Instance Call example function block fb Instance name from function block fbGetData fbGetData(); struct st Instance name of the structure stBufferEntry stBufferEntry.nCounter := 5; enum e Enum instance eSignalState eSignalState := E STOP; _ alias type none Instance name of a reference type Nibble Nibble := 1; Type Prefix Description Example SINT, USINT, …, DINT, UDINT, BYTE, WORD, DWORD, LWORD....

n, i numeric / integer nCount, iError BOOL b bit bSwitch REAL, LREAL f float fValue STRING s string sName TIME t time tDelay DATE d date dMonday DATE AND TIME _ _ dt date and time dtNewYear ARRAY[...] OF ... arr arrays arrMessages p p pointer pData Prefix Description Example cb count of bytes cbLength cw count of words cwRead