Sporadic spindle enable signal

If you think you've found a bug post it here.

Sporadic spindle enable signal

Postby per.takman » Tue Oct 25, 2016 9:31 pm

Dear CNCDrive,

I've previously reported a bug where I noticed sporadic spindle enable signals from my UC400ETH. At the time, you believed that root cause was the recently included autoleveler plugin. The recommendation was to remove it, which I did. Since then I've been very careful to turn the spindle power supply off every time I change tools.

However, this evening I noticed the bug again. I just want to mention that I've recently connected pin 2 on IO port 2 to a opto-isolated relay board from Keyes. I use it to turn my exhaust system on/off, but I don't see how adding this feature could affect IO port 1.

It seems to me like the root cause was not found and that this ticket/bug report needs to reopened. Let me know what you find!

Best regards,

Per Takman
per.takman
 
Posts: 23
Joined: Sun Sep 18, 2016 9:15 pm

Re: Sporadic spindle enable signal

Postby per.takman » Wed Oct 26, 2016 7:06 am

I forgot to mention that this was observed with version 1.2022. I've upgraded to latest and will keep it under observation.
per.takman
 
Posts: 23
Joined: Sun Sep 18, 2016 9:15 pm

Re: Sporadic spindle enable signal

Postby A_Camera » Wed Oct 26, 2016 8:35 am

Hej Per,

Really, the only trustworthy solution is this:

Image

This solution is conforming to standards EN 954-1 category 1 and IEC/EN 61508 capacity SIL1, stopping category 0 in accordance with standard IEC/EN 60204-1. This is the absolute safest way of making sure you are not getting injured because of unintentional spindle rotation. The switch should of course never be used for on/off control of the spindle, it should be operated only when the spindle is stopped. If the spindle relay would for any reason be activated while the safety switch is in off position the spindle will never start rotating and you are safe. The VFD may or may not get damaged, but that is of secondary importance in this case, personal safety comes first.

If you use the main switch as safety switch when you change tools you will be conforming to standards ISO13849 category 1 and IEC/EN 61508 capacity SIL1, stopping category 0 in accordance with standard IEC/EN 60204-1, which is also good, but it has the disadvantage of pretty long waiting time before you can regard the spindle "safe to touch" and after, when you want to start the spindle. If a Run command is executed while the main circuit breaker between the drive and the motor is still open, there may be residual voltage at the output of the drive and the spindle may still spin up for a short while. Different VFDs have different capacitor discharging times and different VFDs behave differently, but generally you should wait until about a minute or even more before the spindle is safe to touch at the tool end. Starting up is also time consuming since even here it takes several seconds, depending on the VFD. Also, frequently switching the mains on and off may shorten the life of your VFD. Excessively frequent starting and stopping will shorten the life time of DC-bus capacitors, and may destroy the resistor for capacitor charging and current limitation. The recommendation for my VFD (Bosch Rexroth EFC5610) is to wait 15 minutes between, so following that would be pretty painful.

I change tools often and many of work passes takes only about 2-3 minutes, so using the mains switch as safety is out of the question for me. On the other hand, I would NEVER trust any software/firmware/hardware when I have my hands on or near the tool which is why I implemented this safety switch. It is a very cheap life insurance, but it is not automatic and demands some discipline from my side, but that's OK. Even if the bug gets fixed, you never know what may cause a momentary spindle relay activation when you set the tool length, use auto zero, center finding or any other routines with your hands near or on the tool.

I am using the UC300ETH now, though have not really used it for any work yet, and I can't really use UCCNC, but I have seen some times the relay kicking in for a very brief moment. This happens only during startup so far, but there is no way I trust any firmware controlled relays for such critical function, so the safety switch is off when I have my hands in a danger area. I used the UC300USB before and some times it lost contact with the PC (Mach3 not UCCNC) and in that case the spindle just kept spinning even though the motion is stopped, which is also not very good, but I have never heard any relay clicking during probing or any other activity. Note that I had a safety switch even with that and my DC spindle I used before.
A_Camera
 
Posts: 657
Joined: Tue Sep 20, 2016 11:37 am

Re: Sporadic spindle enable signal

Postby cncdrive » Wed Oct 26, 2016 3:30 pm

per.takman wrote:Dear CNCDrive,

I've previously reported a bug where I noticed sporadic spindle enable signals from my UC400ETH. At the time, you believed that root cause was the recently included autoleveler plugin. The recommendation was to remove it, which I did. Since then I've been very careful to turn the spindle power supply off every time I change tools.

However, this evening I noticed the bug again. I just want to mention that I've recently connected pin 2 on IO port 2 to a opto-isolated relay board from Keyes. I use it to turn my exhaust system on/off, but I don't see how adding this feature could affect IO port 1.

It seems to me like the root cause was not found and that this ticket/bug report needs to reopened. Let me know what you find!

Best regards,

Per Takman


Hi Per,

