View Full Version : G codes how does works at one line?


bunalmis
07-24-2003, 03:32 AM
Hello,

N100 G01 X10 Y10 G01 X20 Y20 ;

Which motion When start ?

N100 G01 X10 Y10 (first motion start and completed ?) G01 X20 Y20 (second motion start ?);

or

N100 G01 X10 Y10 G01 X20 Y20 (first motion start and completed second motion start);

Thanks.

Rekd
07-24-2003, 09:32 AM
You can't have duplicate axes on the same line. Nor duplicate G or M codes that are part of the same "group", like M05 and M03, or G01 and G02.

'Rekd

GOMEZ107
07-25-2003, 06:21 AM
Bunalmis,
N100G01X10Y10;
N110X20Y20;
Will work better.
Best regards,

GOMEZ107

Paul_S
07-26-2003, 09:49 PM
N100 G01 X10 Y10 G01 X20 Y20 ;

In the days of NC (pre-CNC) the line would only execute N100 G01 X0.002 Y0.002

Only one address word per block ";" being End Of Block (EOB)

Only the last word would take affect. So an X10 X20 the last word in the block X20 would take affect. And the order of the words in the block would make no difference, other than the order of the address words being read.

The format being called "word address format" as opposed to other formats such as, "tab sequential" or "fixed format," to name a few, now obsolete formats.

CNC controls differ on how X20 would be understood. Some may understand x20 as X20.0000 without a decimal point. The standard would understand X20 to be X0.0020

Only in some specialized CNC controls would muliple words be allowed. Then the order of let's say the X words would be of importance. But that is not the standard.

Modern CNC controls now allow some multiple command words such as preparatory functions G00 G90 G70 G80 in one command block. Fadal CNC for example allows some multiple miscellaneous function words in one block, like M07 M08 or M09 M05 in one command block without being an error.

A CNC control could exist to accept N100 G01 X10 Y10 G01 X20 Y20 ; and execute it as:
N100 G01 X10.0000 Y10.0000 ;
N100 G01 X20.0000 Y20.0000 ;

But I know of no such control.
And I do not see that such control would be of any advantage. It would only encourge bad programming practices.