The CNCnetPDM MTConnect Adapter enables you to access machine controllers connected to CNCnetPDM from within your applications or any MTConnect compatible program like an MTConnect Agent.
You can read all data that affects manufacturing by using this powerful Application Program Interface (API). It also allows you to change or set variables or parameters at the controllers. In addition you can 'tag' devices with current work-order, operation and/or part-number it allows to switch on-off controller communication and set active shifts for machines.
Basically the MTConnect Adapter is a Windows Socket Server (Winsock) that outputs or receives data to or from any Windows Socket Client. A client can be your own application or any MTConnect standard compatible program such as an MTConnect Agent.
The principle adapter data format is a simple plain text stream separated by the pipe character '|'. Every line except for commands starts with a timestamp in UTC or local time (switchable). The remainder of the line is one or more keys followed by data – depending on the type of data item is being written to. TOP
A very simple set of events and samples output by the adapter will look something like this:
For events and samples the data is pipe delimited key | value pairs with multiple pairs on one line. Each line has at least one key | value pair on it. The line ends with a CR-LF (ASCII 15 followed by ASCII 10). For adapter output data the 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 ':'. TOP
Commands from a client to the adapter (except ‘* PING’) also work with key value pairs delimited by the pipe character. An input command line must be prepended by a star '*', contain at least one command and must end with a LF (ASCII 10) or CR-LF (ASCII 15 followed by ASCII 10). The adapter will discard any lines where the data is malformed or empty and log an error into the file log_mtc_YYMMDD.txt
An exemplary input command line could look like this:
The command in the example above would switch off communication between CNCnetPDM and device number 1000, * device|1000|on would switch it on again. TOP