Page 1 of 1

M95 not working?

Posted: Tue Oct 29, 2019 1:00 am
by HoY
I've been working towards getting my ATC up and running, and I'm getting close.
One thing that I believe could be my fault (somehow?) is my M95/15 call in my m6 macro does not clamp the tool clamp. the M94 Does unclamp the tool holder, and I can actuate it manually both clamped and unclamped via ctrl+alt+f while in the I/O screen.

My understanding based on what ive been reading over the last few days, is that using M94 and M95 ignores the tool unclamped sensor. I am still waiting for an opto isolated relay to properly wire up that sensor.
attached is the m6 macro, and the report.zip. if anybody wants any other files to narrow it down I will be more than happy to send them as well!

(ps; i know some of the movements in the m6 are still a bit off, a little bit more work to do there still)

Re: M95 not working?

Posted: Tue Oct 29, 2019 9:00 am
by cnckeith
hello. please post more info.. photos of machine and the ATC so we know what we are working with.

Re: M95 not working?

Posted: Tue Oct 29, 2019 3:38 pm
by cncsnw
It looks to me like a bug in the PLC program.

There is code on line 3467 which SETs the output (OUT2, "UnclampTool") in response to an M15 request.

The only code which ever RSTs the output is on line 3480, in the block which is triggered only in the event of a tool unclamping timeout fault.

There is no code that turns off the tool unclamp output in response to removal of the M15 request. Assuming the supplied M16 macro is supposed to work with this PLC source file, then code to turn off the tool unclamp output when M15 is removed should have been included.

However, the comments that accompany the M function definitions in the PLC source (lines 1441-1443) are ambiguous. It is not clear to me whether the PLC author intended to treat "tool unclamp" and "chuck" as separate devices or not, nor whether M16 is just supposed to cancel M15 (as the macro file suggests) or whether M16 is supposed to be a separate request, affecting something called the "chuck" (as the PLC source suggests).

Re: M95 not working?

Posted: Tue Oct 29, 2019 5:26 pm
by Allin1Chris
Hello,

cncsnw is correct that this is a bug in the current PLC released version of the plc. This is addressed in the upcoming software update. However a very simple fix is to change the following lines.

Line 3467
"IF M15 THEN SET UnclampTool, SET ToolUnclampTimer"
To
IF M15 THEN (UnclampTool), SET ToolUnclampTimer

And Line 3470
IF UnclampTool && ToolUnclampedState_M THEN RST ToolUnclampTimer
To
IF UnclampTool && ToolUnclampedState_M || !M15 THEN RST ToolUnclampTimer

Attached is a plc edited and compiled with this same fix. Just open the zip file up and extract the files into you cncm directory. Be aware that if you open up the wizard and make changes that require a plc change, this fix is overwritten. You can ofcourse go back in the plc.src and do what i described above and recompile the plc.

We have a Manual for PLC Programming
https://www.centroidcnc.com/centroid_di ... manual.pdf
And video tutorial series!
https://www.youtube.com/playlist?list=P ... i2WKIedQlQ
In case you are interested.

Re: M95 not working?

Posted: Tue Oct 29, 2019 7:28 pm
by HoY
Thank you both very much. I thought I may have changed something myself that stopped this from working, since I was not able to find anyone else having this specific problem with a quick search here on the forums.
Since I’m still setting everything up on my machine, and I end up in the wizard more than once a session, it might just be simpler for me to change the m94 and m94 to m62 and m82, and unassigned the output 2 for now. Are there any drawbacks to this? I’d like to use the software as intended if possible but as a workaround I don’t need to repeat every time I make a change