Hello Guest it is December 26, 2024, 09:35:34 AM

Author Topic: Getting error on load G-code, think I may have screwed up something radio to end  (Read 3982 times)

0 Members and 1 Guest are viewing this topic.

I am sure this did not happen, perhaps I have lost the plot or changed a setting either in Sheetcam or mach3 somewhere.

I have found other examples of this but also with other things thrown in which I am not using.

Radius to end of arc differs from radius to start , Block = N0140 G03 X137.442 Y113.202 I-0.662 J-2.473 F1100.0Line 13    is the error I get and it stops the screen loading the path display, but it will still cut?

The start of my G-Code from Sheetcam is this:-
0010 (Date: 07/01/17)
N0020 M08 (Switch on control)
N0030 G21 (Units Metric)
N0040 G90
N0050 G17
N0060 G53
N0070 G00 Z10.000
N0080 X140.577 Y115.014
N0090 M800
N0100 G00 Z1.600
N0110 M03
N0120 G04 P200
N0130 G01 Z1.500 F250.0
N0140 G03 X137.442 Y113.202 I-0.662 J-2.473 F1100.0
N0150 G01 X143.137 Y113.202
N0160 G01 X140.606 Y125.029
N0170 G01 X137.442 Y113.202
N0180 M05
N0190 G00 Z10.000
N0200 X126.486 Y102.299
N0210 M800
N0220 Z1.600
N0230 M03

There is a M800 in there that is as follows
' Find Zero
' Initial try
' APH
Code ("G31 Z-30 F200")
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
Code ("G92 Z-1.4")
Sleep(100)
GotoSafeZ
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
' End    

And for completeness I have attached the G-code file, I use .TXT by the way. :-

I have checked that my post processor has things on separate lines, please help

Adrian

p.s. not sure when I try to open the .TXT attachment my browser thinks it is a bin file but I can save it and open as text?
« Last Edit: January 07, 2017, 12:36:07 PM by AdrianH »
Thought I would save a copy of the general config screen in Mach3

Adrian
Hi AdrianH,
sounds like the I,J mode is in 'absolute mode', and it will do very strange things when cutting curves.

Looking at your Gen Config page I see that you have Incremental IJ mode set but from your description it is
being changed by the code at some stage prior to the instruction that's giving you grief.

Have a look at the G code description for G03 in Mach3, it explains the difference between Abs/Inc mode.
Have a look also at G90/G90.1/G91/G91.1.

As an experiment try inserting this line between N0130 and N0140:
N0135 G90
and try it again. The more I read G90/G90.1/G91/G91.1 the more confused I get.... Try substituting 90.1,91,91.1 in the inserted
line until you find the correct mode. Wouldn't recommend trying to cut until your satisfied that the toolpath looks correct.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Hello Craig.

I must admit, I am finding it all hard to understand I have never used anything but basic Gcode.

I appreciate it must be to do with Arc but what I do not know what i will have a read and try what you suggest as N0135.

Adrian
OK a few more tests and the line
N0135 G90
or
N0135 G90.1
or
N0135 G91
or
N0135 G91.1
did not change the error.

What I also tried is removing the line N0090 M800 and that moved the error to N260.

So it must be to do with the G92 Z-1.4 code snippet I have in there?????

Trying to see how the top of work M800 is causing an issue somehow.

Adrian

P.S. If a mod can change the title line to read  "Getting error on load G-code, think I may have screwed up Arc radius to end?"

I would appreciate it, looks like I have gone past the limit to correct it.
« Last Edit: January 07, 2017, 04:14:19 PM by AdrianH »
OK I have managed to get somewhere!

There is a thread on here started by Hood, so started to pick code from posts within there and have a play.

https://www.machsupport.com/forum/index.php/topic,33723.0.html

I have changed the M800 Macro I use to find top of work from:
' Find Zero
' Initial try
' APH
Code ("G31 Z-30 F200")
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
Code ("G92 Z-1.4")
Sleep(100)
GotoSafeZ
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
' End

To initially

' To find top of work and not screw ARC's
' Lots of tries
' APH
Code "G31 Z-30.0 F200" 'probe surface
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
ZprobePos = GetVar(2002) 'get contact point
Code "G0 Z" &ZprobePos 'return to point to remove overshoot
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
Call SetOEMDRO(802, 0) 'Set Z DRO = 0.00
' Wait for movement to complete
' While (IsMoving())
' Sleep, so other threads can run while we wait
' Sleep(100)
' Wend
Code "G0 Z 1.8" 'remove head travel
While IsMoving()
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
Call SetOEMDRO(802,0) 'Set Z DRO = 0.00
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
Code "G0 Z 10"
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
' End  


To a final of:

' To find top of work and not screw ARC's
' Lots of tries
' APH
Code "G31 Z-30.0 F400" 'probe surface
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
ZprobePos = GetVar(2002) 'get contact point
Code "G0 Z" &ZprobePos 'return to point to remove overshoot
' Wait For movement To complete
While (IsMoving())
' Sleep, so other threads can run While we wait
Sleep(100)
Wend
Call SetOEMDRO(802, -1.80) 'Set Z DRO = 0.00
Code "G0 Z 10.0"
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
' End

The few lines

ZprobePos = GetVar(2002) 'get contact point
Code "G0 Z" &ZprobePos 'return to point to remove overshoot
' Wait For movement To complete
While (IsMoving())
' Sleep, so other threads can run While we wait

have meant I could speed up the feed and still keep the accuracy.

It looks like Mach3 does not like the use of G92 or GotoSafeZ()

I have no idea why but for now it is working and loading files without giving any error message of Radius to end of Arc differs from radius to start, and the tool path now loads.

It is 01:14 in the morning. Night all

Adrian
« Last Edit: January 07, 2017, 08:19:56 PM by AdrianH »