News CNCnetPDM About us Support  


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.

Configure CNCnetPDM | MTConnect Agent Tester | Download | Adapter Output | Adapter Input | Ping Adapter | Select Devices | Switch Device off or on | Activate or Deactivate Shift | Work Orders | Control Devices

Configure CNCnetPDM

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:

CollectQuality = 0
CollectFeeder = 0
CollectOrders = 0

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

CNCnetPDM Output

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

Software Download

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.

MTConnect Agent Tester

FIG 2:    MTConnect Agent Tester TOP

Adapter Output

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

Adapter Input

By sending commands from the agent to the adapter you can control various features of the MTConnect adapter.

Ping 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

Select Device

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:

* device|1000|output

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:

* device|0|output
  • 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:

* device|1000|off

This command affects ALL agent sessions connected to a specific instance of CNCnetPDM. To switch on communication again you may use:

* device|1000|on


Activate or Deactivate Shift

If you like to only acquire data during an active shift you can set the shift state to active or inactive. To set the shift state of a single device to inactive you can use command:

* device|1000|shift|0

To set the shift state for all devices to inactive use:

* device|0|shift|0

To set the shift state to active for a single device you can issue:

* device|1000|shift|1

For all devices:

* device|0|shift|1

Work Orders

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|1000|order|4711|10|9000

Device number 1000 then outputs this data together with machine data in a single line, again as key | value pairs for example:


To tag a device with only one of the 3 items you can just input one of them e.g.:

* device|1000|order|4711||

This would only set work-order for machine number 1000 to 4711. You have to keep the number of pipe characters constant otherwise the command has no effect.

Control Devices

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:

* device|1000|command|21|256

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


Privacy notice

This website uses cookies. By continuing to use it you agree to our privacy policy.
Support | CNCnetPDM Manual | Overview
CNCnetPDM Version User Manual | Here you can find everything you need to... [read more]
Support | CNCnetPDM Manual | Setup
This section describes the steps to install CNCnetPDM. EXTRACT FILES Create a folder for CNCnetPDM on your PC or at a server. Due to Windows UAC please do... [read more]
Support | CNCnetPDM Manual | Foreground Program
This section describes the steps to start CNCnetPDM as a foreground program. After extracting the files it is possible and save to immediately start CNCnetPDM. If you like to... [read more]
Foreground Program
Support | CNCnetPDM Manual | Background Service
This section shows the steps to install and start CNCnetPDM as a background service. CNCnetPDM is able to and, in a production environment, usually runs as a windows background... [read more]
Background Service
Support | CNCnetPDM Manual | Instances
This section describes the steps to setup and run multiple instances of CNCnetPDM on a single PC. In case you would like or have to work with different parameters for specific... [read more]
Support | CNCnetPDM Manual | CNCnetPDM INI File
This section describes the steps to adjust CNCnetPDM via it's INI file according to your needs. CNCnetPDM.ini contains all information needed to control the functions of the... [read more]
Support | CNCnetPDM Manual | MTConnect Overview
The CNCnetPDM MTConnect Adapter enables you to access your machine controllers directly from within your applications or any MTConnect compatible program like an... [read more]
MTConnect Overview
Support | CNCnetPDM Manual | MTConnect Standard Agent
This document describes setup of the MTConnect Standard Agent it’s usage and test with the CNCnetPDM MTConnect Adapter. Prerequisites As this example uses a simple... [read more]
MTConnect Standard Agent
Support | CNCnetPDM Manual | SQL Server Database Tables
This section describes the steps to setup an MS SQL Server database and required as well as optional tables for CNCnetPDM. Although not absolutely necessary for testing it is... [read more]
SQL Server Database Tables
Support | CNCnetPDM Manual | Oracle Database Tables
This section describes the steps to setup required and optional database tables for CNCnetPDM in case you're using an Oracle database. For an Oracle database the information... [read more]
Oracle Database Tables
Support | CNCnetPDM Manual | MySQL MariaDB Database Tables
This section describes the steps to setup required and optional database tables for CNCnetPDM in case you're using a MySQL or MariaDB (Version >= 5.5!)  database. For... [read more]
MySQL MariaDB Database Tables
Support | CNCnetPDM Manual | Database Connectivity
To connect to a database CNCnetPDM uses a Universal Data Link (.udl) file that contains information about your database. Connect to an MS SQL Server database... [read more]
Database Connectivity
Support | CNCnetPDM Manual | Database Output
For both, MS SQL-Server and Oracle databases CNCnetPDM writes data acquired from devices to table MTH_RAW_DATA and/or MTH_ONLINE_DATA. Both tables have the following columns... [read more]
Database Output
Support | CNCnetPDM Manual | Licensing
When you start the program or service the first time without a license CNCnetPDM automatically creates a license number for your copy. Without a license number initially... [read more]
Modified: 2018-07-22