This highly configurable Heidenhain device driver for CNCnetPDM enables you to acquire and output machine-, process- and quality data from machines with Heidenhain TNC 426, 430, 320, 620, 640 and iTNC 530 controllers, see adapted controllers
You can dynamically define your own set of items (up to 30) that can be enabled and disabled on a per machine basis by an INI file that is automatically created with reasonable default values for each machine configured. This INI file also allows you to define your own names for every tag.
For bidirectional communication between machines with Heidenhain controllers and your applications you can use our free Open Source Client (C-Sharp)
This device driver requires the most recent version of CNCnetPDM and also works with a free license. However, in this mode you only get output for the first item configured in your INI file. With a valid license you are able to output the result of up to 30 functions per reading cycle, see licensing for details.
Download the Heidenhain driver, extract all content of heidenhain_dll.zip into the folder where you have CNCnetPDM installed.
Edit CNCnetPDM.ini and add a new device as described in the quick start guide point 7. If you already have an entry in section [RS232] for a machine with a Heidenhain controller you can simply copy and paste this line and change its content.
Change the line as follows:
FIG 1: Configure Heidenhain device driver in CNCnetPDM.ini
For machines with Heidenhain controllers the following 3 parameters are important
Right to the IP Address of the controller (here 18.104.22.168) enter number 19000 (=port)
Right to the DNS Hostname of your machine (here AXA1012) enter a unique sequential number (here 1) between 1 and 58 for every Heidenhain controller connected to CNCnetPDM.
This device driver enables to dynamically add, group, enable or disable items and change their names. The INI file automatically created by the device driver for every machine contains sections that allow you to control its behavior.
Section [GENERAL] contains information about global parameters used by the driver on startup, please only change the value from iTNC530 = 0 to 1 if you’re using an iTNC530 controller! Commands defines the number of commands you’d like to execute, maximum value = 30.
Items you query are organized in sections e.g. . Every section contains entries where you can define names and parameters for a specific item.
Description of the numeric sections:
Section identifier, numbers starting with 2 are queried
If you set this to 0 the command is not executed
A short name (max 5 characters) to describe the item e.g. STATN for status number
A comment that describes the command (optional)
Command to be executed e.g. cnc_oeestatus for the command group that contains running status. To change a command select an available command group, copy it and paste it into the INI file.
Input parameter 1
For some commands input parameters can be used to set an input parameter (PLC), control output formatting e.g. program name with or without path or a divisor for an output value, see the command description.
Input parameter 2
Necessary for some commands (default -1)
Most command groups have sub-commands that enable you to define a specific item to be output by the driver e.g. statenumber from cnc_oeestate outputs the device state.
You can output data to 3 sections that may contain up to 256 characters. 1 goes to section ‘O’, 2 to ‘A’ and 3 to ‘F’. If data in one section exceeds the maximum length you can send items to a different section. Make sure you have entries CollectOrders, CollectFeeder and CollectQuality enabled (=1) in CNCnetPDM.ini.
FIG 4: Description of a device INI file section
Note: To change commands, switch items on or off or alter its name while CNCnetPDM is running open the INI file with a text editor such as notepad, make the desired changes and save the file. To apply the changes immediately you can click on the machine in CNCnetControl on the left side followed by clicking buttons ‘Close’ and ‘Open’ above the section ‘Devices’. TOP
Below you can find commands and output items that can be used with this driver.
Important note: Almost all of the items with note ‘iTNC530 only’ can also be output from Heidenhain TNC 426, 430, 320, 620 and 640 controllers by using plcbyte, plcword or plcdword commands. Please contact us in this case for detailed instructions.
Numeric OEE state of the device (2 = producing, 3 = manual, 4 = interrupted, 5 = error)
State of the device as text (producing, manual, interrupted, error)
Numeric running mode of the controller (0 = Manual, 1 = MDI, 2 = Pass Reference, 3 = Single Step, 4 = Automatic, 5 = Undefined)
Output item = item to be queried (iTNC 530 only). In this example a value from the tool table is read.
FIG 5: Description of available command groups and output items TOP
To quickly test and build a working INI file for your controller you can use our tool devicedrivertester. If used with this driver the program creates INI file heidenhain.ini. To use this file for CNCnetPDM you can simply append an underscore and the machine number e.g. heidenhain_1001.ini for device number 1001.
If you want to add additional items (up to 30 in total) first adjust the number of commands in section [GENERAL]. Then, copy and paste the last numeric section and adjust the section number and its content. TOP
The device driver writes a log file entry for any communication issue to the log file of the device. The file can be found in subdirectory \log of your CNCnetPDM program folder. The file format for the log file is log_ + device number + _ + date.txt. Please check this file first if you observe an issue.
If the machine shows a red icon, state disconnected and you get just output E = 0 the machine is not reachable at all. This has nothing to do with the device driver, it’s a network issue, DNS Hostname or IP Address is wrong.
If the machine shows a green icon, state connected but you just get output E = 1 the machine is reachable but the controller does not respond to commands, check your controller setup and the parameters used in CNCnetPDM.ini (esp. port number).Please use the tool HeidenhainData to check if the machine replies to commands.
If you do get numeric device states but not any of the preconfigured items please make sure that entries CollectOrders, CollectQuality and CollectFeeder are set to 1 in section [General] of CNCnetPDM.ini.
If specific items are not acquired check first with HeidenhainData that you get output. Also make sure that the numeric section of the item in the device drivers INI file is activated and has an entry for ‘Name’, inactive or items with empty names are not acquired. Also check that you didn’t misspell entries for command and output item in your device driver INI file. TOP