G53 after G10 L2 P1 R45

More
26 Dec 2015 13:44 #67342 by peterk6502
First of all, english is NOT my native language therefore don't look at spelling errors ...
I am new to linuxcnc 2.7.3 (and cnc in general), therefore it is likely possible that I don't understand how the G53 command should work, this is my problem:
First I home my machine, then I type:
G0 G53 X100 Y0 => machine goes to x100 and Y0 in machine coordinates => OK
then I zero X and Y in the DRO => work coordinates goes to zero => OK
G0 G53 X0 Y0 => machine moves to home (so far so good)
G0 G54 X0 Y0 => machine moves to X100 and Y0 in machine coordinates (= X0 and Y0 in work coordinates) => OK
Now I will add a rotation of 45 degrees to the G54 work coordinates:
G10 L2 P1 R45
Now I will go to X0 and Y0 in work coordinates
G0 G54 X0 Y0 => machine goes to X70.71 Y70.71 in machine coordinates (-29.289, 70.71 in work coordinates) => rotation is performed on the Z-axis of the machine coordinates (is not what I expected, I expect it to rotate on the Z-axis of the G54 coordinates) => but OK I think ...
Now the real problem.
When I issue a move again in machine coordinates, very strange things happen.
G0 G53 X0 Y0 => error linear move on line 0 would exceed joint 0's negative limit ???
G0 G53 X100 Y0 => same error
G0 G53 X0 Y100 => same error
G0 G53 X100 Y100 => machine goes to X70.711 and Y170.711 in machine coordinates (-29.289, 170.711 in work coordinates)?
G0 G53 X29.289 Y-70.711 => machine goes to home (X0 Y0 in machine coordinates and X-100, Y0 in work coordinates)?

I thought that the G53 command uses always the machine coordinates, but it clearly does not. It looks like that the G54 offset and the rotation is somehow affecting the G53 coordinates?

Is this a bug or don't I understand how the G53 command should work?

Please Log in or Create an account to join the conversation.

More
26 Dec 2015 19:41 - 26 Dec 2015 19:48 #67350 by Rick G
Replied by Rick G on topic G53 after G10 L2 P1 R45
Right now I am not near a linuxcnc computer but a couple of things...

This may help.
wiki.linuxcnc.org/cgi-bin/wiki.pl?CoordinateSystems
linuxcnc.org/docs/html/gcode/coordinates.html

then I zero X and Y in the DRO => work coordinates goes to zero => OK

Do you mean you "touch off" the G54 axis to X0, Y0?

Have you made sure before you stated to cancel all offsets? tool radius, etc.

If your home position is X0, Y0 G0 G53 X0Y0 should take you there.
If your X and Y limits are set to X0, Y0 you might however try setting your X and Y limits to say -.001 instead of 0.

Rick G
Last edit: 26 Dec 2015 19:48 by Rick G.

Please Log in or Create an account to join the conversation.

More
26 Dec 2015 21:06 - 26 Dec 2015 21:36 #67351 by peterk6502
Replied by peterk6502 on topic G53 after G10 L2 P1 R45
Thanks for your reply,

"then I zero X and Y in the DRO => work coordinates goes to zero => OK"

What I mean is that I set the G54 work offset to X100 and Y0, which is displayed as X=0 and Y=0 in G54 coordinates (is OK).
I have already the MIN_LIMIT = -0.001 for both X and Y axis.
The links you posted I already read thoroughly.
My home position is X0 and Y0, but the command G0 G53 X0 Y0 does NOT go to the home position when the G54 rotation and G54 work offset are in effect. The machine goes only to the home position after the G54 rotation reset: G10 L2 P1 R0.
After this the command G0 G53 X0 Y0 send the machine to home.
Which means that the G53 uses somehow also the current rotation and work offsets, what doesn't make sense to me.
Last edit: 26 Dec 2015 21:36 by peterk6502.

Please Log in or Create an account to join the conversation.

