Page 1 of 1

gcode syntax problem.

PostPosted: Thu Aug 24, 2023 1:57 am
by Delco
I have a customer who is using mastercam , his post processor which is a generic fanuc post I believe outputs a G0 G90 G54 X0Y0 at a particular point .
now if the program is currently in G55 ( or any other WCS) the control sees the G0 G90 X0Y0 and moves to G55 X0Y0 then changes the coordinate system to G54 .

if we change the syntax to G54 G0 G90 X0Y0 it performs the operation going from G55 to G54 first then performs the correct X0Y0 move in G54 correctly .

Why does this happen ?

Does anyone have a good post procesor for UCCNC and mastercam ?

Re: gcode syntax problem.

PostPosted: Thu Aug 24, 2023 6:49 am
by dezsoe
It's an old problem. The order of execution in one sentence is bad. The work around is to write only that kind of commands in one line that do not need a specific order of execution.

Re: gcode syntax problem.

PostPosted: Thu Aug 24, 2023 10:58 am
by Delco
The other issue is if we have a toolchange and then ask it to move back to the same location after the tool change by commanding a XY move that is the same as it was before the toolchange macro it will not perform it .ie

G0 G90 X1.111 Y2.222
T10M6 ( the tool change macro finishes with the tool at the tool change position)
G0 G90 X1.111 Y2.222 (this will not work as it just ignores the XY move)


G0 G90 X1.111 Y2.222
T10M6 ( the tool change macro finishes with the tool at the tool change position)
G0 G90 X1.121 Y2.202 (this will work as it is a different position slightly )

This is a rare occurence normally as you go to a different point after the tool change except when doing a hole bore then a threadmilling operation.

Re: gcode syntax problem.

PostPosted: Sun Aug 27, 2023 4:56 am
by Delco
Does anyone have a good post procesor for UCCNC and mastercam ?