MachineMate Part Program Conversion Utility MACHINEMATE INC has developed a utility for converting part programs that had been written for other CNC controls. All CNC controls have slight differences in their part program formats even though they use the RS274D standard. MACHINEMATE CNC also has slight differences in its part program format compared to that of other vendor's controls. There are three main differences: * Only one G or M code can be specified per NC statement. The MACHINEMATE control has an 'open' architecture. This rule enables subsequent behaviors within the system to be tailored by the control integrator. The integrated soft PLC will get strobes for specific characters present in the NC statement – from A to Z. Typically these letters are M, S, T and U but the control is not restricted to those letters. By having one letter code per statement, the PLC can get its access to the active NC block information without holding back the CNC performance. The control also has the capability for an integrator to integrate its own DLL-resident code into the CNC kernel; this DLL integration feature is called 'compile cycles.' This low-level integration into the control software is less complicated given this rule for the NC statements. Since the block-to-block cycle time is so fast in the MACHINEMATE, this rule does not affect the block execution speed (like it could on most older CNC's). * Canned cycles (G81 to G89) get their parameters from specific cycle parameters rather than from certain NC blocks in the line. The canned cycles are implemented using subprograms, enabling a customer to easily tailor any canned cycle as needed or even to write a new one. This 'open' architecture (of cycle parameters rather than letter-codes) requires no overhead for the CNC translation of certain letters only with certain G8x-codes. Also, this rule enables the PLC to affect the behavior of the CNC (within this control's 'open' architecture). The PLC can easily read and write the cycle parameters. Since the canned cycles use cycle parameters, the PLC can affect the execution of the canned cycles using this method, if required. If the canned cycle parameters were given in different NC blocks having a variety of letters (e.g., R, Z, K, etc.) whose meaning depends on the accompanying G-code, then the PLC application would be incapable of manipulating those part program parameters. This difficulty arises since these letters often have other meanings in other NC statements (e.g., Z could represent the Z-axis end point, not the final hole depth for a G81) so the PLC would have be unable to change a parameter's value during its block's execution. Since some controls generate a cycle on the G8x line itself (even with no X or Y move), the utility has an option to do the same in the output program if required. * Every NC statement has an NC block beginning with an N number. Some controls do not enforce this NC block sequence number rule but it is enforced in the MACHINEMATE control. This utility creates an output program from the input program according the above three rules. In the case of the canned cycle parameters, the utility program must have the control type specified so that the original control's canned cycles can be interpreted for the MACHINEMATE set of canned cycles. Since the cycle parameters are in an integer format, the utility program must also have the decimal point format specified so that its data conversions are correct. There are several options available for the MACHINEMATE control that affect this part program compatibility and conversion. These options are part of the conversion dialog since their presence (or not) in the control will affect the format that is expected in the part program. * The MACHINEMATE control has an option to accept the canned cycle parameters as letter fields (like Z or R) rather than as cycle parameters. The MACHINEMATE option internally converts the specific canned cycle letter fields into the correct cycle parameters so that the canned cycles themselves are unaffected by the option. For this letter conversion to be correct, the utility must have the correct control type so that the letter translations are correct. If the utility makes the conversion with this option enabled but the MACHINEMATE does not have this option active, then syntax errors will result from running the output program. (This option removes the control's inherent flexibility of adding new parameters to rewritten canned cycles.) * The MACHINEMATE control has an option to process the G28, G29, G30 codes. Their processing requires the CNC to run appropriate subprograms to handle the respective reference return positions. If the utility makes the conversion with this option enabled but the MACHINEMATE does not have these subprograms available, then syntax errors will result from running the output program when the particular subprogram is not found. * The MACHINEMATE control has an option to convert a T-code into a combination of codes: T-code (for turret position) and the accompanying D-code and H-code (for tool compensation data). There are two variations within this option: either the D/H code is a one-digit field (usually from a Txy format) or a two-digit field (from a Txxyy format). If the utility makes the conversion with this option enabled and the control also has this option active, then the T/D/H codes in the program will be incorrect. * The utility has two options when converting a program for a lathe. First, if the original program is in diameter programming (X is the diameter not radius) and if the utility must convert I values for circles then this is required information. Second, if the original program is in radius programming (X is the radius not diameter) then this option converts those X commands to diameter (doubles the X value). There are a number of controls that have their part programs quickly converted to the MACHINEMATE format. These controls have the same set of standard G and M codes (RS274), similarly formatted canned cycles (though there are variations among them with different G8x code assignments) and compatible G2/G3 I/J/K statements: * AB 9-series (Allen Bradley or Rockwell) * AB 9-series 260 * AMCB * CT (Cincinnati-Lamb Arrow control from Control Techniques) * Dynapath series 5 * Fadal * Fagor * Fanuc * Haas * Mazak * Meldas * Osp * Prototrak * Yasnac * 1400 * GL8000 (but G2/G3 I/J values are different in G90 vs G91) (Giddings & Lewis) There are several other formats that can be converted - but with manual adjustments required in many cases, depending on the content. These controls used a different format for the I/J/K values with the G2/G3 statements and some used a different format for the canned cycle parameters. These are: * AB7300 * AB8200, AB8400, AB8400LP * Acramatic * Anilam * Bendix series 5 * Boss * GE1050 (General Electric) * Hurco * Siemens 7T * Siemens 850 * Teammate 2 The programs for this set above can require substantial editing because of their incompatible (with respect to many other controls) canned cycle formats and the I/J/K values for G2/G3 motions. If the original part program is doing simple linear motions or is in absolute programming (G90) all or most of the time, then the program will require minimal editing. The AB8400LP and Siemens 7T might be unique since these conversions were tied to several special rules for particular customers so these conversion algorithms might not be universal. The AB9-260 conversion assumes the original program has no decimal points. The AB7300XVW conversion is for a unique machine with those three axis letters, rather than XYZ, where VW correspond to the typical YZ. The Bendix 5 conversion can read a data file defining the S-value conversions. The Teammate 2 conversion can read a data file defining compensations in X or Z for specific T-codes. During the format conversion, the utility attempts to convert the parameters that it can. Some controls use G20/G21 for inch/metric so those are converted to G70/G71. Some controls use absolute position values for the I/J/K center of arcs and circles whereas most (including the first list above) always use incremental (like MACHINEMATE). If the G2/G3 motions occur in G90 (absolute positioning), the utility will try to calculate the appropriate I/J/K values (i.e., the incremental distances). Some controls like the AB7300 always used positive IJK since it was limited to 90-degree arcs; some of these values should be negative so the utility will attempt to change the IJK sign(s) appropriately. Some controls use incremental distances for some of the canned cycle parameters, such as the final depth, whereas most controls (see above, like MACHINEMATE) use an absolute position for depth and retract. If the G8x canned cycles occur in G90 (absolute), the utility will try to calculate the appropriate cycle parameters from current axis values. Because these calculations require both the G90 and the accompanying axis position(s), the utility might not have enough information in all cases for the calculation. The program segments in G91 (incremental) might not have the parameters converted. The output program has comments to highlight those parameters to be edited. Some controls had several extra canned cycles, beyond the G81-G89 used in the MACHINEMATE. Some controls also had G73, G74 and G76 making a total of 12 canned cycles rather than the standard 9. There is an option for the MACHINEMATE that allows it to run the same set of 12 cycles with the CNC. The CNC option will interpret this set of 12 G-codes and run the appropriate sequence, by setting appropriate cycle parameter values internally. The setting of a conversion option enables the output part program to maintain the original set of 12 cycles to be processed accordingly by this CNC option. If this conversion option is not set (implying the CNC does not have the option for the set of 12) then the output part program will have just the standard set of 9 (so the extras are converted into the closest sequence available in the standard set). Any particular control type might have variations (or different models) that did not have identical program formats. Also, the original part program might have a G or M code that the utility is not configured for. Those codes will be copied to the output with no conversion or comment. The utility performs its modifications to the original part program based on the three primary rules described above (adjusted by the options indicated and tailored for the specific control type). The utility attempts to complete the conversion by checking the expected parameters based on the control type specified. The information that describes the syntax for the canned cycles and I/J/K parameters for the various control types and has been used for the development of this utility probably does not address all variations of the respective controls. The user always makes the decision whether the converted part program needs modifications and how extensive those changes are. The utility will attempt a conversion of all these formats because some part programs might have none or few of those NC statements that have the incompatible syntax (so even manual editing might be acceptable). Only the user knows how acceptable is the particular conversion. Starting with the 1.12 version of this utility, there is an option for compatible G7x,G8x canned cycles. A number of controls had three extra canned cycles, G73, G74 and G76. The CNC has an option to recognize these extra G-codes and will call an appropriate G81-G89 canned cycle to perform the same sequence of operations as on the original control in its set of twelve cycles (these three plus the usual G81 to G89). This CNC option will accept a similar syntax found on those controls with the set of canned cycles that included these extra ones. If this utility has this option selected then make sure that the CNC also has its option enabled for these canned cycles; otherwise the canned cycles that are run by the generated part program will not match those that are expected. Starting with the 1.12 version of this utility, the inclusion of subroutines within the main file were handled for certain targets (i.e., the M98Px syntax). Upon detecting an M98Px occurrence for a target using that syntax, the conversion utility will write out the subroutines found in the main file using their correct names for a MachineMate (e.g., subroutine 1 beginning with O01 (capital letter o followed by a zero, one) is written to a file P000001.). Since these subroutines are external files, be careful of a conflict among subroutines from different main programs. For example, if the conversion of one file results in the output file for O01 and then another conversion also generates the output file for O01, the second output will overwrite the first. Note that there is a conversion selection to help manage the files that result from subroutines inside of main programs. If more than one of the original part programs will have these subroutines being generated then it is recommended to make this conversion selection (to make a directory for the output) so that a common subroutine number among different original programs will not conflict in the common output folder. If a conversion is required for another control's format or if a certain control and syntax combination needs an adjustment, please contact MACHINEMATE INC at 920-907-0001 or at info@machinemate.com.