Introduction
Haas machines do not provide certain information over the Machine Data Collect (MDC). To capture this extra information the Haas connector is able to receive data over DPRNT by adding statements to the machine program with a known prefix.
Required Versions
DPRNT Gathering is supported in Haas Connector Version 2.32.0.0 and above.
Adding DPRNT to the Program for Headers
The MachineMetrics Haas connector expects that a DPRNT message containing the program header information is sent with a special prefix that has been assigned as MMPHDR*. The connector uses this token to determine that it is parsing a program header sent by the machine and not another response.
Constraints
- The * symbol is a interpreted as a whitespace on the line as DPRNT has special rules for whitespace.
- The instructions from HAAS expressly indicate that POPEN and PCLOS are not required for HAAS to support DPRNT.
- DPRNT must be the only command in the block. In the previous example, <text> is any character from A to Z or the letters (+,-, /,*, and the space).
- The program header must also comply with these constraints.
- The DPRNT message should be sent near the beginning of the program.
The adapter is expecting a DPRNT message in the following format:
DPRNT[MMPHDR*OPERATION_NAME];
Where OPERATION_NAME is replaced by the intended operation name to be designated as the program header.
Note: The DPRNT statement can belong anywhere in the program, by convention it is considered a good practice to put it near the beginning of the program where it is easily found and associated with the executing program.
Adding DPRNT to the Program for Generic Data
The process for configuring generic data items is similar as it was for program headers, with additional steps to inform the adapter of the type of the data, and the prefix used.
Just like with headers, the MachineMetrics Haas connector expects that a DPRNT message is sent with a special prefix followed by a space using the '*' character. However a difference being there is no special predesignated prefix for generic data like there is for the program header, so we must use the adapter configuration to inform the adapter of what prefix is used and what data item key to pair it with.
Constraints
- The * symbol is a interpreted as a whitespace on the line as DPRNT has special rules for whitespace.
- The instructions from HAAS expressly indicate that POPEN and PCLOS are not required for HAAS to support DPRNT.
- DPRNT must be the only command in the block. In the previous example, <text> is any character from A to Z or the letters (+,-, /,*, and the space).
- The program header must also comply with these constraints.
- The DPRNT message should be sent near the beginning of the program.
The adapter is still expecting a DPRNT message in the following format:
DPRNT[MMPREFIX*DATA_VALUE];
Where DATA_VALUE is replaced by the intended data and MMPREFIX is any distinct continuous string to be paired by the data item declared in the configuration.
Example
DPRNT[MMMYSTRING*This*is*my*data*string];
Adapter Configuration
Having chosen a unique prefix and added the desired data to the program DPRNT output, we now need to tell the adapter what key to use to relay the data when it sees the DPRNT message with that prefix.
Continuing the example above using the prefix MMMYSTRING
{
"dprnt": {
"MMMYSTRING": {"metricKey": "my_string_key"}
}
}
Sending numeric data over DPRNT
Numeric data can be configured to be sent as above by also setting the type field on the DPRNT object in the adapter configuration.
{
"dprnt": {
"MMMYINT": {"metricKey": "my_int_key", "type": "INTEGER"},
"MMMYREAL": {"metricKey": "my_real_key", "type": "REAL"},
}
}
DPRNT Configuration For Next-Gen Controls
Next-Gen Controls (NGC) configure and serve DPRNT and MDC on separate ports for the collector to monitor. As such, we launch two data collectors. The first data collector monitors MDC port and is configured as normal connecting to the IP and Port of the control for MDC. The second data collector monitors the DPRNT port, and connects to the IP at the DPRNT port.
To configure the Haas Serial data collector to monitor DPRNT, disable MDC data collection as follows:
{
"adapter": {
"mdcEnabled": 0
}
}
If you have questions about this process, please reach out directly to your customer success manager or contact support@machinemetrics.com.
Comments
0 comments
Please sign in to leave a comment.