M6 Remap - Ignores M65

More
07 Feb 2017 21:44 - 07 Feb 2017 21:45 #87492 by SRDC
M6 Remap - Ignores M65 was created by SRDC
I'm having a problem with my NGC code in an M6 remap. The NGC pretty much consistently ignores any M65 command - leaving the signal on perpetually (until I override from the MDI ... which consistently works with an M65 Pxx command).

Any idea what to check?

It does seem strange that the 'splash program' displays the GCode and a highlighted code line (in Axis) when I command M6 Txx, but not sure of 'normal' behavior for that, as on our other mill (which doesn't have a toolchanger), it's been a long time since I've seen that splash program...

Any help is appreciated!
Attachments:
Last edit: 07 Feb 2017 21:45 by SRDC.

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

More
07 Feb 2017 22:24 #87496 by tommylight
Replied by tommylight on topic M6 Remap - Ignores M65
I can not help but i had a similar problem while seting up the tool changer on the Elumatec, namely one of the outputs kept stayng on even after e-stop was active, so only m65 p0 or restarting Linuxcnc it would turn off. I just was not pleased with that so i found an emco comp that ArcEye made and modified that to my needs. It works perfecrly. No remaps no python, just a comp and hal. It does need feedback from tool changer, in my case 4 pins, and they are easily modified in comp to suit your needs.

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

More
08 Feb 2017 12:36 #87532 by andypugh
Replied by andypugh on topic M6 Remap - Ignores M65
I am a bit surprised by this, as this Vismach config uses M65, and worked when I wrote it:

github.com/LinuxCNC/linuxcnc/blob/master...hange/toolchange.ngc

Can you run that config and see if the behaviour is the same as you are seeing with your real machine? (the sim won't try to operate any hardware).

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

More
10 Feb 2017 15:25 #87768 by SRDC
Replied by SRDC on topic M6 Remap - Ignores M65
Finally had a chance to get back and test it this morning. Just running the SIM, it seemed fine. Watched the hal pin for motion-digital-out-00 and it turned on and off during the toolchange, so I assume M65 is working properly in that code.

2 things:
1) Like I mentioned, M65 works in the MDI in my 'real' config ... but not (reliably) in the NGC code. What could be 'overriding' it? I know the NGC code is executing, it hits the abort() lines (typically on the very next line from the M65 command just fine ... the output just never turns off.

2) Even on the SIM, it displays the splash "LINUXCNC" engraving program ... and runs through the lines as if it's running that program even though it's actually running the NGC code (and seems to do that just fine). This is also what it does in my 'real' config. Is this a red herring and just expected behavior because the current NGC program hasn't been 'loaded' into Axis since it's called through a remap? Or does this point to a problem?

Thank you!

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

More
10 Feb 2017 15:27 #87769 by SRDC
Replied by SRDC on topic M6 Remap - Ignores M65
Thank you Tommy.
I may have to resort to that if I can't clear this up, but would really like to avoid having to write/edit a COMP right now ... especially since I have the logic of the NGC / PLC combo nearly working right now.

Right now, I'm also struggling with the machine E-Stopping right after orientation, but that is coming directly from the machine, and seems to be a problem with the machine circuitry expecting something that I haven't figured out yet...

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

More
10 Feb 2017 16:54 #87774 by SRDC
Replied by SRDC on topic M6 Remap - Ignores M65
Also ... it seems to be ignoring M64 P0 randomly right now as well. All works fine from MDI, but not from the atc.ngc

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

More
14 Feb 2017 21:16 #87968 by SRDC
Replied by SRDC on topic Abort gets priority!
I figured out why the M65's were getting ignored...

(abort, ...) commands get priority, since they are comments, and all comments are read first when a block becomes active.
Therefore, anytime the IF loop was entered, it read the (abort, ... ) and executed it ... at which point the M65 obviously couldn't be executed.
I switched to using (MSG, ... ) and M2 combination instead and that fixed it.

The other problem I ran into was that if some lines were commented at the wrong indentation - sometimes - then it somehow made everything after the next M66 not work. Not sure what was going wrong there, but removing all temporarily commented lines (I had them commented out on the far left margin, regardless of indentation level) fixed that.

Now the Mazak VQC 15/40 has a fully operational LinuxCNC controlled ATC! Whoop!

Thanks all!

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

Time to create page: 0.080 seconds
Powered by Kunena Forum