G-Code

Discussion/questions about software used with your CNC Shark and programming issues

Moderators: al wolford, sbk, Bob, Kayvon

Post Reply
asever
Posts: 34
Joined: Fri Sep 03, 2010 12:17 pm

G-Code

Post by asever »

I am trying to give a new program a go...and could use some fellow Shark G-Coder advice

www.tailmaker.net

The program creates box joints...all kinds of interesting box joints. Unfortunately when I load the G-code it generates I get a communication error. I can get the code to work by opening a .tap file created in Aspire (I use the same bit/z point/ Board thickness etc in Aspire) and copying the initial few lines over the initial few lines of code the Box Joint Program generated.

Below is the initial few lines generated by the Box Joint software:

%
( Default File Regenerated by fingmaker! )
N10 G90
N20 G20
G1 Z 0.079 F 118
N30 M3
G0 X 6.110 Y -4.134 Z 0.079 (-5- dx 10.250 - dz 0.000-)
G1 X 6.110 Y -4.134 Z -0.118 (-5- dx 0.000 - dz -0.197-)
G1 X 6.110 Y 4.134 Z -0.118 (-5- dx 0.000 - dz 0.000-)
G1 X 6.110 Y 4.134 Z -0.236 (-5- dx 0.000 - dz -0.118-)


And the last few lines:
G0 X -5.315 Y -4.216 Z -0.000 (-34- dx 0.000 - dz 1.181-)
G0 X -5.200 Y -4.216 Z -0.000 (-35- dx 0.115 - dz 0.000-)
G0 X -5.200 Y -4.216 Z 0.079 (-35- dx 0.000 - dz 0.079-)
G0 X 0 Y 0
N40 M5
N50 M2
%

By replacing the initial lines I can get the Shark to move but I don't get any preview and I am curious what is causing the issue in the code. Any ideas/suggestions?

Thanks.

Andy

4DThinker
Posts: 951
Joined: Wed Jun 27, 2012 9:00 am

Re: G-Code

Post by 4DThinker »

.TAP files created for the Sharks contain lots of info that I'm sure help generate the preview. For example, this is header info of one of my files:

( DewaltPlate )
( File created: Sunday, August 18, 2013 - 12:32 PM)
( for CNC Shark from Vectric )
( Material Size)
( X= 8.000, Y= 8.000, Z= 0.233)
( Z Origin for Material = Material Surface)
( XY Origin for Material = Center)
( XY Origin Position = X:0.000, Y:0.000)
( Home Position)
( X = X0.0000 Y = Y0.0000 Z = Z0.5000)
( Safe Z = 0.200)
()
(Toolpaths used in this file:)
(Pocket 3)
(Pocket 5)
(Pocket 1)
(Pocket 2)
(Profile 1)
(Tools used in this file: )
(1 = End Mill {1/8 inch})
(End Mill {1/8 inch})
(|---------------------------------------)
(| Toolpath:- 'Pocket 3' )
(|---------------------------------------)


All my other .TAP files have similar (but different) header info. No obvious footer info added that I can tell if that helps.

4D

asever
Posts: 34
Joined: Fri Sep 03, 2010 12:17 pm

Re: G-Code

Post by asever »

Thank you 4Dthinker. I appreciate the reply. The more I play with it the more it looks like the main body of the g-code may have codes not accepted by the shark controller.

As a side comment I do find it frustrating the lack of response from Next Wave on these Forums. A simple response of "the Shark Controller supports standard Gcode...or it does not and here are the commands it does not support" would really help. I have worked with Shopbot and Luguna and they are very good about providing feedback. I understand Next Wave is a small shop; however if you provide an area to engage the customer you need to follow through on that engagement. Ten minutes a day is all it would take...even if the answer is "I am sorry we can not provide support for this issue because the g code is compiled by a third party". That said I have received support using the web customer support form on a different issue and I am grateful for that support.

Andy

User avatar
Kayvon
Posts: 560
Joined: Tue Oct 21, 2014 11:46 pm

Re: G-Code

Post by Kayvon »

I think it should be possible to convert your code to work on the shark. Let me start by explaining how the code you posted is worked, then I'll give some ideas for adapting it to the shark.

In the first couple lines, N10 and N20 are machine-specific and don't have any meaning on the Shark (that I know of). G90 and G20 are standard: use inches in absolute mode.

Code: Select all

N10 G90
N20 G20
Now it moves the machine to up to Z=0.79.

Code: Select all

G1 Z 0.079 F 118
Another N command without meaning on Shark. M3 turns on the spindle.

Code: Select all

N30 M3
The remaining lines here move around the gantry as you'd expect.

Code: Select all

G0 X 6.110 Y -4.134 Z 0.079 (-5- dx 10.250 - dz 0.000-)
G1 X 6.110 Y -4.134 Z -0.118 (-5- dx 0.000 - dz -0.197-)
G1 X 6.110 Y 4.134 Z -0.118 (-5- dx 0.000 - dz 0.000-)
G1 X 6.110 Y 4.134 Z -0.236 (-5- dx 0.000 - dz -0.118-)

And the last few lines:
G0 X -5.315 Y -4.216 Z -0.000 (-34- dx 0.000 - dz 1.181-)
G0 X -5.200 Y -4.216 Z -0.000 (-35- dx 0.115 - dz 0.000-)
G0 X -5.200 Y -4.216 Z 0.079 (-35- dx 0.000 - dz 0.079-)
G0 X 0 Y 0
Another N code. I believe they're trying to turn off the spindle here, but this isn't how Shark does it.

Code: Select all

N40 M5
And, finally, an N50 code without Shark meaning. M2 tells the Shark's spindle to stop.

Code: Select all

N50 M2
To adapt this to the shark, I would remove every N## from the lines that have them. So instead of "N50 M2" you'd just have "M2". And I'd eliminate the "N40 M5" line straight out. The stuff that 4DThinker posted are all comments, which are ignored by the Shark.

Hope that helps. Let us know how it goes.

User avatar
Kayvon
Posts: 560
Joined: Tue Oct 21, 2014 11:46 pm

Re: G-Code

Post by Kayvon »

Apparently the N## codes are just for line numbering? I'd still try getting rid of them, since none of the Vectric tools generate them.

asever
Posts: 34
Joined: Fri Sep 03, 2010 12:17 pm

Re: G-Code

Post by asever »

Thanks Kayvon! I will give it a go tonight and report back on what happens. I really appreciate the information.

Andy

Post Reply