Current turning capabilities status
This one I really did not expected, and it is for sure not my case.In fact I am not all that convinced that closed-loop is even necessary with a VFD.
In all of my parts I use constant surface speed, so it is necessary to have the spindle at the speed required by the controller.
My lathe only has a 1kW motor, and I don't run PID. I get constant surface speed, and no real problem with the spindle slowing under cuts.
This is with the "standard" setup where the pwmgen.scale is set to 1500 (rpm) and the 10V speed of the VFD is set to 100Hz.
So, M3 S750 = 50% PWM = 5V = 50Hz. And that is the speed that the motor runs at.
As you increase the load on an induction motor is slows slightly relative to the VFD frequency, but not _very_ much.
If you look at this diagram: www.mindconnection.com/images/library/mo...nduction%20Motor.jpg then you can either accept the increase in slip and decrease in speed as the torque increases, or you can attempt to use a PID to increase the frequency, in effect rotating the A and B lines clockwise so that the motor speed is constant with torque. This is the slip compensation described in the article that that diagram came from: www.mindconnection.com/library/electrical/motorslip.htm
I don't know what the typical "slip" is of an induction motor at full load, but I think it is only a few %. So all the PID can do is give you that last few % of cutting speed accuracy. And you will probably find yourself experimenting by several 10s of % of spindle speed when looking for the best machining results.
So, this is why I am saying that PID may not be necessary with an induction motor and VFD setup.
Actually, I am not 100% sure that your motor isn't permanent magnet. In that case there is no slip, and the motor should run at exactly the speed that the VFD is set to.
The servo PIDs are controlling motor speed (or torque) to achieve a position. When the position is correct, the motor can turn off and the position stays correct. (that is, zero position error -> zero P-term -> zero PID output)It is allowed to have a bit of variation, but as my test showed the PID is not working as expected. The rest of the PID's in my system for the servos are working ok, and I only have the P=1 set up.
For the spindle you have velocity in and velocity out. It is _not_ correct to turn the motor off when the speed is correct, because the motor will then slow down. So, the "P" term is not the most important part of your spindle PID controller.
So, as I said, first get the speed control as good as you can using _only_ the FF0 term, with everything else at zero. This is equivalent to the open-loop spindle control that I use on my lathe. You probably then need just a bit of I-gain to compensate for the errors. You may not want any P-gain at all.
But I think that PCW is on the right track when he says that your runaway is due to the "abs" functions.
Consider the situation when you have only a P-term and you command a spindle speed that is lower than the current speed. The PID output is negative, because the error is negative. But the abs-function converts the negative PID output to a positive voltage to the VFD. The motor speeds up. The error is now bigger, so the PID calculates an even bigger negative value, which the abs function makes in to an even bigger voltage command to the vfd…
If The P-term is small and the FF0 term is large, you won't see this, because (FF0 + (negative)P ) will still be a positive number.
But for a VFD-controlled spindle I am fairly sure that what you want is just FF0 and I, no P or D.
Please Log in or Create an account to join the conversation.
My lathe only has a 1kW motor, and I don't run PID. I get constant surface speed, and no real problem with the spindle slowing under cuts.
This is with the "standard" setup where the pwmgen.scale is set to 1500 (rpm) and the 10V speed of the VFD is set to 100Hz.
So, M3 S750 = 50% PWM = 5V = 50Hz. And that is the speed that the motor runs at.
In my case I also have it linear and without any PID compensation the output (with no load) fails the desired speed at most 100 rpm in 2500 rpm; or 15 rpm at 200 rpm. The issue is really the work under load at low speeds were the motor will display less torque.
Very good info there. Will test extensily and will post the results.The servo PIDs are controlling motor speed (or torque) to achieve a position. When the position is correct, the motor can turn off and the position stays correct. (that is, zero position error -> zero P-term -> zero PID output)
For the spindle you have velocity in and velocity out. It is _not_ correct to turn the motor off when the speed is correct, because the motor will then slow down. So, the "P" term is not the most important part of your spindle PID controller.
So, as I said, first get the speed control as good as you can using _only_ the FF0 term, with everything else at zero. This is equivalent to the open-loop spindle control that I use on my lathe. You probably then need just a bit of I-gain to compensate for the errors. You may not want any P-gain at all.
But I think that PCW is on the right track when he says that your runaway is due to the "abs" functions.
Consider the situation when you have only a P-term and you command a spindle speed that is lower than the current speed. The PID output is negative, because the error is negative. But the abs-function converts the negative PID output to a positive voltage to the VFD. The motor speeds up. The error is now bigger, so the PID calculates an even bigger negative value, which the abs function makes in to an even bigger voltage command to the vfd…
If The P-term is small and the FF0 term is large, you won't see this, because (FF0 + (negative)P ) will still be a positive number.
But for a VFD-controlled spindle I am fairly sure that what you want is just FF0 and I, no P or D.
I would really want a compensation so that the desired speed is quite similar to the real speed, even on load.
What is your profession, if I may ask?
Please Log in or Create an account to join the conversation.
I have done a lot of jobs, I was a metallurgist straight after my PhD, then moved into structural integrity and mechanical testing, then worked on skin graft research for a little while, then became a mechanical designer, then an NVH engineer at a car company, then spent a while designing X-ray microscopes. At the moment I am back in the auto industry where I set up engine control computers. (lots of rather elaborate PID controllers).What is your profession, if I may ask?
Please Log in or Create an account to join the conversation.
1)
Axis are running, spindle is running, toolchange is done. Not bad for now.
As the machine does automatic toolchanges (and many for each part), every time that the tool change happens, the spindle stops. I think that this is a desired feature for milling machines, but for lathes it is a waist of power and time as the spindle must brake and gain speed again.
I hope that this is easy to change/set up, but I could not find any info about this.
I must say that the toolchange is being done by a component programmed here, but the component does not ask for the spindle stop.
Thank you
Please Log in or Create an account to join the conversation.
so linuxcnc can support it, but we have no idea how to do it.
Who made the video? Is someone that uses this forum?
Please Log in or Create an account to join the conversation.
1) every time that the tool change happens, the spindle stops. I think that this is a desired feature for milling machines, but for lathes it is a waist of power and time as the spindle must brake and gain speed again.
It's an INI-file option: [EMCIO] TOOL_CHANGE_WITH_SPINDLE_ON = 1
www.linuxcnc.org/docs/html/config/ini_co..._sub_emcio_section_a
Please Log in or Create an account to join the conversation.
It was worth it!
Please Log in or Create an account to join the conversation.
Some small issues are not completely done (we were unable to produce what we want), so if anyone can give me a good way to atchieve the following (or just one point):
1) I normally do repeative work, and the toolpath preview stays with the last run part on it. I have to "clean the toolpath" before I start again a new cycle. Can this be automatically (when a new cycle start, the toolpath is also cleaned from the previous made part)?
2) I have a physically start and a stop button. I want that the stop button do the following: If the machine is running, when the user presses the stop, the machine makes a pause (feedhold) with the spindle rotating, if the user presses again the same button, it should be equal to cycle stop. The first was done, but we were unable to give a second functionality to the button based on the condition that I described.
3) Also, I have a feed override button, that works very well (0 to 200%). The button is only able to override the G1,G2,G3 movements, not the fast movements G0. My interest is to give the ability for the user to control both feedrates from the same button. This is very usefull to test a part, were the proximity movements are in general all made by G0.
4) We use a touch screen. All works good, but the buttons on linux (not only in linuxcnc) are very small. The top bar, when I want to close for example the text editor is hard to press (I press all around it except the button that I want ). For linuxcnc itself Gmocapy will probably be a solution that I did not yet tested.
Please Log in or Create an account to join the conversation.
Possibly, it is possible to do it from a scriptCan this be automatically (when a new cycle start, the toolpath is also cleaned from the previous made part)?
linuxcnc.org/docs/html/man/man1/axis-remote.1.html
The remainder of the puzzle is how to do it from HAL (or possibly from G-code)
One possibility is to have a custom M-code to call a script that clears the display. This would need you to insert that M-code in the G-code file.
www.linuxcnc.org/docs/html/man/man9/multiclick.9.html2) I have a physically start and a stop button. I want that the stop button do the following: If the machine is running, when the user presses the stop, the machine makes a pause (feedhold) with the spindle rotating, if the user presses again the same button, it should be equal to cycle stop. The first was done, but we were unable to give a second functionality to the button based on the condition that I described.
I think you can do that by changing the max-velocity rather than the feed-override. In the "Touchy" interface this is part of the UI. I am not sure which UI you are actually using.3) Also, I have a feed override button, that works very well (0 to 200%). The button is only able to override the G1,G2,G3 movements, not the fast movements G0. My interest is to give the ability for the user to control both feedrates from the same button. This is very usefull to test a part, were the proximity movements are in general all made by G0.
4) We use a touch screen. All works good, but the buttons on linux (not only in linuxcnc) are very small. The top bar, when I want to close for example the text editor is hard to press (I press all around it except the button that I want ). For linuxcnc itself Gmocapy will probably be a solution that I did not yet tested.[/quote]
Have a look through the "themes", there might be a more touch-oriented one.
Please Log in or Create an account to join the conversation.