Macro variables are variables used within part programs. In G-code, they are referred to as #0, #1, #2, ... #499, #500, etc. Different controls can have different numbers of macro variables, and certain ranges are set aside for different purposes, but the Haas adapter treats all macro variables the same.
The Haas adapter has a feature for reading the values of macro variables (also called common variables) and reporting those values as SHDR keys. So for example, customer programs can keep a part count in macro variable #590, and our adapter can report that via SHDR key ‘part_count_variable’.
This feature is supported on Haas adapter version 184.108.40.206 or later.
This is based on a similar feature in the Fanuc/FOCAS adapter, see Fanuc/FOCAS - Macro Variable Reporting
Here’s a custom adapter script that reads and reports one macro variable, #671 using SHDR key part-count-alt.
The "macros" config topic specifies macro variables to be read and reported as SHDR keys. In this example, macro variable #671 is read and reported as SHDR item part-count-alt.
Wait, you’re not done yet! Once you add a new SHDR key to an adapter’s output, the adapter has to be re-mapped, and the new key may need to be manually mapped to a part-count type if it doesn’t happen automatically.
Have questions? Please reach out to us at email@example.com for assistance.