For controllers starting with TNC 320 up to TNC 7 Heidenhain uses the concept of access to Programmable Logic Controller (PLC) addresses by symbolic names. As the same name may lead to different numeric addresses on every single machines PLC data mandatorily has to be read and written by usage of symbolic names.
CNCnetPDM fully supports reading from and writing to symbolic TNC PLC address names without the need for additional COM(DCOM) server components at your PC that only work for controllers with Option 18 (DNC).
For Heidenhain iTNC 530 and older controls it was possible to access data for specific items at the machine’s PLC by using fixed numeric addresses f.i. DWord 360 for ‘Programmed feed rate’.
Starting with TNC 320 this technique changed to symbolic names that point to numeric addresses in specific areas (Marker, Byte, Word, DWord) of the PLC. Although many symbolic names are standardized like NN_CHNPROGFEEDMINUTE for ‘Programmed feed rate per minute’ they usually lead to different PLC addresses on every single machine f.i. DWord 4420 in a basic PLC program but DWord 5020 on a GF Mikron S 600 milling machine.
As machine manufacturer specific extensions or additions like bar feeders or handling robots are also added to the machine’s PLC program and get their own names the number accessible items highly differ on every machine, from 10,000 in a basic program up to 39,000 on specific GF milling machines.
A major benefit of this concept is that there is no need to know the data type and numeric address of a specific item as the symbolic name automatically points to its correct location.
PLC Data Structure
PLC data on Heidenhain TNC 320 -> TNC 7 controls is organized in a group structure. Top group ‘Global’ is available on all models. Items in this group can either be accessed directly f.i. NN_DG_TOOL_NUMBER for actual tool number or by a prefixed subgroup f.i. APICHN[0].NN_CHNPROGFEEDMINUTE for programmed feed rate per minute of channel 1.
These subgroups can be unique like APIGEN for general data or have an index appended e.g. APISPIN[0] for the first spindle. The following subgroups under ‘Global’ should be present on every controller:
Name
Description
APIGEN
General data
APIOMG[0]
Operating modes [number of operating mode group]
APICHN[0]
Machining channels [channel number]
APIAXIS[0]
Axes [axis number]
APISPIN[0]
Spindles [spindle number]
FIG 3: Default PLC data subgroups under group ‘Global’
The number of operating mode groups, channels, axes and spindles configured for a specific machine can be queried by reading following symbolic PLC names:
Name
Description
APIGEN.NN_GENOMGCOUNT
Number of configured operating mode groups
APIGEN.NN_GENCHNCOUNT
Number of configured machining channels
APIGEN.NN_GENAXCOUNT
Number of configured logical axes including spindles
APIGEN.NN_GENSPICOUNT
Number of configured spindles
FIG 4: Commands to read number of operating mode groups, channels, axes and spindles
Below you can find examples for symbolic PLC address names that should be readable from all controllers:
Symbolic PLC Address
Description
APICHN[0].NN_CHNPROGFEEDMINUTE
Programmed feed rate per minute [mm/min] machining channel 1
APICHN[0].NN_CHNPROGFEEDREVOLUTION
Programmed feed rate per revolution [mm/rev] machining channel 1
APICHN[0].NN_CHNPROGFEEDTHREAD
Programmed feed rate per thread [mm/rev] machining channel 1
APICHN[0].NN_CHNCONTOURFEED
Current contouring feed rate [mm/min] machining channel 1
APICHN[0].PP_CHNCONTOURFEEDMAX
Max. feed rate from PLC [mm/min] machining channel 1
APISPIN[0].PP_SPISPEEDMAX
Maximum spindle speed spindle 1
APISPIN[0].NN_SPIOVERRIDEINPUT
Speed override set [%] spindle 1
APISPIN[0].PP_SPIOVERRIDE
Speed override entered by the PLC [%] spindle 1
APICHN[0].NN_CHNFEEDOVERRIDEINPUT
Feed-rate override set [%] machining channel 1
APICHN[0].PP_CHNFEEDOVERRIDE
Feed-rate override entered by the PLC [%] machining channel 1
APICHN[0].NN_CHNRAPIDFEEDOVERRIDEINPUT
Rapid traverse override set [%] machining channel 1
APICHN[0].PP_CHNRAPIDFEEDOVERRIDE
Rapid traverse override entered by the PLC machining channel 1
Maximum axis feed rate in all operating modes [mm/rev] SW < 597110-06 axis 1
APIAXIS[0].PP_AXFEEDMAX
Maximum axis feed rate in all operating modes [mm/rev] SW >= 597110-06 axis 1
FIG 5: Examples of symbolic PLC address names
EXTRACT SYMBOLIC NAME DEFINITIONS
To be able to read and write from/to symbolic addresses CNCnetPDM has to know the symbolic names defined for your machine. Definitions can be read from a service file generated by the controller.
Connect to the machine with TNC Remo click [Extras] (1) and select [Create Service File] (2). The controller generates a service file in ZIP format and stores it in TNC folder \service (3). Select the file and transmit it to a directory on your PC (4). After transmission it is save to delete the service file at the controller.
FIG 6: Create service file with TNC Remo
On your PC open the ZIP file, navigate to folder \SYS_\runtime\ and only extract file ‘PlcDataMarker.txt’ to subfolder \plcdatamarker\ of the directory where CNCnetPDM is installed.
Note: If you have multiple machines with Heidenhain TNC controllers rename file ‘PlcDataMarker.txt’ to be able to identify each machine e.g. ‘PlcDataMarker_Cheto.txt’.
All done, now you’re ready to read and write Heidenhain PLC data with CNCnetPDM by using symbolic names.
Privacy notice
This website uses cookies. By continuing to use it you agree to our privacy policy.