Introduction
This document provides instructions for merging multiple MACRO.DAT files into a single, consolidated configuration.
With software version YAS4.90, a “New Macro Job” function was released. The “New Macro Job” function eliminates the need for a corresponding “MACRO.DAT” file that contains the variable type and text used in the macro job. With the “New Macro Job” function, variable types and text are contained within the Macro job itself. More information is available in The Knowledge Center article: YRC1000 Standard Macro Function
MACRO.DAT files define additional machine functionality and are commonly used to implement features such as servo-robot laser tracking, seam finding, touch sensing, and other optional machine capabilities. When multiple options are required on the same system, their associated macro definitions must be combined into a single MACRO.DAT file.
Properly merging MACRO.DAT files ensures that all required machine functions are available while maintaining compatibility between features and preventing conflicts within the macro definitions.
This guide describes the process for merging MACRO.DAT files, highlights important considerations throughout the procedure, and provides recommendations to help avoid configuration conflicts and ensure successful implementation.
Merging the Files
We begin with a base macro file. For each macro being merged, copy the required argument definitions into an unused argument slot in the base file. Each inserted argument must be assigned a unique, sequential argument number.
Maintaining correct argument numbering is critical. During import, the controller identifies arguments by their assigned number. If two arguments share the same argument number, the later definition will overwrite the earlier one. As a result, only the final occurrence of the duplicated argument number will appear in the imported macro, which can lead to missing or incorrectly mapped arguments.
Example:
///MACRO1 10
In this example, if another argument is also assigned number 10, the controller will use the last definition encountered and ignore the earlier one.
When the new MACRO.DAT file is loaded into the controller the arguments should be visible by navigating to SETUP > MACRO INST.
As you can see below, I have the before and after loading the new MACRO.DAT file with the added arguments.
Comments
0 comments
Please sign in to leave a comment.