How can we help?

Reading Part Numbers from Comments with MTConnect

You are here:
< All Topics

Reading Part Numbers

When reading the part numbers from the CNC program with MTConnect, DataXchange will look for a particular syntax in a comment. This syntax is customizable.

Note that the MTConnect Adapter must be capable of outputting CNC Comments. Not all MTConnect Adapters have this capability.

DataXchange will return data from a comment when a particular match is found as a prefix in the comment. A custom syntax can be used to define what prefix will be searched for. For instance if you are using the phrase PART= in your comment the DataXchange variable in the expression would be written as such ([MTC.part_number]{PART=}).

An example program containing a part number:


(PART=123456-0001) ;



M30 ;

Here is an example of a full expression:

([MTC.part_number]{PART=}) != ([PCSDB.current_part_number])

With the result:

[PCSDB.send_part_start] {([MTC.part_number]{PART=})}

Note the additional parentheses in red.

If your part syntax contains special or reserved characters, you will want to use escape characters so the system does not attempt to evaluate those special characters. Enclose your syntax in |’ ‘| characters to do this. More information can be found here.

Table of Contents