0% found this document useful (0 votes)
72 views14 pages

Code Wizard Limitations

Edgecam 5 axis

Uploaded by

Renato Simões
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views14 pages

Code Wizard Limitations

Edgecam 5 axis

Uploaded by

Renato Simões
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 14

PATHTRACE ENGINEERING SYSTEMS

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

%IF $CONDEBUG=N @NO_CON-DEBUG


<***** Code Constructor : Drill Cycle *****>
@NO_CON-DEBUG

;Sequence Definition^<27>Drill Cycle^-1^<415>Hole Cycles^


;Use Tokens^DELETE^BLKNUM^DRILLGCODE^XMOVE^YMOVE^ZDEPTH^RAPIDGCODE^ZCLEAR^RPLANE^….
;Default Sequence^;CODE:<workshop1>
;Default Sequence^[DELETE]^[BLKNUM]^[RETRACTGCODE]^[DRILLGCODE]^[XMOVE]^[YMOVE]^[ZDEPTH]
<workshop1>
%CALL=PT_BINC
#SPEED=SPEED:%CALL=PT_SPINDLE
<[#DELETE=25][#BNUM=20] … [#YMOVE=1][#ZMOVE=27][#RPLANE=35][#FEED=28][#HCODE=11] …

;MCB - why does this include RAPIDGCODE

%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.

%MACHINE=MILL=My Mill Version 1

MM={COMMA SEPARATED LIST}


MT={COMMA SEPARATED LIST}

%ENDMACH

The coding above represents a simplified Machine Macro.

The %MACHINE statement defines 2 elements:

%MACHINE={MACHINETYPE}={DESCRIPTION}

{MACHINETYPE} Can be MILL, LATHE or UVWIRE

This determines the default extension for the compiled file.

{DESCRIPTION} Is simply information for the user.

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.

Switch Function Code Wizard Access

1 Default Code Generator Units Full Access

0 = Inch
1 = Millimeters

2 Rapid Traverse Speed (units/minute) Full Access

3 Maximum RPM (revs/minute) Full Access

4 Maximum Angular Feed (degrees/minute) Full Access

C-axis Turning Only

5 4 Axis Lathe Tape Format Full Access

0 = One NC file containing 2 Full Programs


1 = One NC files for each turret
2 = One NC file merged by Synchronisation

6 Rapid 3D support (default) Full Access

0 = Split into XY & Z moves


1 = Perform 3D rapids

7 Resolved Rapid Movement Full Access

0 = Continuous
1 = Point to Point (dogleg)

8 Compatibility NO ACCESS

Optional Values to support/disable EdgeCAM


code generation rules. See cgcomp.hlp.

9 Rotary Axis Configuration for Multiplane Limited Access


or 5-Axis machines.
Only Multiplane

7
Switch Function Code Wizard Access

10 Plane Switching for Arcs Full Access

0 = XY Plane Only
1 = XY + XZ
2 = XY + YZ
3 = XY + XZ + YZ

11 Initial Plane Full Access

Default value for Move Initial

12 No Longer Used n/a

13 Wire Guide Heights Full Access

0 = Use Profile Height


1 = Use Guide Height

14 Top Wire Guide Height Full Access

15 Bottom Wire Guide Height Full Access

16 Radius Compensation Factor Full Access

Auto 90 degree lead in factor used in


conjunction with cutter radius compensation

17 Rotary Coordinate mode Limited Access

0 = Rotary Coordinates (at Depth) 2 not available on Lathes


1 = Rotary Coordinates (at Wrap level)
2 = Unwrapped linear coordinates

18 Maximum programmable radius Full Access

19 Rotary G2/G3 support Full Access

0 = Convert to G1
1 = Output as Arcs

20 Perform C-axis CX toolpaths (C-Axis only) No Access

0 = Disabled (Faster) Set to 1


1 = Enabled

21 Nurbs/Spline Support Limited Access

0 = Disabled 1 = NURB (Fanuc) On/off only


2 = Spline (Heidenhain)3 = Siemens 840D
Format set by template

8
The restrictions this imposes on the users are as follows.

1. Cannot configure 5-Axis milling machines

2. Cannot support unwrapped radial programming on lathes

3. Cannot disable sw8 settings

These limitations are unlikely to affect a large percentage of the market.

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.

Switch Function Code Wizard Access

1 Name of turret - String Full Access

2 Number of Tool stations Full Access

3 Tool change position in X Full Access

4 Tool change position in Y Full Access

5 Tool change position in Z Full Access

6 Tool home position in X Full Access

7 Tool home position in Y Full Access

8 Tool home position in Z Full Access

9 Maximum X Value No Access

10 Maximum Y value No Access

11 Maximum Z value No Access

12 Minimum X Value No Access

13 Minimum Y value No Access

14 Minimum Z value No Access

15 Maximum Primary Feedrate Full Access

16 Maximum Secondary Feedrate Full Access

17 Tool change dwell time Full Access

18 Number of turrets per slide No Access

19 Separation of Tools in Z for sw18 No Access

20 Separation of Tools in X for sw18 No Access

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.

A modifier is an input box on a form for an EdgeCAM command.

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

You might also like