CNC Machine programs often store important information in macro variables, sometimes referred to as common variables. The part count macro can be a useful method of incrementing the MachineMetrics part counter. There are thousands of registers for these variables, and MachineMetrics can extract these variables from our connector. To do so requires a configuration in the connector using the "macro" setting. To add this data item, edit the machine and select "Data Collection".
Edit the data collection method.
Enter the following into the configuration where the macro variable is register 510.
{ "macros": { "variable_name": 510 } }
Now go into data mapping and select the new data item. Map that data item to the proper type. In this example, we'll see Part Count as the Type, and Target subtype.
Now the data item will be mapped and you can use this information to trigger workflows, classify downtime, or for a dashboard display.
Multi-Path Macros
By default with the above configuration, macros are only gathered for path 1. You can configure the adapter to gather the macro variable instead on all paths, or for only specific paths with the following expanded configuration.
{
"macros": {
"path1_macro_var": 101,
"all_paths_macro_var": { "addr": 500, "path": [-1] },
"specific_path_macro_var": { "addr": 501, "path": [1,3] }
}
}
- path1_macro_var: Configured in this way, only gathers macro for path 1
- all_paths_macro_var: (all paths) Will attempt to gather this value on every path by defining to gather on path -1
- specific_path_macro_var: (specific paths) Will gather this value only on paths 1 and 3
Just as with our other multi-path data items, any values gathered on paths 2 or higher will have the path number suffixed to the key name for data mapping.
- Example) all_paths_macro_var, all_paths_macro_var2, all_paths_macro_var3, ...
If you have any questions, feel free to reach out to our Technical Services Team at support@machinemetrics.com
Comments
0 comments
Please sign in to leave a comment.