|
Tips and Tricks
Reading Data from External Files
Use of INTERACTION Variables
As with all GPP2 PP, it is possible to use interaction variables. However, with EDM Setup, it is also possible to customize the EDM Setup GUI screen, using the "profile". Furthermore, the profile provides much richer options for GUI and user interaction control. More types of controls are available (check-boxes, radio buttons, spin-wheels), as well as visibility control (you can define if a parameter is shown, based on values of other parameters), and min-max values.
In addition, it is often smarter to gather all the user interaction in the same screen (the EDM Setup screen) rather than split it and leave some interaction to the PP dialog stage.
And of course, any user interaction parameter used in the EDM Setup screen is also available to the EX2 program (it just needs to be defined with the FORMAT command). So, the same control over PP behavior can be achieved using EDM Setup parameters instead of GPP2 INTERACTION variables.
Note that EDM Setup parameters that replace GPP2 interaction variables should be placed in the first tab (the "Part/Job" tab), since they are global in nature.
Reading Data from External Files
GPP2 has the ability to read data from an external text file and use it inside the post processor. While not limited to EDM Setup PP, this feature may prove very useful in some EDM setup scenarios. For instance, it is possible to read XY position correction values for individual electrode tools, and use the deltas to adjust the burning position. Alternatively, one can read in the file created by the Cimatron "XYZ Labeling" feature, and use that data for electrode CMM control. For more details, see the documentation for READ_DATA_FROM_FILE.
Protecting the Post Processor
As with any GPP2 PP, it is possible to protect the PP by using the GPP_PROTECT command. This may be especially important in EDM Setup PP, since the EDM Setup profiles are not protected, and can be used on any machine (they are simple XML files). So, if protection is needed, it should be applied through the relevant PP.
Note that it is possible to use multiple GPP_PROTECT statements in the same PP, specifying multiple module names. GPP2 will allow execution of such a PP if at least one of the modules is found. So, a single PP can be built to support multiple formats (with multiple protection modules). For example, see the EDM-EPX1 PP, which can be used by users who have either the EDM_WIZ_MITSUBISHI or the EDM_WIZ_MAKINO modules.
More than Four Burning Stages
By default, the EDM Setup application supports up to four burning stages at each location (namely, Rough, Pre-Finish, Finish and Polish). This has been enough for virtually all cases.
In the extreme case that more than four stages are needed, it is quite possible to build a profile and a PP that will handle such a case. In order to do that, the following strategy should be used (assume six burning stages are needed):
Do not use any of the standard burning stages (electrode tool level variables).
Use "legacy" mode profile (new mode will not serve this purpose well).
Add electrode-level variables that handle all the data you need for the 6 burning stages you need (For example, SparkGap1 to SparkGap6). These variables can be conveniently organized as 6 groups, with the proper captions, to present as many burning stages as needed.
Write a PP that uses the new variables to output the right data per burning stage / tool.
The PP should output everything at the "LOCATION" block, where all your data is available. It is not possible to trust "OPERATION" blocks in this scenario.
Basically, this is all you need to do for "legacy" mode with 6 burning stages.
If individual control over which stages are used per location is needed (to achieve a level of flexibility similar to "new" mode), simply add 6 checkbox location-level variables, called "Use Stage 1" to "Use Stage 6". Default should be on. These variables can be used by the PP (in the BEGINNING OF LOCATION block) to decide which stage/tool should be applied in each location.
General Programming Tips
Avoid using the NEW_LINE_IS mechanism (the $ sign). This is not useful in EDM Setup PP, and only adds complexity. Instead, use \J in the OUTPUT statements when a new-line is required. Unlike NC PP, where the sequencing numbers (N100, etc.) are needed at the beginning of lines, in EDM Setup PP it is better to apply new-line breaks at the end of output lines, as typical to most programming environments.
In "direct" output formats, use the BEGINNING OF OPERATION block (and not the BEGINNING OF LOCATION block). The operation-driven PP has several advantages:
GPP2 assigns the relevant tool-specific variables (For example, Spark Gap) to generic variables that can be used for any tool (Rough, Finish, etc.). For instance, TOOL_SPARK_GAP gets the right value based on the operation tool (automatically copied from either ELEC_RO_SPARK_GAP, or ELEC_PF_SPARK_GAP, etc.). This saves a lot of IF statements.
The mechanism supports both legacy and new modes. Only the necessary operation blocks will be created, based on the mode and the tools used. This allows building a single PP for both modes (and the actual decision is done in the profile editing).
All the electrode and location parameters are always available in the operation block, so no data is lost (or should be kept in temporary variables).
|