7 – 50 HEIDENHAIN Technical Manual TNC 426, TNC 430 
7.6 PLC Program Example
The following PLC program example was written on a PC with the PLC 
programming software PLCdesign. PLCdesign is supplied together with 
additional comprehensive PLC program examples in data form.
The PLC program is divided into various PLC modules, where each module 
performs a specific task. This will help you to quickly recognize the program 
structure and easily insert your own functions.
A file known as the documentation file describes the PLC programming 
example, which can be output by PLCdesign in addition to the individual PLC 
programs (see the User’s Manual for the PLCdesign PLC programming 
software). In the right column of the documentation file you will find the 
source code of the individual modules. This was created by the programmer 
using symbolic operands and label names. The left column shows the 
statements lists (STL) as they are needed by the TNC. The compiler 
automatically generates these statement lists.
This juxtaposition of source code and statements list is very helpful for 
understanding the program. Abbreviations were defined for the symbolic label 
numbers and symbolic operands contained in the source code. These 
abbreviations clearly identify the functions and thereby make the program 
more understandable.
The following is an example for the definition of a general symbol name, in 
which individual concepts are separated by an underline “_”:
MG_active_PWM_axis
Special cases Interface operands PLC-NC or NC-PLC, inputs and outputs, timers and 
counters, and positive and negative edge markers are always globally effective 
and are therefore not indicated as such.
Example NP_M2008_X_InPos
I_release_tool
TS_5_clamp_unclmp
CS_RS_Err_ReStart
Description of operand function by any text
Separator
Status: Enter if the operand type is not
specified.
Input:  L = locally effective (only in the module)
G = globally effective (in all modules)
Input for operand type: M, B, W, D, K