Code Wizard Limitations
Code Wizard Limitations
Customization Training
Code Wizard
;CODE: Limitations
PAT H T R A C E E N G I N E E R I N G S Y S T E M S
;Code: Limitations
Pathtrace Plc
45 Boulton Road • Reading
RG2 0NH • England
Phone +44 (0)118 975 6084 • Fax +44 (0)118 975 6143
All copyrights and trademarks are the property of their respective owners and are hereby acknowledged.
Table of Contents
INTRODUCTION...................................................2
;CODE: BOUNDARIES.........................................3
Machine Limits......................................................4
%MACHINE MACRO...........................................5
MM Line................................................................6
MT Line.................................................................9
Summary..............................................................10
User Modifiers.....................................................11
Introduction
If you have attended a course for ;CODE: customization you will have an understanding
of what customization can be achieved with the Code Wizard.
Due to the ;CODE: mechanism, however, there are some areas of the code generator
that remain locked away from the code generator creator.
The purpose of this document is to highlight the areas that currently cannot be
customized via the code wizard. This should assist anyone who needs to create a code
generator to make the decision whether or not to start with the Wizard or go straight to
source code.
The assumed skill level is a competent EdgeCAM user who can create code generators
using the Code Wizard and understands the basics of ;CODE:.
3
;CODE: Boundaries
It is only possible to input ;CODE: inside a code constructor. The design of the Code
Wizard Templates is such that all code constructors are Procedures.
*
%PROCEDURE=CODECON_DRILL-CYCLE
%CALL=HOLD
%ENDM
The above coding is taken from the Drill Cycle code constructor. As you can see, it is
defined with %PROCEDURE=CODECON_DRILL-CYCLE. This Procedure will be called
internally by the code generator, when it encounters the corresponding instruction that
triggers it.
We have no control over this within the code wizard environment. We cannot stop this
call.
We can delete all the output from the code constructor so that it does nothing; therefore,
effectively deleting the call, but we cannot influence other logic within the code
constructor’s Procedure.
Look at the %CALL=HOLD statement at the end of the Procedure. Even if we remove all of
the output, this code will still be there.
Hence, it can be impossible to make the code generator to behave the way we want
because there is built in logic we cannot alter.
4
Machine Limits
Everyone who has used the Code Wizard will have configured the basic machine
parameters EdgeCAM requires to simulate the machine.
The information input on this panel is written directly to the %MACHINE Macro of the
outgoing source file.
However, the Code Wizard does not offer the full configurability that EdgeCAM can offer.
One notable exception is the ability to set up a machine for 5-axis simultaneous
machining.
When we look inside the machine macro we will get a better idea of what can and cannot
be configured in the Wizard.
5
%MACHINE Macro
Open up the source file of any code generator and there will be a machine macro. This
tells EdgeCAM how to simulate tool and axis movements for the selected machine. This
can be range from whether rapid moves are simulated as continuous or point to point
moves to which rotary axes are supported.
The syntax is a set of comma separated lists of all the settings and is usually highly
commented to prevent continual reference to the help files.
%ENDMACH
%MACHINE={MACHINETYPE}={DESCRIPTION}
When you generate code, this string is visible in the code generator feed back window.
Note that the %MACHINE macro ends with %ENDMACH as opposed to %ENDM which
is used for Macros and Procedures.
6
MM Line
The table below describes the functionality of each element of the MM line, these
elements are referred to as ‘switches’. You have limited access some of these switches
as will be shown.
You can follow the Setting the Machine Tool Environment link from the main page of
cgcomp.hlp for more explanations of the MM line.
0 = Inch
1 = Millimeters
0 = Continuous
1 = Point to Point (dogleg)
8 Compatibility NO ACCESS
7
Switch Function Code Wizard Access
0 = XY Plane Only
1 = XY + XZ
2 = XY + YZ
3 = XY + XZ + YZ
0 = Convert to G1
1 = Output as Arcs
8
The restrictions this imposes on the users are as follows.
Problem 1 can be resolved by writing a code generator from the source file or by
adjusting sw9 from the Code Wizard output and re-compiling.
Problem 2 can be avoided, but would need a custom post if the customer insisted on this
support. The required logic is not inside the Code Wizard source file.
Problem 3 would only be an issue if using a current template on an older version of the
software. It is not likely to cause any real problems in the field.
9
MT Line
The table below describes the functionality of each element of the MT line. Again, you
have limited access some of these switches as will be shown.
Once again you can follow the Setting the Machine Tool Environment link from the
main page of cgcomp.hlp for more explanations of the MT line.
Four axis lathes simply have two MT lines, one for each turret.
10
You can see that you cannot specify the values for sw9-sw14 and sw18-sw20.
Sw9 through to sw14 do nothing in EdgeCAM anyway, they are there for future provision.
Sw18, sw19 and sw20 are to do with machines with two turrets on the same slide. These
machines are rare, and it only affects the simulation. You could write the post in the Code
Wizard and then just edit the MT line and recompile.
Summary
Although you cannot set everything, you can see that there are areas that you cannot
influence through the Wizard. These will only affect a small percentage of customers in
the world, but in some markets 5-axis machining is more prolific. Serious consideration
has to be given to whether to start in the Wizard and finish manually, or whether to start in
the source file.
It is worth emphasizing the point that Multi-plane machines and 5 Axis machines are
different as far as EdgeCAM is concerned. You cannot mix disciplines on a single
machine.
11
User Modifiers
Traditional code generator authors will be familiar with the concept of user modifiers.
Every field on this form is a modifier. Some are system modifiers (i.e. built into
EdgeCAM), and some are user modifiers (i.e. implemented by the post writer).
On the dialog above, the “Longhand” modifier is user defined. This was added to give the
extra option of generating G1/G0 drilling for older machines with no canned cycle report.
These user modifiers are defined in the %MACHINE macro and are referenced by the
%MACRO definition lines of the cycles that utilize them.
Within the Code Wizard, you cannot define User Modifiers, and you cannot alter the
specified modifiers on any macro definition.
By way of contrast, you can add up to 5 user modifiers to every %MACRO when writing a
source file. This tends to be more common when writing special M_Functions to allow
the user to input values that get passed to the code generator.
12