Hello Guest it is March 28, 2024, 07:56:13 AM

Author Topic: Spindle Control Takes 70% of processing power??? (Cant run spindle and G-Code.)  (Read 4321 times)

0 Members and 1 Guest are viewing this topic.

Offline tjhj

*
  •  26 26
    • View Profile
Hi all,

So I have been having a problem with mach recently and I couldn't figure it out for the longest time.

What happens is it seems to load down the processor and then stutter through the tool path. I re built the system ( re installed windows, mach and all my drivers). I had assumed that something had become corrupted in windows ect.

I have been running spindle control on my x3 mill for a while now, it had seemed to be intermittent, and I though it related to the G-Code file. It is most noticeable with long G-code files - 10,000 lines +, or complex 3 axis tool path moves, such as helical entry.

After messing around I noticed that just turning on the spindle maxes out the processor, for a few seconds, then it drops to around 70%, and stays there. No G-Code or anything else running. I just hit f5 to turn on the spindle.

Some Other info that might relate.
At system Idel with mach running system processing is around 2-5%
Running the same (10,000+line) gcode program, complex helical entry tool paths, with mach spindle control turned off, it used 60% of the processing power. Spindle on manual control.

I am judging processing power from the Task Manager Screen.

Mach Version R3.042.040

I am using a controller from Cnc4pc, a C6 Variable Speed Controller. It uses Step and Dir Signals to drive the spindle. I don't use direction control.

Max Spindle Speed is 3,000 RPM. I used to use this same Pc on an X2, with a 4,000 RPM spindle. No problems then...

This seems like something is just wrong, It shouldn't take that much processing to run the equivalent of 1 axis?

Any ideas suggestions on how I can fix this? (other than buy a new pc which I considered but buying anything new with windows xp (32bit).......)

Thank you for you time,

TJ

Note : Attached it my config file, if I somehow have something set really wrong that would be awesome if someone sees it.
« Last Edit: May 05, 2010, 02:28:46 PM by tjhj »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Afraid I know very little about controlling spindles from Mach other than true Step/Dir servo spindles so what I have to say may be of no relevance ;)
First thing is what are the specs of the computer?
I see you have closed loop spindle control enabled, is this needed with the setup you have? As said I dont know about this type of spindle control so it may well be needed but give it a go without and see, unless, that is you know for sure it is needed.
Hood
My guess is that you have electrical noise getting into the computer, causing the processor to go bananas. Just for kicks, try running the same CNC code but with the spindle power disconnected from the motor. In fact, it might be best to pull the spindle control wire off of the output terminal from your digital output board. That way you would completely eliminate all electrical wiring that may be causing the problem.  If the processor doesn't freak out after that, then it proves that you have an electrical noise problem in your system.

Mike
Some people are like a Slinky -- not much good for anything, but it brings a smile to your face when you shove it down a flight of stairs.

Offline tjhj

*
  •  26 26
    • View Profile
Hood,

Its a 2.4 ghz Celeron, 1 Gig Ram, Ati Radon 9250.
Does it load down a computer that much to run a standard step/direction spindle? Closed loop is just nice, to get the exact spindle speed. With the VFD based drive, its not very linear steps/sec to Rpm. So closed loop makes it accurate.
Closed loop on/off seems to have a minimal effect.

Thank you.

XRay-Man,
I am not sure I understand your test.I have tried this.
I placed a switch that changes the VFD Spindle Controller, back to the original pot control. If I switch it to manual control and run the same gcode it runs fine. Spindle On Ground are common, but the diver board is opto isolated from the computer.
My understanding most noise like this would come through the ground/ or lack there of. By leaving the grounds common and having the spindle on (making noise) but manual control. It runs the gcode fine.
I think this means its not noise? Or am I not getting this right?

Thank you both for your time,

I hope I answered what you were asking.

TJ

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Certainly seems like your computer is having issues, a 2.5Gig shouldnt be, I use 1Gig embeded Via Pico mobos and rarely see the CPU above 20%.
I was thinking that possibly the closed loop was bogging things down but as you have tried without then thats not the case.
Do you have lots of other programmes on the computer or is it a clean install with Mach only?
Have you tried the driver test to see what that looks like?
Might be worth trying the optimisation steps outlined on the downloads page.
Hood
tj - It's not clear from your post if the problem has ALWAYS been there, or if the problem just recently occurred, such as after you rebuilt your computer. I was thinking that it could be caused by electrical noise because that's a common problem in CNC systems, especially older ones. Electrical noise can be generated by loose wire connections, poor relay contacts, brush noise (if the motor is a DC brush type), and those sorts of things. Electrical noise occurs when there is arcing due to a poor electrical connection. The arcing generates faulse signals that get into the digital inputs, and the processor doesn't know if they are proper signals, or just erratic noise, and so the processor attempts to handle the chaotic signals with wierd or erratic results. Electrical noise can get into the computer via a ground connection and/or via the signal input lines. So, I was suggesting that you remove the digital signal from the output terminal that controls the Spindle. That way you eliminate wirng, relays, motors, and anything else in the Spindle circuit that can cause electrical noise. If your computer behaves while running the G-code with the Spindle circuit disconnected, then that tells you that the problem is caused by electrical noise. If it is electrical noise, then you will need to troubleshoot the Spindle circuit to determine which wire connection or electrical component is generating the noise.

Good luck!
« Last Edit: May 06, 2010, 03:09:15 PM by xray_man »
Some people are like a Slinky -- not much good for anything, but it brings a smile to your face when you shove it down a flight of stairs.
TJ - You said, "If I switch it to manual control and run the same gcode it runs fine."  That tells me that it's NOT the computer. If the same code runs fine with the switch in manual control mode, but NOT in automatic mode, then there seems to be a problem with the circuitry that automatically controls the motor. Sound logical???
Some people are like a Slinky -- not much good for anything, but it brings a smile to your face when you shove it down a flight of stairs.