Gary Wooding | 01/05/2020 10:18:50 |
1074 forum posts 290 photos | I do a lot of CAD work with F360 and TurboCAD, and am dipping my toes into the mysterious waters of CNC. To that end I've purchased the miniature Benbox 1310 engraver **LINK** , and installed the Universal Gcode Sender **LINK**. I downloaded the spiral.gcode program from GitHUb and am having problems getting it to run. It's only 14 lines long and terminates with the following rather uninformative error message... [Error] An error was detected while sending 'G3X0Y0I20J0': Error: Invalid gcode ID:33. Streaming has been paused. Since this appears to be the first command in a program stated to be a test program I'm totally flumaxed. I posted this on GITHUB and CNCzone, a couple of days ago, with no responses at all. Here's the complete program. G21 (Units in millimeters) G3 X0 Y0 I20 J0 G1 Z0 Any ideas please?
|
mgnbuk | 01/05/2020 10:28:06 |
1394 forum posts 103 photos | Lower case "z" in second G2/G3 blocks rather than upper case ? Some systems use an "R" value rather than I/J in G2 G3 - do you have list of suported G codes for the router to check the required format ? Nigel B. |
Bill Davies 2 | 01/05/2020 10:34:56 |
357 forum posts 13 photos | Gary, does it expect G03 vs G3? The error indicates the G code in that line, although, as Nigel indicates, there may be within that line of code. Bill |
Baz | 01/05/2020 10:47:48 |
1033 forum posts 2 photos | Don’t think it will be G03 vs G3, most systems allow you to drop leading zeros. Could be lower case z, I also note no decimal points, I was always taught to put one in ie x20. Or x.2 I was taught mainly on Fanuc systems and leading and trailing zeros could be omitted as could block numbers, I think the same holds true for Mach 3 |
RobC | 01/05/2020 11:02:14 |
54 forum posts 3 photos | Hi Gary, This code is generating an error describes as: The motion command has an invalid target. This means that your gcode doesn't make sense to the controller software. If you examine the gcode, you can see the problem. (I don't know where it came from, but it isn't really a helpful piece as a sample program). If you take a look at this link you can see how a counterclockwise arc (G3) is defined in gcode. G3 X0 Y0 I20 J0 The command to move in an arc needs a start point, end point and centre point. The code in this line describes the end point and the centre point, but requires a start point to be identified before it can move. G3 - Start counter clockwise motion X0 Y0 - the end point I20 J0 - centre point of arc (relative to start point) You can probably see from this description that the start point is required. I would normally expect to see a line like this in front of the G3 command line: G1 X0 Y0 This would set the start point at (0,0) and allow the second line to describe an arc between (0,0) and (0,0) centred at (20,0) - This describes a circle with radius 20. ----------------- Sample code it always tricky, particularly from an unverified source. A CNC machine is very unforgiving when things go wrong. They try to do exactly what they are told, with little or no reality checking along the way. They are fantastic fun, but have a pretty steep learning curve in the early stages. I hope this helps... Rob |
RobC | 01/05/2020 11:05:22 |
54 forum posts 3 photos | The Universal Gcode Sender software is happy with the upper/lower case lettering, the spaces, the preceding zeros. and the decimal places. So there's no need to worry about them. |
Gary Wooding | 01/05/2020 11:14:57 |
1074 forum posts 290 photos | This is all totally new to me, but the error message appears to about about line 6 of the program - ie, before it gets to the lower case "z". The machine came as a box of bits with no instructions at all. Nothing. I assembled it, installed UGS on my Win10x64 system and eventually managed to connect and calibrate it, then found **THIS** video. I downloaded the spiral .gcode prgram and got the error the first time I ran it. That's all I know. |
Martin Connelly | 01/05/2020 11:29:08 |
![]() 2549 forum posts 235 photos | If you can jog it move the x and y axes to the approximately central position and z down at least 20mm from its highest position. Set x, y and z to zero if you can. This should allow the program to run without hitting soft limits if that is the problem. Does everything home itself when first switched on? Martin C Ps. Check all zeros are 0 and not capital o. Also it may be worth adding m30 as a last line (program end) and adding a return after it as well. Edited By Martin Connelly on 01/05/2020 11:34:20 |
SillyOldDuffer | 01/05/2020 11:37:40 |
10668 forum posts 2415 photos | Can't add anything to Rob's informative reply other than to suggest the general answer can be found by searching the linuxcnc GCode manual here. As nothing is ever easy, after navigating to the particular command of interest, scan for Paragraphs starting "It is an error if:" There may be more than one! For G2 and G3 arc: It is an error if:
It is an error if:
It is an error if:
Unfortunately, the manual doesn't seem to cross-reference to the ID: number, and that information is hidden away in report.h and report.c on grbl github. May not be up to date, but with ID at the end: // Define Grbl status codes. #define STATUS_GCODE_UNSUPPORTED_COMMAND 20 So 33 is 'STATUS_GCODE_INVALID_TARGET', which means the Gcode is valid, except it's been told to do something out of reach. Not exactly noobie friendly but you can't help loving a system where not using the F word is an official error, ho ho! Dave PS Not a showstopper, just a duff example. Try something else. Edited By SillyOldDuffer on 01/05/2020 11:39:41 |
blowlamp | 01/05/2020 11:45:33 |
![]() 1885 forum posts 111 photos | I get this error message with your gcode.
Try this gcode instead. It's just a pattern of arcs.
Martin. Edited By blowlamp on 01/05/2020 12:03:29 |
Martin Connelly | 01/05/2020 11:54:27 |
![]() 2549 forum posts 235 photos | I have looked to see what the error code is telling you. G03 or G3 is an anticlockwise move around a point, in this case defined by i20 j0. Starting at x0 y0 and ending at x0 y0 would make sense as the radius will be a constant 20mm (assuming this is what everything is set up in). If however you try to start at some random place other than x0 y0 then the start point and end point are unlikely to have the same distance to the centre of rotation so a constant radius arc will be an error as flagged. If you add g01 x0 y0 z0 after f900 it should work (unless it runs out of space to move). Martin C |
RobC | 01/05/2020 12:17:37 |
54 forum posts 3 photos | OK, I also use UGS and have just plugged that code into my machine - it runs perfectly! So, I believe that your issue is one of configuration, frustratingly.
|
RobC | 01/05/2020 12:23:50 |
54 forum posts 3 photos | Are you able to use the JOG functions in UGS to move your machine? Have you set your zero positions (X,Y,Z) somewhere in the middle of your machine bed. Just so that it is possible for it to move around as requested? |
Jan B | 01/05/2020 12:39:03 |
![]() 43 forum posts 11 photos | You must enter G54 as a work zero offset. The program must know the zero position of X, Y and Z. You can´t have a Z coordinate in G3 if you use G17, so remove Z.
Jan |
RobC | 01/05/2020 12:53:58 |
54 forum posts 3 photos | I believe that Martin has the answer - you need to define a start position. So any of these should solve it:
For 1 & 2 I think you can do these in the UGS interrface using the 'reset zero' command or the 'reset' buttons next to the X, Y, Z indicators. |
Gary Wooding | 02/05/2020 15:46:24 |
1074 forum posts 290 photos | I'm really grateful to you guys. I tried the little program supplied by Martin, which worked fine. I then tried the suggestion of adding g01 x0 y0 z0 after the F900 in spiral, and that worked too. The 1310 is a very little machine and it ran out of space, but that's not important to me. Since this whole thing is entirely new, with an untested machine, I had no real way of knowing if the machine was faulty or had the wrong software in it. Since I'd managed to calibrate it and turn the spindle motor on, I was beginning to suspect the software level in the Arduino, and I had no idea how to go about upgrading. As mentioned in my 1st post, I'd already posted the problem to 2 apparently specialised forums, and had no responses whatsoever. In desperation I turned to this forum and got responses and solutions almost instantly. Did I say how grateful I am? This forum is amazing. |
Neil Wyatt | 02/05/2020 16:18:26 |
![]() 19226 forum posts 749 photos 86 articles | Posted by Gary Wooding on 02/05/2020 15:46:24:
Did I say how grateful I am? This forum is amazing. Wrong! It's the members of the forum who do the amazing bits! Neil |
Please login to post a reply.
Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!
Sign up to our newsletter and get a free digital issue.
You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy
You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.
Click THIS LINK for full contact details.
For subscription issues please see THIS LINK.