Heidenhain DataLogger
This tutorial uses the Heidenhain Simulator. It shows how a simple CSV data logger can be configured with HumanOS.
Preconditions
-
HumanOS IoT Designer installed on development client (Check Installation Manual)
-
HeidenhainDNC installed on the development client.
The HeidenhainDNC manages the connections to different Heidenhain Controllers.
Download the HeidenhainDNC here. -
Heidenhain Simulator for iTNC530 installed on the development client.
Download the Heidenhain Simulator for iTNC530 here
Step 1: Setup connection to Heidenhain Controller (Simulator)
-
Start the Heidenhain Simulator (Icon on the Windows Desktop)
-
Make sure the Heidenhain DNC is configured correctly.
- See tutorial 2 how to setup Heidenhain DNC or
- See the Heidenhain manual for more details.
Step 2: Create a IoT Project with DataLogger
-
Create an empty IoT designer project
-
Add a Heidenhain OEE device template to your project
-
Select the
Plugins
folder within yourdefault
-target and add new content. Press [+]-button -
Open the plugin settings from
HumanOS.PeSeL.CsvDataLogger
and select the root node calledPlugin Configuration
. Press [+]-button to add a new configuration. -
Change the file name of the CSV settings to
C:\Temp\HeidenhainData.csv
.- Activate the
Print Header Row
flag - Disable the
Payload Dump Enabled
flag
- Activate the
The
Payload Dump Enabled
flag is useful for debugging and analyzing the payload of the data logger. How ever, this could lead to full disks, especially if the sampling rate is high.
- Click on the
DataSet
node- Here you see the
Node Filter
that helps to filter the data nodes needed for our CSV dump. Currently, the node filter is set tonode.hasProperty<bool>("EnableCsv", true)
- Here you see the
Typically, each data logger has its enable flag to filter nodes relevant for logging.
-
Select the Heidenhain OEE template navigate to the data node
OEEMachineState
.- Add a new property called
EnableCsv
and set the value totrue
. - Repeat it for
OEEMachineStateName
,OEEProductName
andOEEProductionStep
- Add a new property called
Step 3: Create Heidenhain Device
-
Create a Heidenhain Device within the
default
-Target. -
Deploy and run HumanOS IoT Gateway
-
Go to the simulator and run an NC program
-
Open the csv file
C:\Temp\HeidenhainData.csv
in an editor.
Extension Step 1: Alarm Event Logging
- Add a new publisher called
AePublisher
to the CSV plugin configuration.
Delete the data set coming with the publisher per default.
The CSV data logger can not handle different structured data sets in one publisher (csv file). Therefore, with a new publisher a new csv file is created.
-
Set the file name to
C:\Temp\HeidenhainAlarms.csv
and enable thePrint Header Row
flag. -
Click [+]-button to add a new dataset configuration.
-
Add the
Blank DataSet for Alarm & Events
. Set the name toAlarmDataSet
. -
Set the node filter to
node.hasProperty<bool>("EnableCsv", true)
. -
Click [+]-button to add following fields:
A&C ConditionName
A&C Alarm Message
A&C Alarm Active Flag
A&C Alarm Type
A&C Source
A&C TimeStamp
-
Select the Heidenhain OEE template navigate to the alarm event pool node
MachineAlarming
.-
Add a new property called
EnableCsv
and set the value totrue
.
Hints
- Reassign the changed device template to your Heidenhain device.
-
-
Deploy and run HumanOS IoT Gateway
-
Switch to the Heidenhain Simulator and press any non-functional key, e.g. select Manual mode and then press [GOTO].
Why is the
C:\Temp\HeidenhainAlarms.csv
not written? What do you have to do?Answer
The file is not written because alarms are not triggered by the AlarmDataSet. The cause is the missing property "EnableCsv"
- Navigate to the device template and select the MachineAlarms node.
- Add the property "EnableCsv"= true.
- Reassign the changed device template to your Heidenhain device.
- Deploy and run HumanOS IoT Gateway
-
Open the csv file
C:\Temp\HeidenhainAlarms.csv
in an editor and check if the alarm is present.
Questions
-
What do you have to do, if you want the timestamp in your
C:\Temp\HeidenhainData.csv
?Answer
A new Field "Timestamp" must be added to the DataSet configuration of the CSV plugin.
-
What is the purpose of node filter?
Answer
The node filter is used to select data nodes for logging. It helps to limit the data transfer to relevant data nodes.
Further Information
- Manual for Heidenhain Connector
- Manual for Common DataLogger Configuration
- Manual for CSV DataLogger
- Manual for HumanOS IoT Designer
Sources
- The Designer Project can be downloaded here: Tutorial 3