When you reported this issue I looked after it, but did not find anything.
Also nobody else reported any similar problems so far, so I'm not sure what exactly to look for.
What I did last time is that I placed a breakpoint to the internal function call where the M3 and M4 switches so the software would debug-break any time it got a M3 or M4 spindle turn on call.
Since you said it happened at you when you doing nothing I left the software like that with a UC400ETH for a whole weekend and checked it on Monday, but the breakpoint did not trigger.
Also I've checked for possible errors in the code which could possible call these functions, but did not find anything.

I know we talked about this earlier, but could you confirm again that when this issue happens then the M3 or M4 button goes from the off state to the on state?
I mean the button switches to the on state?
And is there anything, I mean any actions or any happenings you see and which looks to be related to the spindle on action?
cncdrive
Site Admin
 
Posts: 4985
Joined: Tue Aug 12, 2014 11:17 pm

Re: Sporadic spindle enable signal

Postby per.takman » Wed Oct 26, 2016 3:59 pm

Hi cncdrive,

I agree that your extensive investigation should have caught it. My impression was that the problem occured more frequently with the autoleveler plugin loaded, but I may be wrong. I also got the impression that you believed that the plugin was involved somehow.

In any case, I confirm that the button also change state when this happens. In my case it is the CW button that changes state. Is there a keyboard shortcut for this? Maybe I have a keyboard problem?

I have not been able to figure out which actions that are connected with it since I was working next to the machine on a different computer.

I'll do some long term tests myself and let you know what I find...

Cheers, Per
per.takman
 
Posts: 23
Joined: Sun Sep 18, 2016 9:15 pm

Re: Sporadic spindle enable signal

Postby per.takman » Wed Oct 26, 2016 11:03 pm

Hi cncdrive,

After having upgraded to latest version of the software it took several hours before the bug finally appeared again. However, while brushing my teeth (in my bathroom) I heard the spindle spin up with the software just idling without even a NC file loaded.

/Per
per.takman
 
Posts: 23
Joined: Sun Sep 18, 2016 9:15 pm

Re: Sporadic spindle enable signal

Postby cncdrive » Thu Oct 27, 2016 8:43 am

Hi Per,

The Spindle on CW (M3) can be called from several places:

- From the screen buttons via button codes calls.
- With M3 macro from MDI or from G-code execution or from passing "M3" Code via plugin or other macro or macro loop.
- With the button code call from macro or plugin or macro loop.
- With hotkeys with keyboard key presses with the M3 on/off or toggle code attached to a hotkey.
- With inputs trigger where you can attach the M3 on/off or toggle codes to a rising or falling edge of a signal on a physical input pin.

If the M3 button lights up on the screen when the issue happens then it is sure that the Spindle on CW function is called by something inside the PC side software
and it is sure it is not somekind of bug in the motion controller or API code, because the button state is switched on the PC side when the Spindle switching function is called by something,
this is why I asked you to make sure and confirm that the button goes ON when the issue happens, because this is a very important informations for me to see the issue clearly.

I have an idea that I will try to make a special exe version for you which prints the Stack function names onto the screen or into file, so when the issue happens you could show that to me and I will then see the root back to the caller function, so then hopefully we could identify the reason with seeing the caller function...
cncdrive
Site Admin
 
Posts: 4985
Joined: Tue Aug 12, 2014 11:17 pm

Re: Sporadic spindle enable signal

Postby per.takman » Thu Oct 27, 2016 8:46 am

Good idea! I'm willing to try that.

/Per
per.takman
 
Posts: 23
Joined: Sun Sep 18, 2016 9:15 pm

Re: Sporadic spindle enable signal

Postby cncdrive » Thu Oct 27, 2016 4:03 pm

I've made an exe for you which traces the M3 events.
I did not have much time for it, so it is simple. When the spindle on CW is called then the Stack frames function names are printed in a listbox on a popup window.
The screen may appear more than one time for a single call, because I had to place the trace to more than one places to make sure I can clearly identify the caller from the results
and this is because there can be calls from different threads in the software and the trace can't root back outside of the thread...
So, what I would like you to do is to try to reproduce the issue and if it happens then send me the printscreens of all the Trace popup screens.

And what you have to do first is download this exe file and replace the original UCCNC.exe in the UCCNC directory.
http://cncdrive.com/UCCNC/UCCNC.exe

You can test how it works with simply pressing the M3 button or executing M3 code via MDI.
One more thing is that this exe works only with the 1.2027 installation!
cncdrive
Site Admin
 
Posts: 4985
Joined: Tue Aug 12, 2014 11:17 pm

Re: Sporadic spindle enable signal

Postby per.takman » Mon Oct 31, 2016 11:23 pm

I tried downloading the version you prepared, but it does not start. You mentioned that it only works with version 1.2027, but the latest version on your website is 1.2026. Is this a typo or do I need a newer version?

Cheers, Per
per.takman
 
Posts: 23
Joined: Sun Sep 18, 2016 9:15 pm

Next

Return to Report a bug

Who is online

Users browsing this forum: No registered users and 1 guest