Page 1 of 2
Toolspindel Speed feedback Signal
Posted: Sat Feb 10, 2024 7:31 am
by Houseman303
Is it possible to use the tool spindle speed signal as a feedback signal for the control?
Re: Toolspindel Speed feedback Signal
Posted: Mon Feb 12, 2024 3:01 pm
by cnckeith
yes,
program the plc program to look at an input as actual spindle rpm.
The Acorn/AcornSix Wizard has this as one of its canned programmed features.
Re: Toolspindel Speed feedback Signal
Posted: Thu Feb 15, 2024 2:01 pm
by cncsnw
Heiko,
What is the maximum RPM of your spindle?
Does your spindle's speed sensor indeed have a 50% duty cycle (as shown in the graph), so that -- at constant speed -- "on" time is equal to "off" time?
Re: Toolspindel Speed feedback Signal
Posted: Fri Feb 16, 2024 4:14 pm
by Houseman303
The spindle has 24000 rpm.As I understand it, 2 pulses from the sensor per revolution. A maximum of 48,000 pulses per minute.
Re: Toolspindel Speed feedback Signal
Posted: Fri Feb 16, 2024 8:07 pm
by cncsnw
With those numbers, it will not be possible for the Centroid PLC to reliably count pulses and report RPM.
The maximum frequency for PLC program scans is 1kHz (1000 scans per second).
With two square-wave cycles per spindle revolution, and 24000 RPM, your spindle-rotating signal will go through 800 cycles per second.
For a good illustration of why we cannot reliably measure spindle speed by looking at the rotation sensor 1000x per second, see:
https://xiengineering.com/sampling-freq ... -aliasing/
If you have a compelling reason to want to use this sensor, then some type of intervening electronics will be needed.
Someone proficient with PALs could probably build a simple divider, so that the PLC sees half the pulse frequency (as if the spindle has one pulse per turn instead of two).
Or maybe you could use a frequency-to-voltage converter, since you have an Oak control with an analog input available. Of course, that would preclude a spindle load meter...
What is your reason for wanting this feedback?
The two most common reasons I can think of are:
1) To get an accurate speed display on the screen while running, and
2) To know when the spindle has finished decelerating to a stop, so that tool changes are not allowed while still spinning.
With a decent open-loop vector drive powering the motor, and a little time matching the CNC12 settings to the VFD settings, the RPM displayed on the screen will be well within 1% of the actual speed while running.
If you are using ramped deceleration, then a "zero-speed" output from your VFD to the PLC will reliably tell when the motor has been brought to a stop.
What type of spindle drive are you using?
Re: Toolspindel Speed feedback Signal
Posted: Sat Feb 17, 2024 1:29 am
by Houseman303
It is a Delta VFD055E43A inverter.
CNC12 doesn't wait for the spindle when it changes the speed, at least I can't find any parameters where I could set a pause for waiting when the speed changes like with my old CNC control
Re: Toolspindel Speed feedback Signal
Posted: Sat Feb 17, 2024 1:45 am
by cncsnw
Do you program speed changes mid-tool, with just an S code?
Or does each new speed come with an M3 (or M4) code?
If the latter, and you just want to wait long enough for the spindle to get up to speed, you could add a G4 dwell time to M3 and M4 macros. If you don't want to wait too much longer than necessary, the dwell time could be computed based on the requested RPM (#4119) and whatever value you put in Parameter 37. Something like "G4 P[#9037 * #4119 / #25006]" should work, assuming you do not need to account for multiple spindle gear ranges.
If you also want to automatically wait in situations like this:
Code: Select all
M3 S12000
G0 X0 Y0 Z2
G1 F200 Z-4
F600 X200
Y200
S18000 F300
X0
Y0
G0 Z2
M5
... then yes, it would be nice to have actual speed reported by the PLC, so that you could Parameter 78 bit 2 and Parameter 149, to get an automatic pause in motion while the spindle accelerates from 12000 to 18000. But that is getting pretty obscure, and could probably be solved in the postprocessor if needed.
Re: Toolspindel Speed feedback Signal
Posted: Sat Feb 17, 2024 12:38 pm
by Houseman303
I work with a cam that optimally adapts the spindle speed to the material (automatically). The speed is also adjusted during processing.
Re: Toolspindel Speed feedback Signal
Posted: Sat Feb 17, 2024 3:43 pm
by cncsnw
Can you change your CAM post-processor so that it writes out an M3 (or M4) code with each new speed, even if the spindle is already running?
That is probably your best pathway to getting an automatic pause while the spindle gets up to speed.
Even if the rotation sensor could be conditioned to work with the PLC, I doubt that CNC12 will use the PLC-reported spindle speed with the pause feature in Parameters 78 and 149. That feature is specifically looking for a spindle rotation encoder, plugged into one of the encoder ports.
Re: Toolspindel Speed feedback Signal
Posted: Tue Feb 20, 2024 12:43 pm
by Houseman303
I checked it, with every speed change the M command is also output.