For newer Heidenhain machine controllers ‘DNC Option 18’ can be purchased optionally. Without it most of the high level language commands to communicate with the equipment from a remote PC are not available. However, even in this case CNCnetPDM allows reading and writing of data. This article describes all steps to setup data acquisition without DNC option 18.
If the DNC option is not activated the controller refuses to output most information related to machine status to remote devices. If you get output like the following with HeidenhainData or CNCnetPDM just outputs OEE status 1 or 5 even if everything is setup correctly you should check availability of the option.
FIG 1: HeidenhainData output without DNC option 18 (TNC 640)
Note: To review the activation status simply switch the controller to programming mode, press the [MOD] button and enter code-number SIK. If, under SIK Options, HEIDENHAIN DNC is unchecked the option is not activated.
With CNCnetPDM the required data can be acquired by reading it directly from the machine’s Programmable Logic Controller (PLC). To do so you have to modify the INI file that is automatically created by CNCnetPDM for the respective machine on first startup e.g. heidenhain_1000.ini for equipment number 1000.
iTNC 530 CONTROLS
This and all older types set PLC marker address values to 0 or 1 according to the actual machining mode (manual, automatic…) and program state (running interrupted…). As the addresses have fixed values it is sufficient to change entry ‘Legacy PLC’ from 0 to 1 in section [GENERAL] of the devices INI file. In addition deactivate commands that are only supported with Option 18.
TNC 320, 620 and 640 CONTROLS
Although these models also keep track of machining mode and program state in their PLC their address location can differ even between machines as the machine manufacturer can freely assign them. So knowledge about area and address of the required items is required to get correct output.
To inform CNCnetPDM that no DNC option is available change entry ‘No DNC Option’ in section [GENERAL] from 0 to 1, make sure that ‘Legacy PLC’ is set to 0.
As these NCK based devices usually store mode and state information in the PLCs Double Word (DWord) area change ‘PLC Marker Command’ from plcmarker to plcdword. Possible commands are plcmarker, plcbyte, plcword and plcdword.
To correctly detect the machine state CNCnetPDM needs to know the numeric PLC addresses of operation modes and program states. As these Computer Numerical Controls (CNC) use symbolic names that point to numeric addresses the next step is to check their actual assignment at the controller.
At the machine’s operator panel switch to mode ‘Programming’ (1), press key [MOD] and enter code number 807667 or the machines PLC password (2).
FIG 2: Access Heidenhain PLC DWORD address area (TNC 640)
Next, press key below [TABLE] (3) followed by [B/W/D/S] (4). Then, press [DWORD] (5) and [HEX<->DECIMAL] (6). Scroll down to address D4120. Find the following symbolic names and note down their addresses (7). See the tips section for help on searching. The PLC addresses in the following table refer to the ‘Basic PLC program’. Adresses on your controller may differ from these values.
OP Automatic single
OP Automatic full
PR Error active
PR Stopped ext.
PR Stopped ext.
PR Emergency A
PR Emergency B
PR Emergency C
FIG 3: PLC Addresses, items and symbolic names
Next, adjust section [MARKERS] in the device INI file and change the numeric values of the OP and PR items according to their assignment at your control e.g.:
[MARKERS] PLC Marker Command = plcdword OP Manual = 4136 OP MDI = 4144 OP Handwheel = 4140 OP Automatic single = 4148 OP Automatic full = 4152 OP Traversing = 4156 PR Running = 4352 PR Interrupted = 4360 PR Error active = 4304 PR Stopped extern = 4308 PR Stopped intern = 4316 PR Emergency A = 4324 PR Emergency B = 4328 PR Emergency C = 4332 PR Finished = 4368
FIG 4: INI Marker section for TNC 640 (Basic PLC program)
DISABLE UNSUPPORTED COMMANDS
For controls without DNC option 18 you have to disable output from all numeric sections  -  that contain one of the following commands by setting ‘Active’ to 0.
FIG 5: Commands not supported without DNC option 18
Use HeidenhainPLC to check if the PLC address output values change according to the machines mode and program state. DWord values change from 0 to +255 if a marker gets activated.
At the PLC symbolic names are organized in groups: General data APIGEN Operating modes APIOMG[OMG_COUNT] Machining channels APICHN[CHANNEL_COUNT] Axes APIAXIS[AXIS_COUNT] Spindles APISPIN[SPINDLE_COUNT]
To search for a specific symbolic name just scroll down in the selected PLC area until you find an item that starts with the group of the desired symbolic name. The groups usually start above address 4000. Then, navigate through the entries until you find the required name.
Most output of commands that are not supported without DNC option 18 can also be read from the machine’s PLC by using commands plcmarker, plcbyte, plcword, plcdword or parameter. Examples (DWord values): SPINDLE.DG_RPM = Spindle Speed APICHN.NN_CHNPROGFEEDMINUTE = Programmed Feed APICHN.NN_CHNCONTOURFEED = Feed Rate APICHN.NN_CHNAFCSPINDLELOAD = Spindle Load < Global >\NN_DG_TOOL_NUMBER = Actual Tool Number
For details review the technical documentation of the machine or ask your machine manufacturer.
On NCK based controllers (TNC320, TNC 620, TNC640) the assignment of numeric values to symbolic names can also be found out by creating a service file. To do so either press [ERR] + 'Create Service File' at the controller or, in TNCRemo, select 'Extras' + 'Create Service File'. The controller then locally stores a zipped service archive in a selected folder. If you open the archive with TNCRemo you can find file PlcDataMarker.txt in folder \SYS_\runtime\ that contains the required information.