EMC stops executing code (code format issue?)

More
11 Oct 2011 18:25 #13841 by NICKKINSMAN
I am using BobCAD-CAM with EMCRev1 post processor. I would appreciate if someone could take a look at the code and see if it is something EMC does not like.

It runs all straight and feed lines fine. I have a threading component BCC is outputting (not using G76 for some reason??) but the program stops at this line and does not want to proceed past the tool change, it just idles, does not continue to execute;

G00 Z5.
G00 X4. (note- homed position)
M5
M1
()
T30
G01 X.962 Z0. S500 M3 G94 F.063
G01 X.862
G00 X4. Z-.375
G00 Z5.
M5
M2
%

I understand the M1 pause, and it does, but when try to restart it does nothing. I think the problem might be on the bold G01 code, which is the start of the threading cycle. It has already issued a G94 at very beginning of program, maybe does not like that again? Everything else seems OK.

I also don't see any popup for the tool change on my screen. I get the Axis note on startup, but nothing during execution.

Nick

Please Log in or Create an account to join the conversation.

More
12 Oct 2011 00:09 #13849 by BigJohnT
T30 does nothing really without M6 then next you need G43. It is bad form to mix motion and setup on the same line and you should smack bobcrud on the hand for doing that. I'm really sorry you have to muddle through bobcrud and I wish you good luck with that. I'm sorry but the hurt lingers on from when I thought bobcrumb was CAM software.

www.linuxcnc.org/docview/html/gcode_main...l#sub:T:-Select-Tool

www.linuxcnc.org/docview/html/gcode_main...#sub:M6:-Tool-Change

www.linuxcnc.org/docview/html/gcode_main...l#sub:G43,-G49:-Tool

John

Please Log in or Create an account to join the conversation.

More
12 Oct 2011 22:54 #13872 by andypugh
NICKKINSMAN wrote:

G01 X.962 Z0. S500 M3 G94 F.063


Do you have motion.spindle-revs wired in HAL? Without that, G94 won't work.
www.linuxcnc.org/docview/html/config_emc2hal.html

Also, that is unlikely to cut a decent thread (and there is no chance of multi-pass threading that way.)

Please Log in or Create an account to join the conversation.

More
13 Oct 2011 00:55 - 13 Oct 2011 00:59 #13875 by NICKKINSMAN
I'm still trying to get my hands around the coding in HAL, but I have the spindle encoder connected and working via PncConf. I have the RPM meter setup in Axis with good readout. When I go into the axis config, I can pull up the rev count pin and I get counts all the way around the revolution to 3 decimals, with continuous counts up. I am hoping that means it is working!

Othewise is there something else to check?

And yes, I am confused on why BCC does not output the threading command, I have canned cycles selected. I will have to give them a call. I hear your compliant on BCC. I thought it was pretty good software to begin with, but this posting leaves a lot to be desired. I do like the milling side of it, but haven't had a chance to run the code yet.

Thanks!
Last edit: 13 Oct 2011 00:59 by NICKKINSMAN.

Please Log in or Create an account to join the conversation.

More
13 Oct 2011 01:48 #13876 by andypugh
NICKKINSMAN wrote:

I'm still trying to get my hands around the coding in HAL, but I have the spindle encoder connected and working via PncConf. I have the RPM meter setup in Axis with good readout. When I go into the axis config, I can pull up the rev count pin and I get counts all the way around the revolution to 3 decimals, with continuous counts up. I am hoping that means it is working!


It means it is working, but is it linked back into EMC2?

Put a halmeter on the motion.spindle-revs pin specifically, and see if that follows the encoder position. It needs to increment by 1 for every complete revolution.
You also need motion.spindle-index-enable linked if you want to do threading (but possibly not for that BobCAD way of approximating a thread.)

Machine->show hal config will also indicate if those pins are linked.

Please Log in or Create an account to join the conversation.

More
14 Oct 2011 01:09 - 14 Oct 2011 02:04 #13900 by NICKKINSMAN
I opened up Machine -config and picked the spindle-revs and it counts up at like 20 decimal places on the 'watch', and hits 1 count per revolution (at least as best I can tell, I did not try to match up exactly but it is pretty close by eyeball). I also checked the motion-spindle-enable and it shows;

FALSE motion.spindle-index-enable <=> spindle.index.enable

When selected in 'watch' it shows a red dot.

I believe that means it's connected?

OK, on further testing I may have an index enable problem! I ran a G76 threading cycle to see how it would work, after some initial confusion, I found that it would index and start, but only after stopping the spindle. So, it would not start a pass with spindle moving, but once I stopped and restarted it would do a pass, then return Z and move in X for next pass, but would not start cutting. Once I stopped and re-started the spindle, it would then sync (you could see the hesitation while it waited for the spot to come around, running spindle slow) complete the next pass, return, etc and stop. Stop spindle, restart, Etc, etc....until completed passes.

So, where would my problem lie then? It appears EMC is hooked up, but something is not kicking off the enable to start moving. Sounds like a hardware problem maybe? But on what point? I'll recheck my terminations to the right pins, but since I am getting the right spindle rev counts based on encoder counts, would it be the index signal which is causing the problem??

Thanks for the feedback! Sooooo close....
Nick
Last edit: 14 Oct 2011 02:04 by NICKKINSMAN.

Please Log in or Create an account to join the conversation.

More
14 Oct 2011 01:46 #13902 by andypugh
NICKKINSMAN wrote:

I opened up Machine -config and picked the spindle-revs and it counts up at like 20 decimal places on the 'watch'. I also checked the motion-spindle-enable and it shows;

FALSE motion.spindle-index-enable <=> spindle.index.enable

When selected in 'watch' it shows a red dot.

I believe that means it's connected?


Yes.

The next question is whether index-enable changes state when you run the code. (you probably need Halscope to see that).
Though I am not at all sure that G94 uses index.

Wait, hang on, I have my modes confused (as, possibly, does BobCAM)

G95 is feed-per-rev mode, and is what you might use for a thread if G76 was too confusing.
G94 is feed per minute. I think that G0code just gives you a very, very, slow feed of .063 in/minute. That would look like a stopped machine.

Please Log in or Create an account to join the conversation.

More
14 Oct 2011 02:06 - 14 Oct 2011 02:08 #13903 by NICKKINSMAN
Yes, I added some notes to my previous post, you are absolutely right, it is not changing state - see previous if you would!

And yes you are right BCC is putting out a feed per min based on pitch, which is not cool. They say they will modify the processor as I request, we'll see....

Nick
Last edit: 14 Oct 2011 02:08 by NICKKINSMAN.

Please Log in or Create an account to join the conversation.

More
17 Oct 2011 00:02 #13956 by andypugh
So, perhaps I didn't ask the important question clearly enough. Is the machine actually stopped, or just moving very slowly. (0.063 ipm is rather glacial)
The CAM appears to be specifying a feed-per rev as a feed per min, or perhaps a feed-per-sec.

Please Log in or Create an account to join the conversation.

More
17 Oct 2011 13:07 #13983 by NICKKINSMAN
Thanks for the feecback - the additon of theM6 command does bring up the tool change prompt on running!

For some reason EMC does not like the 'S500 M3 G94 F.063" on that same line with the G01 code, when I get rid of that it runs thru it fine! It might be part of this index-enable problem as well, that it is not getting the OK to proceed because it is waiting for spindle speed to show OK. I'll have to figure this out and try it again!

Please Log in or Create an account to join the conversation.

Time to create page: 0.217 seconds
Powered by Kunena Forum