L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual
Page 965

L-force | PLC Designer
Programming Reference
DMS 4.1 EN 03/2011 TD29
963
Function block instances and variables of user-defined data types as a prefix get a
shortcut for the FB- resp. data type name (for example: sdo).
Example:
cansdoReceivedTelegram: CAN_SDOTelegram;
TYPE CAN_SDOTelegram : (* prefix: sdo *)
STRUCT
wIndex:WORD;
bySubIndex:BYTE;
byLen:BYTE;
aby: ARRAY [0..3] OF BYTE;
END_STRUCT
END_TYPE
Local constants (c) start with prefix c and an attached underscore, followed by the type
prefix and the variable name.
Example:
VAR CONSTANT
c_uiSyncID: UINT := 16#80;
END_VAR
For Global Variables (g) and Global Constants (gc) an additional prefix + underscore is
attached to the library prefix:
Examples:
VAR_GLOBAL
CAN_g_iTest: INT;
END_VAR
VAR_GLOBAL CONSTANT
CAN_gc_dwExample: DWORD;
END_VAR