More
27 Dec 2015 08:34 - 27 Dec 2015 09:45 #67367 by Rick G
Replied by Rick G on topic G53 after G10 L2 P1 R45

First I home my machine, then I type:
G0 G53 X100 Y0 => machine goes to x100 and Y0 in machine coordinates => OK
then I zero X and Y in the DRO => work coordinates goes to zero => OK
G0 G53 X0 Y0 => machine moves to home (so far so good)
G0 G54 X0 Y0 => machine moves to X100 and Y0 in machine coordinates (= X0 and Y0 in work coordinates) => OK
Now I will add a rotation of 45 degrees to the G54 work coordinates:
G10 L2 P1 R45


OK so far.

Now I will go to X0 and Y0 in work coordinates
G0 G54 X0 Y0 => machine goes to X70.71 Y70.71 in machine coordinates (-29.289, 70.71 in work coordinates) => rotation is performed on the Z-axis of the machine coordinates (is not what I expected, I expect it to rotate on the Z-axis of the G54 coordinates) => but OK I think ...


Nothing should happen here, the machine is already at G54 X0 Y0

Here is what I did.
Start machine.
Home all axis.
Go to MDI mode.
g0 g53 x10 y0
Switch to manual mode.
Touch off in g54 as X0 Y0
Switch to MDI mode
g0 g54 x0y0
g10 l2 p1 r45
g0 x0y0

However if you
g0 g53 x10 y0
Switch to manual mode.
Hit the home button instead of the touch off button you may get behavior similar to what you are seeing.

You could also try this...
First I home my machine, then I type:
G0 G53 X100 Y0

G10 L20 P1 X0 Y0 ; set G54  coordinates as X0 Y0

G0 G53 X0 Y0 ; => machine moves to home (so far so good)
G0 G54 X0 Y0 ; => machine moves to X100 and Y0 in machine coordinates (= X0 and Y0 in work coordinates) => OK
G10 L2 P1 R45 ; Now I will add a rotation of 45 degrees to the G54 work coordinates
G0 G54 X0 Y0 ; Now I will go to X0 and Y0 in work coordinates
G0 G53 X0 Y0



Rick G
Last edit: 27 Dec 2015 09:45 by Rick G.

Please Log in or Create an account to join the conversation.

More
27 Dec 2015 10:45 #67369 by peterk6502
Replied by peterk6502 on topic G53 after G10 L2 P1 R45
Thanks for your time.
With your response I figured out my mistake:

Hit the home button instead of the touch off button you may get behavior similar to what you are seeing.

I your first post you already mention the "touch off", but I didn't understand it.
It is now working as supposed to.
G0 G53 X100 Y0 =>
<touch off> for X and Y
G10 L2 P1 R45
G0 G54 X0 Y0 => no movement, this is what I expect.
G0 G53 X0 Y0 => machine goes home, as supposed to.

I am very new to CNC (only 2 weeks now), it is a steep learning curve for me.

Thanks again, thread can be closed.

Please Log in or Create an account to join the conversation.

More
27 Dec 2015 13:32 #67373 by Rick G
Replied by Rick G on topic G53 after G10 L2 P1 R45
Glad you have it working.

Everyone is new to CNC in the beginning.
The learning curve may be steep in the beginning but it gets easier!

If you have not seen it already you might want to take a look here...
gnipsel.com/linuxcnc/g-code/gen01.html

Having a preamble when you start linuxcnc to set it up the way you want and cancel offsets from a previous session helps avoid problems and confusion.

For a mill in inches i use something like...
g17 (xy plane)
g20 (inches)
g40 (cancel cutter radius compensation)
g49 (cancel tool length offset)
g90 (absolute distance mode)
g94 (units/min feedrate)
g64 p.001 q.001 (set path tolerance set in individual subs)
g92.1( reset G92 offsets to zero)
g94 ( is Units per Minute Mode)

Rick G

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum