Here you can find everything you need to know to get started with the CNCnetPDM MTConnect adapter. This section shows all necessary steps to setup CNCnetPDM, use the MTConnect agent test program, receive adapter output and control agent output. A description of available commands to control the adapter is also included.
It is highly recommended to begin with a simple configuration. To do so, please configure CNCnetPDM as described in the Quick Start Guide with one device and the simulation device driver device.dll. In addition please set in section [General] of CNCnetPDM.INI:
In case you access CNCnetPDM from a remote PC make sure that TCP port 7878 is not blocked by a firewall.
If you start CNCnetPDM you see output similar to the following in CNCnetControl, just OEE device states (E) and part counters (Z). TOP
FIG 1: CNCnetPDM output
MTConnect Agent Tester
Next you need the program MTConnect.exe which is a Windows Socket Client and contains basic MTConnect Agent functionality and can be used to test any MTConnect Adapter, not just CNCnetPDM. TOP
Close CNCnetControl and double click MTConnect.exe. If CNCnetPDM is running on the same PC you just have to click [Connect]. Otherwise you have to enter the IP Address or DNS Hostname of the PC running CNCnetPDM (1) and the appropriate Port (2) default = 7878 before doing so.
Initially the adapter outputs one line with ALL items (3) acquired from your device to the agent. After that, the adapter outputs only data for items that have changed (4).
As described in ‘MTConnect Overview’ a line output by the adapter starts with a timestamp in UTC followed by key | value pairs delimited by a pipe character ‘|’. A key is built by the Tag Name you defined in your device specific INI file prepended by the machine number as defined in CNCnetPDM.ini. Both items are separated by the colon character ':'.
Note: Diagnostic messages output by MTConnect.exe like ‘Agent received: ’ are added by MTConnect.exe, they are not part of the adapter output. TOP
By sending commands from the agent to the adapter you can control various features of the MTConnect adapter.
To check the adapter you can use the command:
If you send this command to the adapter by clicking [Send Command] the adapter responds with * PONG plus the heartbeat in milliseconds as configured in section [MTC Adapter] of CNCnetPDM.ini. TOP
As every single instance of the CNCnetPDM MTConnect Adapter can simultaneously communicate with up to 58 machines you have to be able to control output to the agent. Initially the adapter outputs data for all devices. To switch on data output to the agent for a single device only you can use the following command:
This would force the adapter to only output data for machine number 1000 to the agent. After changing adapter output the agent initially outputs all data items for the selected device followed by data for changed items only. To revert to output for all devices you can use:
Please note that this command only affects the specific agent session it was sent from. If you open an additional instance of MTConnect.exe you can make a different selection. TOP
Switch Device Off or On
To switch off communication between a specific device and CNCnetPDM you can use command:
This command affects ALL agent sessions connected to a specific instance of CNCnetPDM. To switch on communication again you may use:
To be able to collect machine data together with operational data the devices have to know which work-order, operation and/or part number they’re currently working on. To do so you can ‘tag’ devices with this information.
For example, if you’d like to ‘tag’ machine number 1000 with work-order 4711, operation 10 and part number 9000 you could issue the following command:
Device number 1000 then outputs this data together with machine data in a single line, again as key | value pairs for example:
The CNCnetPDM MTConnect adapter also allows you to set or change parameters or variables at your devices directly from an agent. However, this strongly depends on the setup of your device specific .INI file.
If, for example you have a machine with number 1000 and a Sinumerik controller that uses the sinumerikda.dll OPC device driver CNCnetPDM automatically creates the INI file sinumerikda_1000.ini. In this file you can find a list of commands. Command number 21 is used to read 'R Variable 2'.
However, this command is also writable. So, input of command:
results in setting 'R Variable 2' at the controller to value 256. You can quickly check the result by watching the output of MTConnect.exe TOP