The Mitsubishi Direct Post Processor

This section explains how the Mitsubishi-Direct EDM Setup PP is written, complementing the documentation inside the EX2 file.

The Mitsubishi direct format is intended to be sent directly to the EDM machine. It is, in fact, a G-Code output file, compatible with a typical Mitsubishi EDM machine.

Output File Structure

PP Program Structure

Output File Structure

Following a short header, the output file has several sections:

  • Program section, where each operation is described: the start and end location, the tool being used (For example, T10 or T11) and several other parameters related to the burning itself. Every such operation is listed in one row.

  • Tool section, where every tool is listed once only (even if used several times in the program).

  • Work-piece (cavity) section, where every work-piece (cavity) is listed once only (even if it is mentioned in several program rows).

PP Program Structure

The main part of the PP deals with creating the program section lines. This is done in the OutTool procedure. The procedure is called from the BEGINNING OF OPERATION block, and that works nicely for both legacy mode and new mode.

Note the use of OutUntilSpace for Orbiting Pattern and MCode. The parameters sent from the profile contain the actual code to be output, followed by a space character (' ') and some comment about the code. The output file only needs the code itself, so the OutUntilSpace procedure is used to search for the first space in the input string, and if found – outputs only the characters up to that position.

The OutTool procedure also registers each work-piece (cavity number) and tool number it gets, using the two procedures RegisterCavity and RegisterTool. They collect unique names in two arrays (CavityNames and ToolNames) that will later be used to output the other sections in the output file.

The PP checks that the same tool number is not used (by mistake) for two different electrodes, by keeping track of the ELEC_ID value of each registered tool (array ElecIDs). Clearly, each holder can only be used for one electrode (but may be used for multiple burning stages).

The other sections (Tools and Cavities) are created at the END OF EDM block, using the names collected in the two arrays (and the two corresponding counters). The terminating '%' is also added there.

Note the use of a GPP2 functionality in functions OutUntilSpace, RegisterCavity and RegisterTool: local procedure variables. They can be defined using the GPP_PROCLOCAL command, and are very useful for local computing needs, such as counters, temporary strings, etc. It is always better to use a local variable if the data is not required outside the procedure.

Some functionality may be dependent on the product package. Contact your Reseller if you require a license.