On Wednesday 18 April 2007, Kyle wrote: >I would agree to a point with what Ken has pointed out. You aren't very >consistent with []'s around your variable and absolute values. I don't >know for sure if they are required but it should improve readability if >nothing else. > >Kyle > >Kenneth Lerman wrote: >> It would have been easier to find this if you had flagged line 79 for us.
Yes it would have. I looked back at my limited history with the [] construct and recalled that there were instances when I had to space separate things like this: G01 [ X-0.010+#VAR ] etc, but I don't know if that is still true or not in recent releases. Being cold weather here & very little heat in the shop, I haven't scribbled any gcode recently. >> I believe the problem is the line (marked by ^^^^^^ in your original code) >> >> X-0.010+#177 Y3.0+#177 ( Back to Starting Position ) >> >> should be: >> >> X[-0.010+#177] Y3.0+#177 ( Back to Starting Position ) >> >> Ken >> >> [EMAIL PROTECTED] >> Mark Kenny Products Company, LLC >> 55 Main Street Voice: (888)ISO-SEVO (888)476-7386 >> Newtown, CT 06470 Fax: (203)426-9138 >> http://www.MarkKenny.com >> >> >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] Behalf Of Alan Condit >> Sent: Wednesday, April 18, 2007 1:02 AM >> To: emc-users@lists.sourceforge.net >> Subject: [Emc-users] Bad character in gcode file >> >> >> Hi, >> >> I am trying to learn how to use some of the "O" words. EMC2 is >> telling me that there is a bad character near line 79. I am about to >> go blind trying to figure this out. Can anyone tell me what is wrong >> with this file? >> -------- >> O110 SUB (ROUTINE TO CUT Lightening Pocket in Horizontal Rib) >> #100=0.50 >> #101=0.0625 >> G10 L2 P3 X0.0 Y0.0 (Set the Current Location of >> Coordinate System 3 to 0,0) >> G56 (Select Coordinate system 3) >> O111 DO ( Start do/while loop ) >> G01 X0.500 Y0.000+[2*#101] ( position for start of cut ) >> G41 D2 (Turn On Cutter Radius Compensation) >> G01 X0.500 Y0.000 ( position for start of cut ) >> O112 IF [#100 GT 0.25] ( IF THERE IS AT LEAST 1/4 TO GO ) >> #100= [#100-0.25] ( set CUT 1/4" DEEPER ) >> O112 ELSE >> #100=0.0 (otherwise set CUT TO ZERO -- final >> depth) >> O112 ENDIF >> G01 Z[#100] F25.0 ( Step down for cut ) >> G01 X4.000 Y0.0 F50.0 ( Cut lower side ) >> G03 X4.500 Y0.50 I0.0 J0.5 ( Cut Lower right corner ) >> G01 X4.500 Y1.50 ( Cut right side ) >> G03 X4.000 Y2.00 I-0.5 J0.0 ( Cut Upper right corner ) >> G01 X0.500 Y2.00 ( Cut Upper side ) >> G03 X0.000 Y1.50 I0.0 J-0.5 ( Cut Upper left corner ) >> G01 X0.00 Y0.5 ( Cut left side ) >> G03 X0.50 Y0.0 I0.5 J0.0 ( Cut Lower left corner ) >> G40 ( Turn off cutter compensation ) >> O111 WHILE [#100 GT 0] >> G00 Z2.0 ( Step up to clear ) >> G55 (Return to Coordinate System 2) >> O110 ENDSUB >> >> O120 SUB ( Subroutine to cut rib slots ) >> #175=3.0 >> #176=0.50 >> #177=0.0625 >> G10 L2 P3 X0.0 Y3.0 (Set the Current Location of Coordinate System 3 >> to 0,0) >> G56 (Select Coordinate system 3) >> O121 DO >> O122 IF [#176 GT 0] >> #176=#176-0.25 >> O122 ELSE >> #176=0.0 >> O122 ENDIF >> G01 Z#176 F25.0 >> G01 X[#177-0.010] Y[3.0+#177] F50.0 ( Go to start of slot ) >> X[-0.010+#177] Y[1.5+#177] ( Cut down to bottom of slot ) >> X-0.010 Y1.5 ( Cut into corner ) >> X[-0.010+#177] Y[1.5+#177] ( Step back out of Corner ) >> X0.510-#177 Y1.5+#177 ( Cut to other side of slot ) >> X0.510 Y1.50 ( Cut into corner ) >> X0.510-#177 Y1.5+#177 ( Step back out of Corner ) >> X0.510 Y3.0 ( Cut back up to top ) >> X-0.010+#177 Y3.0+#177 ( Back to Starting Position ) >> ^^^^^^^^^^^^^^ >> O121 WHILE [#176 GT 0] >> G00 Z2.0 >> G55 ( Return to Coordinate System 2 ) >> O120 ENDSUB >> >> >> G20 G92.1 (Set up Imperial mode and clear offsets) >> G61 ( Set exact path ) >> G17 (G28 G92X0.1Y0.1Z9.295) ( Select XY plane ) >> G10 L2 P2 X9.000 Y2.000 ( Set current work origin ) >> S20000 M3 ( Set Spindle Speed and Spindle on ) >> G55 ( Set Coordinate system 2 ) >> T2 ( Select Tool 2 -- 1/8" diameter ) >> >> (Y_AXIS_GANTRY_TORSION_BOX_HORIZ) >> >> (Cut out outside shape of Horizontal Rib) >> #100=0.500 >> #120=0.0625 >> O125 DO >> O126 IF [#100 GT 0.25] (IF THERE IS AT LEAST 1/4 TO GO) >> #100=[#100-0.25] (CUT 1/4" DEEPER) >> O126 ELSE >> #100=0.0 (CUT TO ZERO) >> O126 ENDIF >> G0 X0.0-#120 Y0.0-#120 >> G01 Z[#100] F25.0 >> G01 X[34.5+#120] Y[0.0-#120] F50.0 >> X34.5+#120 Y1.5+#120 >> X34.0+#120 Y1.5+#120 >> X34.0 Y1.5 (Cut into corner) >> X34.0+#120 Y1.5+#120 (Step back out of Corner) >> X34.0+#120 Y3.0+#120 >> X0.5-#120 Y3.0+#120 >> X0.5-#120 Y1.5+#120 >> X0.5 Y1.5 (Cut into corner) >> X0.5-#120 Y1.5+#120 (Step back out of Corner) >> X0.0-#120 Y1.5+#120 >> X0.0 Y0.0 >> O125 WHILE [#100 GT 0] >> G0 Z2.0 >> >> #126=5 >> #127=5.990 >> O130 DO (Cut Vertical Rib Slots) >> G01 X#127 Y3.0 >> O131 CALL O120 (Still have to write this subroutine) >> #127=#127+5.50 >> #126=#126-1 >> G00 Z2.0 >> O130 WHILE [#126 GT 0] >> >> (INTERNAL_CUTS) >> #126=6 >> #127=1.50 >> O140 DO (Cut Lightening Pockets) >> G01 X#127 Y0.0 >> O141 CALL O110 >> #127=#127+5.50 >> #126=#126-1 >> O140 WHILE [#126 GT 0] >> >> G00 Z2.0 >> M2 >> -------- >> Thanks, >> Alan >> --- >> >> Alan's MachineWorks >> 1085 Tierra Ct. >> Woodburn, OR 97071 >> >> Email -- [EMAIL PROTECTED] >> www.alansmachineworks.com >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Emc-users mailing list >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Emc-users mailing list >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users > >------------------------------------------------------------------------- >This SF.net email is sponsored by DB2 Express >Download DB2 Express C - the FREE version of DB2 express and take >control of your XML. No limits. Just data. Click to get it now. >http://sourceforge.net/powerbar/db2/ >_______________________________________________ >Emc-users mailing list >Emc-users@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/emc-users -- Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) I tripped over a hole that was sticking up out of the ground. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users