EMC stops executing code (code format issue?)
- NICKKINSMAN
- Offline
- Senior Member
- Posts: 54
- Thank you received: 0
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.
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.
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.
- NICKKINSMAN
- Offline
- Senior Member
- Posts: 54
- Thank you received: 0
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!
Please Log in or Create an account to join the conversation.
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.
- NICKKINSMAN
- Offline
- Senior Member
- Posts: 54
- Thank you received: 0
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
Please Log in or Create an account to join the conversation.
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.
- NICKKINSMAN
- Offline
- Senior Member
- Posts: 54
- Thank you received: 0
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
Please Log in or Create an account to join the conversation.
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.
- NICKKINSMAN
- Offline
- Senior Member
- Posts: 54
- Thank you received: 0
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.