MachinemMetrics is able to read data from the Heidenhain iTNC530 and 640 controls (the 640 will require a Windows-based Edge Device). This article will take you through the steps necessary to enable data sharing on your Heidenhain control.
Topics covered in this article
- Enabling Remote Data Access
- Enable Option 18
- Networking / Firewall Permissions Settings
- Part Counting
- Configuration Options
- Advanced Heidenhain Tips & Tricks
Enabling Remote Data Access
Because of the option to interconnect Heidenhain controls via Ethernet, there is the risk that safety-critical machine functions can be triggered remotely without the operator noticing it. This remote access must therefore be controlled and restricted effectively. Below is a description of all mechanisms used for access restriction.
Disabling External Access
On the iTNC 530 and on the TNC 426/TNC 430 as of NC software 280476-09, a soft key for this is shown in the MOD operating mode. In order for this soft key to be visible, the machine tool builder must enter REMOTE.LOCKSOFTKEYVISIBLE=YES in the OEM.SYS file.
Current NCK-based controls (e.g. TNC640) offer the option to disable external access in the MOD settings dialog under Machine settings > External access.
With NCK-based controls and the iTNC 530 (as of NC software 34049x-03 and 60642x-01), external access to controls can be limited to specified computers.
In order to activate computer-specific access control for NCK-based controls, the machine tool builder must enter the configuration datum CfgAccessCtrl (under System->Network). If a control detects that an unauthorized client is attempting to establish a connection, the control displays a corresponding confirmation dialog.
The list of authorized clients can be edited in the MOD settings dialog under
Machine settings > External access.
On the iTNC 530, the machine operator can enter REMOTE.PERMISSION in the file TNC:\TNC.SYS. The entry contains a list of names or IP addresses of computers that are authorized for access.
Enable Option 18
An essential step to integrate your Heidenhain iTNC 530 or 640 control is to enable Option 18:
iTNC530: How to tell if Option 18 is Activated
With the machine in Programming and editing mode and a program selected, press the “MOD” button. Then enter “SIK”. This will bring up the display of options available and show if they have been enabled.
The red checkmark beside #18 indicates that Option 18 is enabled. If it is not, contact Heidenhain - they can enable this option for a fee.
Networking / Firewall Permissions Settings
The following is taken basically verbatim from the Heidenhain RemoTools SDK (which our 2.0 MTConnect adapter relies on).
You may need to make changes to your firewall settings if you want to establish a connection with a HEIDENHAIN control behind the firewall. There are two different cases, depending on the type of control.
The iTNC 530 and older controls, such as the TNC 426/430, communicate via TCP/IP using the LSV-2 protocol, and need TCP port 19000 for this. So if you want to communicate with one of these controls through a firewall, you must enable port 19000.
iTNC 640 (and all NCK-based controls)
You communicate with the TNC 640 and all other NCK-based controls via TCP/IP using RPC. In order to communicate with such controls, communication ports must be opened, and DCOM settings must be configured appropriately.
Tcp Ports for the 640:
You must enable port 19003 (outgoing connection), as well as port 19010 (incoming connection) for the reporting of events. The iTNC 640 and maybe all other NCK controls also supports the older LSV-2 protocol on port 19000: this allows our 530-designated adapter to garner some basic information from the 640 control, in which case this should opened. Note that when using the 530 adapter, DCOM settings are irrelevant.
Should you want to establish many connections in parallel, then it is recommended that you also enable ports 19011 through 19015. A port from this range is needed if a new connection is to be established and port 19010 (and perhaps other ports) are already busy establishing a connection with event registering. These ports are available again after the connection has been established.
So a client should open ports:
- 19000 and 19003 (outgoing connections)
- 19010 through 19015 (incoming connection)
- While Heidenhain documentation mentions only ports 19010 through 19015, we have observed their software opening ports from 19010 through 19034
DCOM Settings for the 640:
The following DCOM settings on a client machine are required to allow access to an iTNC 640:
Open the Windows DCOM Configuration tool (windows key-r, dcomcngf.exe), expand the Component Services / Computers nodes, right-click on My Computer. In the Default Properties tab :
- enable Distributed COM on this computer
- select None as the Default Authentication Level
- select Identify as the Default Impersonation Level
Under My Computer expand the node DCOM Config, and search for the item HeidenhainDNC Surrogate DllHost. Right-click, select Properties, and the Security tab. Customize and Edit “Launch and Activation Permissions”. In the dialog that opens, add the group INTERACTIVE (if not already present), and ensure that Local Activation is allowed for them.
When diagnosing connectivity problems, if an adapter log indicates a “COMException (0x80040201): An event was unable to invoke any of the subscribers”, this is most likely a firewall (ports) issue, while a “UnauthorizedAccessException (0x80007005): Access Denied” is most likely a DCOM permissions issue.
For more information, refer to Heidenhain Part Counting
For the Heidenhain TNC530 Integration Type, the following Adapter Script options are available:
behaviorThe adapter regularly tests connectivity to the machine. Three settings exist. Any non-default uses of these are intended primarily for very specific diagnostic purposes:
0: Use regular ICMP Ping to regularly test connectivity to the machine
1: Forgo the Ping in favor of another option (this is preferred, and is the ini file default)
0: Replace either the ICMP Ping or “TcpPing“ with an automatic success: this may slow detection of loss/gain of machine connectivity (this is preferred, and is the ini file default)
1: Use a Tcp-based connection test over port 19000. A new tcp socket is created for the test, destroyed immediately after; use only in conjunction with
- Used only when
1; must be set to
- Used only when
0: Do not send telegrams over the existing Tcp connection to test for connectivity.
1: Perform connectivity tests over the existing Tcp connection to the machine by sending a frame and receiving a response; use only in conjunction with
This is the most efficient method, preferred, and the ini file default.
behaviorThree options exist for part counting (see also Heidenhain Part Counting)
0: Collect incidents of MM-PART-COUNT from modified code (the default until version 220.127.116.11).
1: Read the PLC memory address that indicates the current count
The table type storing the part count
Use only with
The address in the table that stores the part count
Use only with
3: Use M30 or M02 entries in the Heidenhain log to detect part counts (the new default from version 18.104.22.168 on)
loggingNon-default uses of these are intended primarily for diagnostic purposes:
0: Standard logging
1: Enhanced logging (default)
0: Log all messages (default)
1: Turn off a few specific log-flooding messages when testing against an emulator or certain cnc software versions
0: Allow error reports to BugSnag (default)
1: Prevent all BugSnag reports
0: Do not report some specific network diagnostic information
1: Report some specific network diagnostic information (default)
0: Bypass test run events to ignore part counting by method 2 (default)
1: Count all parts, even during test runs
Advanced Heidenhain Tips & Tricks
On the Heidenhain MOD screen, some useful Code-numbers:
807667 “unlock everything” including access to diagnostic screens
To find the IP Address of a 640 from within the HMI, press MOD / System Settings / Network: IP Configuration:
To find the IP Address of a 530, in Programming and Editing mode press MOD, enter the keyword NET123; the Network Configuration screen will be displayed.
Please reach out to Support@machinemetrics.com.