The Heidenhain Plugin allows to continually Poll errors, COM-functions as well as memory areas of Heidenhain PLCs.
As opposed to other Senseforce Edge plugins, the Heidenhain plugin is not directly delivered with the Senseforce Edge main application.
Contact Senseforce to get access to the Senseforce Heidenhain PLC plugin.
Due to limitations in the Heidenhain communication protocol, the plugin is only available for Windows 7 and Windows 10 64 Bit operating systems.
Installation
The Heidenhain Plugin is distributed as Windows installer as well as archive, containing the plugin binaries.
Using the Windows Installer
When using the Windows installer, an install wizard will guide you through the installation.
It is advised to install your Senseforce Edge main binaries first. Secondly, install the Heidenhain plugin into the folder "[YourEdgeFolder\Plugins\Ingress\Heidenhain". (Eg. in the Screenshot above, the Senseforce Edge main application was installed to C:\Program Files\Luna\.).
Finish the installation wizard and your binaries as well as a set of default configurations will be installed to the specified location.
For best user experience, copy the default configurations into the folder, where your configurations for the other plugins are located.
(If you run the Edge as console application: [Edge Main Folder]/configs/configurations/InputPlugins/Heidenhain; if you run it as Service, it's C:/ProgramData/Senseforce/Luna Data/[YourServiceName]/configurations/InputPlugins/Heidenhain
Using the archive
Instead of using the Windows installer, you might use the plugin distributed as archive. Simply unzip the plugin files to your desired locations. It is advised to unzip it to the following folder: [YourEdgeFolder\Plugins\Ingress\Heidenhain.
The archive also contains a set of default configurations. For best user experience, copy the default configurations into the folder, where your configurations for the other plugins are located.
(If you run the Edge as console application: [Edge Main Folder]/configs/configurations/InputPlugins/Heidenhain; if you run it as Service, it's C:/ProgramData/Senseforce/Luna Data/[YourServiceName]/configurations/InputPlugins/Heidenhain
Registering the heidenhain dll
As the Heidenhain plugin makes use from COM interops, the dll providing these functionalities needs to be registered.
Start a powershell or command prompt with elevated permissions.
Navigate to the install directory of the Heidenhain plugin
Run .\as_admin_registerx64.bat
If you want to unregister the dll again, run .\as_admin_unregisterx64.bat
This manual registration process is only required for the installation Using the archive. If you use the Windows installer, you don't need to manually register the dll.
Configuration
The following section describes how to configure the HeidenhainSettings.xml - the main configuration file for the Heidenhain plugin.
The DataMappings.xml is not described here. Use the default DataMappings.xml for most use cases.
HeidenhainSettings.xml
The HeidenhainSettings.xml is the main configuration file for the plugin and defines the network location of the PLC as well as which data should be read.
Default configuration
Find a default configuration file below, as well as descriptions of what and how to configure in the table below.
<?xml version="1.0" encoding="utf-8" ?><HeidenhainConfiguration><!-- Specify connection configuration --> <Connection><!-- Setting the type of the machine to connect to--> <!-- Possible values are: DNC_CNC_TYPE_ + ATEKM, ITNC, MILLPLUS, MILLPLUSIT, TURNPLUS, MILLPLUSIT_NCK, MANUALPLUS_NCK, ATEKM_NCK, TNC320_NCK, GRINDPLUS_NCK, TNC6xx_NCK, AR6000_NCK, CNCPILOT6xx_NCK, TNC128_NCK, GRINDPLUS640_NCK -->
<CNCType>DNC_CNC_TYPE_TNC6xx_NCK</CNCType><!-- Setting the protocol to use for the connection--><!-- Possible values are: DNC_PROT_ + LSV2, TCPIP, COM, RPC, DIO --> <Protocol>DNC_PROT_RPC</Protocol> <HostName>192.168.100.11</HostName> <Port>19003</Port> </Connection> <OnlySendChanges>true</OnlySendChanges> <Data> <NcUpTime> <PollingTimeMs>1000</PollingTimeMs> </NcUpTime> <MachineUpTime> <PollingTimeMs>1000</PollingTimeMs> </MachineUpTime> <MachineRunningTime> <PollingTimeMs>1000</PollingTimeMs> </MachineRunningTime> <SpindleRunningTime> <PollingTimeMs>1000</PollingTimeMs> <Timers> <TimerId>2</TimerId> <TimerId>1</TimerId> </Timers> </SpindleRunningTime> <DncMode> <PollingTimeMs>1000</PollingTimeMs> </DncMode> <ExecutionMode> <PollingTimeMs>1000</PollingTimeMs> </ExecutionMode> <ExecutionPoint> <PollingTimeMs>1000</PollingTimeMs> </ExecutionPoint> <OverrideInfo> <PollingTimeMs>1000</PollingTimeMs> </OverrideInfo> <ProgramStatus> <PollingTimeMs>1000</PollingTimeMs> </ProgramStatus> <CutterLocation> <PollingTimeMs>1000</PollingTimeMs> <Channels> <Channel>0</Channel> <Channel>1</Channel> </Channels> </CutterLocation> <DataEntryBlocks> <DataEntryBlock> <Password>password</Password> <AccessMode>DNC_ACCESS_MODE_PLCDATAACCESS</AccessMode> <PollingTimeMs>5000</PollingTimeMs> <Paths> <DataEntry> <Path>\TABLE\SUPPLY3\P_S6_40\'65000'\L_KDR</Path> <Unit>Metric</Unit> </DataEntry> </Paths> </DataEntryBlock> <DataEntryBlock> <Password>password</Password> <AccessMode>DNC_ACCESS_MODE_PLCDATAACCESS</AccessMode> <PollingTimeMs>1000</PollingTimeMs> <Paths> <DataEntry> <Path>\PLC\program\main\apiVersion</Path> <Unit>Metric</Unit> </DataEntry> <DataEntry> <Path>\PLC\program\main\active</Path> <Unit>Metric</Unit> </DataEntry> </Paths> </DataEntryBlock> </DataEntryBlocks> <Errors> <PollingTimeMs>1000</PollingTimeMs> </Errors> <State> <PollingTimeMs>1000</PollingTimeMs> </State> <VersionComInterface> <PollingTimeMs>1000</PollingTimeMs> </VersionComInterface> <ChannelInfo> <PollingTimeMs>1000</PollingTimeMs> </ChannelInfo> <AxisInfo> <PollingTimeMs>1000</PollingTimeMs> </AxisInfo> <Sik> <PollingTimeMs>1000</PollingTimeMs> </Sik> <NcVersion><!--You may set negative values for PollingTime - to tell the edge to only poll it once during startup.--> <PollingTimeMs>-1</PollingTimeMs> </NcVersion> </Data><!--Specify file for message mapping--> <Mappings> <FilePath>$(LunaAppDataPath)configurations/InputPlugins/Heidenhain</FilePath> <FileName>DataMappings.xml</FileName> </Mappings><!--Specify file for logging--> <Logger><!--LogLevel: Debug,Information,Warning,Error,Critical,None--> <LogLevel>Information</LogLevel> </Logger></HeidenhainConfiguration>
Setting
Description
CNCType
Defines the Type of PLC. Possible types are:
DNC_CNC_TYPE_TNC6xx_NCK
DNC_CNC_TYPE_ATEKM
DNC_CNC_TYPE_ITNC
DNC_CNC_TYPE_MILLPLUS
DNC_CNC_TYPE_MILLPLUSIT
DNC_CNC_TYPE_TURNPLUS
DNC_CNC_TYPE_MILLPLUSIT_NCK
DNC_CNC_TYPE_MANUALPLUS_NCK
DNC_CNC_TYPE_TEKM_NCK
DNC_CNC_TYPE_TNC320_NCK
DNC_CNC_TYPE_GRINDPLUS_NCK
DNC_CNC_TYPE_TNC6xx_NCK
DNC_CNC_TYPE_AR6000_NCK
DNC_CNC_TYPE_CNCPILOT6xx_NCK
DNC_CNC_TYPE_TNC128_NCK
DNC_CNC_TYPE_GRINDPLUS640_NCK
Note: Currently only DNC_CNC_TYPE_TNC6xx_NCK is used in production
Protocol
Connection protocol to use. Allowed values are:
DNC_PROT_LSV2
DNC_PROT_TCPIP
DNC_PROT_COM
DNC_PROT_RPC
DNC_PROT_DIO
Note: Currently only DNC_PROT_RPC and DNC_PROT_TCPIP is used in production
HostName
IP-Address/Hostname of the PLC. Needs to be reachable by the host where the Edge is running on.
Port
Port of the PLC to connect to.
OnlySendChanges
DefDefines, whether only changes in data should be transmitted, or each value at each polling cycle. This setting applies to all the defined data.
If you have some data which you want to send with OnlySendChanges enabled and some where you have OnlySendChanges disabled, it is advised to load a second plugin.
Data
The data configuration section contains all the data definitions you want to read from the PLC. You can define the following data types to read. Unless noted otherwise, you can specify each data point only once.
PollingTimeMs: For all data points, you can add a setting "PollingTimeMs" to specify the polling interval in milliseconds.
You may set PollingTimeMs to "-1" - than the corresponding data point is only read once at the startup of the plugin.
NcUpTime: Uptime of the NC, in seconds
MachineUpTime: Uptime of the Machine, in seconds
MachineRunningTime: Running time of the machine, in seconds
SpindleRunningTime: Running time of one or several spindles, in seconds
Define for which Timers you want to read the data, by specifying one or several TimerId-settings inside the Timers configuration Example:
Errors: This will read all related information to currently active errors. A separate message will be generated, if an error is not active anymore. The following information are available:
Handle
TimeStamp
Text
Number
Location
Group
Action
Cause
Channel
Class
Description
Internals
IsActive
State: Gets the state of the dnc communication interface, as numeric representation of the enum. Possible values are:
0...DNC_STATE_NOT_INITIALIZED
1...DNC_STATE_HOST_IS_NOT_AVAILABLE
2...DNC_STATE_HOST_IS_AVAILABLE
3...DNC_STATE_WAITING_PERMISSION
4...DNC_STATE_DNC_IS_AVAILABLE
5...DNC_STATE_MACHINE_IS_BOOTED
6...DNC_STATE_MACHINE_IS_INITIALIZING
7...DNC_STATE_MACHINE_IS_AVAILABLE
8...DNC_STATE_MACHINE_IS_SHUTTING_DOWN
9...DNC_STATE_DNC_IS_STOPPED
10...DNC_STATE_HOST_IS_STOPPED
11...DNC_STATE_NO_PERMISSION
VersionComInterface: Gets the version of the com interface.
ChannelInfo: Lists all channels as well as the axes correlated to each channel.
AxisInfo: Gets descriptions for all axes. The following information are provided per axis:
BstrAxisName
LAxisId
AxisType
Sik: Gets the System Identification Key of the PLC.
NcVersion: Gets the version of all the softwares involved. Eg.
"DNC_SW_TYPE_NCKERN": "597110 14",
"DNC_SW_TYPE_MC": "817601 07 ",
"DNC_SW_TYPE_PLC": "501_81_07_0300",
"DNC_SW_TYPE_CC": "340542.14.0",
"DNC_SW_TYPE_FS_MCU": "340507.14.00.01",
"DNC_SW_TYPE_FS_CCU": "340544.14.0"
DataEntryBlocks
Besides the above information coming directly from the COM interface, you may also directly access DataEntries in the PLCs memory.
You can create one or several DataEntryBlock-elements inside the DataEntryBlocks-section. The DataEntries inside one Block are sent in one combined messages (this means they are visible in one line in the dataset editor).
DataEntryBlock
Define one or several blocks for DataEntries. Per DataEntryBlock you might define:
AccessMode: The Heidenhain GetDataEntry Access mode to use. Depending on which memory area to access, use the corresponding value. For allowed values see chapter Possible values for DataEntry access modes in this page. For more details also refer to the Heidenhain DNC manual.
Password: Password to be used to access the configured AccessMode
PollingTimeMs: specify the polling interval in milliseconds.
One or several DataEntry sections
Per DataEntry, define:
Path: Where to read the DataEntry. Needs to be Heidenhain DataEntry Path.
Unit: Metric or Inch
Each DataEntry inside a single DataEntryBlock will be combined into one message, while DataEntires in different DataEntryBlocks will be sent in different messages.
Please note, that you can't mix AccessModes inside a DataEntryBlock. Paths from different Access-Locations need to be configured into different blocks!