Share

Using Procedures

Procedures in ConfigPost allow the user to simplify a post processor by making it modular.

Using Procedures enables you to decrease the size of a post configuration file by allowing you to call sections of machine code with a single reserved word instead of repeating code in every program format that might require it. This is done by placing all the required ConfigPost reserved words and literals in a procedure format and calling the procedure when needed.

Procedures can be very helpful for such programming exercises as activating an auxiliary device like a bar puller, which can be called during any number of different program formats.

The steps involved in creating and using procedures are described in the following topics:

  • Assigning Names to Procedures
  • Example - Defining Procedures
  • Calling Procedures

You can follow these same steps to implement new procedures or modify existing procedures post processors for your machines.

Assigning Names to Procedures

Use the Procedures Names dialog to assign meaningful names to procedures. To display this dialog, select Settings > Procedure Names from the menu bar. Just as with Variables, it is vital to assign procedures meaningful names to make your Post file more readable.

  1. To assign a name to a procedure, select Settings > Procedure Names.

  2. Select either Milling Procedures, Turning Procedures or EDM Procedures. The dialog for your selected option is displayed. For example:

    image

Important for Turn-Mill and SwissCAM:

Note: When creating a procedure to be used in both Milling and Turning processes, you must define separate identical procedures in both the Milling and Turning sections of your *.PST file. In addition, procedures must be separately defined in *.SUB files in order to be accessible for sub-spindle operations.

Example - Defining Procedures

  1. Select Configure Turn > Procedure Formats from the menu bar.
  2. Select the procedure that is to be defined. The format for that specific procedure will appear in a separate window.

image

Calling Procedures

Inserting a procedure can be done in the same manner as inserting any other reserved word.

  1. Using the mouse, scroll down to the Procedure Calls list located after the Procedures Words.
  2. Double-click on the desired procedure. It will automatically be inserted in the program.
  3. Below is an example of calling a procedure depending on a user condition:
;--BARFEED<EOB>
<IF><UC2-BARFEED><THEN>
<p04-BAR_PUSH/PULL><EOB>
<ENDIF>

Was this information helpful?