Hello Guest it is April 17, 2024, 09:05:14 PM

Author Topic: Coordinate Rotation  (Read 3558 times)

0 Members and 1 Guest are viewing this topic.

Coordinate Rotation
« on: January 18, 2018, 02:52:24 PM »
If I rotate the coordinate system using G68, I'm noticing that all feed rate moves follow the rotated program correctly, but all rapids seem to ignore the rotation and go to the un-rotated position. Is there a Gcode I should be posting in the header to make M4 rapid to the correct rotated coordinates.

Thanks
Re: Coordinate Rotation
« Reply #1 on: January 18, 2018, 03:51:13 PM »
G68 is modal and should stay in effect until cancelled by G69. That being said, the rotation can sometimes become stacked. I noticed that a g code file I was using would rotate an addition 90 degrees if I stopped the code mid-run, rewound it, and then tried again. I can't say that's what you're seeing, but it may be a funny effect of G68. If you'd like to post your g code, I can take a look for you.
Newfangled Solutions Helpdesk: http://support.machsupport.com
YouTube Support Channel: https://www.youtube.com/c/MachSupportOfficial
Re: Coordinate Rotation
« Reply #2 on: January 18, 2018, 06:03:50 PM »
Here is the code.  The G68 is happening before the program runs.  The operator sets the rotation, then runs the program.  G69 is not called until the operator presses a button to reset to zero rotation.

Code: [Select]
G20
G90
G91.1
M1100 (Rapid Z to safe Z)
M1111 (Apply G52 offset, which for us is always zero)
M1116 (Turns on an output)
G00 X2.44 Y2.35 (Rapids to un-rotated coordinate)
M14 A0 B100 C1 (Initiates start of cut sequence)
M1101 (Turn on THC)
G01 X2.59 (Feedrate moves are correctly oriented to the rotated coordinate system)
G01 Y9.85
G03 X2.29 Y9.85 I-0.15 J0
G01 Y2.35
G03 X2.59 Y2.35 I0.15 J0
M15 A0 B100 C1 (Stop cycle)
M01
G00 X4.88 Y2.35 (Rapids to un-rotated coordinate)
M14 A0 B100 C1
M1101
G01 X5.03
G01 Y9.85
G03 X4.73 Y9.85 I-0.15 J0
G01 Y2.35
G03 X5.03 Y2.35 I0.15 J0
M15 A0 B100 C1
M01
G00 X7.32 Y2.35
M14 A0 B100 C1
M1101
G01 X7.47
G01 Y9.85
G03 X7.17 Y9.85 I-0.15 J0
G01 Y2.35
G03 X7.47 Y2.35 I0.15 J0
M15 A0 B100 C1
M01
G00 X9.76 Y2.35
M14 A0 B100 C1
M1101
G01 X9.91
G01 Y9.85
G03 X9.61 Y9.85 I-0.15 J0
G01 Y2.35
G03 X9.91 Y2.35 I0.15 J0
M15 A0 B100 C1
M01
G00 X0 Y-0.5
M14 A0 B100 C1
M1101
G01 X0 Y0
G01 X0 Y12.2
G01 X12.2 Y12.2
G01 X12.2 Y0
G01 X-0.25 Y0
M15 A0 B100 C1
M01
M1109 (reset G52 offset, G52X0Y0)
M1105 (Rapid Z up)
G00 X0 Y0 (Return to zero)
M30
%
Re: Coordinate Rotation
« Reply #3 on: January 19, 2018, 09:14:30 AM »
Interesting!

Do you mind sending in a ticket with your profile and a copy of this code I can test with? I've included the link to our helpdesk below. You don't need to register, you can just click 'submit a ticket.' To send your profile, go to Help>Support>Package Current Profile and attach the file created to your ticket. Your build number and the G68 command that's being used would be very helpful as well.

Thank you,
Bryanna
Newfangled Solutions Helpdesk: http://support.machsupport.com
YouTube Support Channel: https://www.youtube.com/c/MachSupportOfficial
Re: Coordinate Rotation
« Reply #4 on: January 22, 2018, 10:56:55 PM »
I’m out of town for a couple weeks.  I’ll do this when I get back.

Offline Rob G

*
  •  16 16
    • View Profile
Re: Coordinate Rotation
« Reply #5 on: January 23, 2018, 09:15:58 AM »
It appears to be your macros.  I removed them and your code ran rotated until I canceled it.  Take a look inside your the macros you are running here and see if there is anything that may be canceling the rotation.

Offline Rob G

*
  •  16 16
    • View Profile
Re: Coordinate Rotation
« Reply #6 on: January 23, 2018, 09:17:20 AM »
It appears to be your macros.  I removed them and your code ran rotated until I canceled it.  Take a look inside your the macros you are running here and see if there is anything that may be canceling the rotation.
Re: Coordinate Rotation
« Reply #7 on: February 07, 2018, 12:18:25 PM »
I found the offending line of code, but can't explain why it's cancelling the rotation.  In my M15 I have the following...

CodeLine1 = 'G00 Z' .. SafeZ .. '\n'
mc.mcCntlGcodeExecute(inst, CodeLine1)

If I comment these lines of code, the program runs properly oriented.  IS there something in mc.mcCntlGcodeExecute that is cancelling rotation?
Re: Coordinate Rotation
« Reply #8 on: February 07, 2018, 12:33:52 PM »
G68 is modal and should stay in effect until cancelled by G69. That being said, the rotation can sometimes become stacked. I noticed that a g code file I was using would rotate an addition 90 degrees if I stopped the code mid-run, rewound it, and then tried again. I can't say that's what you're seeing, but it may be a funny effect of G68. If you'd like to post your g code, I can take a look for you.

I submitted a ticket with the profile attached. 
Re: Coordinate Rotation
« Reply #9 on: February 07, 2018, 05:15:10 PM »
So M14 has the same issue with this code...

CodeLine2 = 'G00 Z' .. PierceHeight .. '\n'
CodeLine2 = CodeLine2 .. 'F' .. ProgramFeedrate
mc.mcCntlGcodeExecuteWait(inst, CodeLine2)

Looks like mcCntlGcodeExecuteWait sends the Z up but it also sends X and Y to their respective un-rotated coordinates.  The problem appears to be with mcCntlGcodeExecuteWait and mcCntlGcodeExecute.