Spindle.0.at-speed False not inhibiting motion
11 Feb 2024 01:29 - 11 Feb 2024 01:36 #293050
by davew
Spindle.0.at-speed False not inhibiting motion was created by davew
I'm commissioning a retrofitted Deckel FP4NC mill running 2.9.1 and am stuck trying to figure out why axis motion is not being inhibited during a speed change running in auto mode using a hand coded G code file - a warmup routine exercising each axis and stepping up in speed with each cycle of motion. On each change in speed, axis motion continues while the spindle motor stops, the mill changes gear and restarts the motor. The spindle.0.at-speed pin seems to change state as you'd expect going False on the change in speed command and only going True when the spindle is up to speed. The axis moves are G1 moves.
The spindle motor is powered via a VFD and the mill has a gearbox controlled by a non-real-time user component. When the speed demand changes, the user component stops the motor, shifts gear to the appropriate gear, sets the motor speed setpoint via the VFD and starts the motor. There is speed feedback from the motor VFD.
The spindle.0.at-speed pin is set in the HAL file so that it isn't subject to time delays in the user component. There are a few steps in calculating the spindle.0.speed-in pin in the HAL file. The input voltage goes through a low pass filter, a scale component to convert from motor feedback voltage to revs per second, and another scale component using the gear ratio to get to spindle speed in revs per second.
I've attached a diagram of the HAL file along with the actual HAL file, and some screen shots from HALscope, and the Gcode file. There seems to be about a 2ms delay between the change in speed command and the spindle at speed pin going False.
Any suggestions for what to try next? Thanks!
The spindle motor is powered via a VFD and the mill has a gearbox controlled by a non-real-time user component. When the speed demand changes, the user component stops the motor, shifts gear to the appropriate gear, sets the motor speed setpoint via the VFD and starts the motor. There is speed feedback from the motor VFD.
The spindle.0.at-speed pin is set in the HAL file so that it isn't subject to time delays in the user component. There are a few steps in calculating the spindle.0.speed-in pin in the HAL file. The input voltage goes through a low pass filter, a scale component to convert from motor feedback voltage to revs per second, and another scale component using the gear ratio to get to spindle speed in revs per second.
I've attached a diagram of the HAL file along with the actual HAL file, and some screen shots from HALscope, and the Gcode file. There seems to be about a 2ms delay between the change in speed command and the spindle at speed pin going False.
Any suggestions for what to try next? Thanks!
Last edit: 11 Feb 2024 01:36 by davew. Reason: screen shots not displaying in-line?
The following user(s) said Thank You: pippin88
Please Log in or Create an account to join the conversation.
11 Feb 2024 03:42 #293053
by cmorley
Replied by cmorley on topic Spindle.0.at-speed False not inhibiting motion
What does this do - it mntions the at speed pin?
loadusr -W mqtt-publisher --mqtt-broker=[MQTT]BROKER \
--mqtt-user=[MQTT]USERNAME --mqtt-password=[MQTT]PASSWORD \
keys=iocontrol.0.emc-enable-in,\
halui.machine.is-on,\
halui.mode.is-auto,\
halui.mode.is-manual,\
halui.mode.is-mdi,\
spindle.0.speed-in,\
spindle.0.at-speed,\
spindle.0.override.value,\
motion.feed-mm-per-minute,\
motion.feed-inhibit,\
halui.feed-override.value
loadusr -W mqtt-publisher --mqtt-broker=[MQTT]BROKER \
--mqtt-user=[MQTT]USERNAME --mqtt-password=[MQTT]PASSWORD \
keys=iocontrol.0.emc-enable-in,\
halui.machine.is-on,\
halui.mode.is-auto,\
halui.mode.is-manual,\
halui.mode.is-mdi,\
spindle.0.speed-in,\
spindle.0.at-speed,\
spindle.0.override.value,\
motion.feed-mm-per-minute,\
motion.feed-inhibit,\
halui.feed-override.value
Please Log in or Create an account to join the conversation.
11 Feb 2024 04:26 - 11 Feb 2024 05:39 #293058
by davew
Replied by davew on topic Spindle.0.at-speed False not inhibiting motion
It publishes a set of pins once per ten seconds over wifi to another PC running a mosquitto MQTT broker and feeding a monitoring dashboard - just an experiment in getting some IoT style communication of machine status.
Last edit: 11 Feb 2024 05:39 by davew. Reason: correct rate
Please Log in or Create an account to join the conversation.
- Alexandrion
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 3
07 Aug 2024 23:33 #307233
by Alexandrion
Replied by Alexandrion on topic Spindle.0.at-speed False not inhibiting motion
I have the same issue as you. Did you find a solution?
Please Log in or Create an account to join the conversation.
08 Aug 2024 12:28 #307260
by spumco
Replied by spumco on topic Spindle.0.at-speed False not inhibiting motion
Just speculating, but I wonder if there's a timing issue.
According to the manual, motion will be paused "before the first feed move after each spindle start or speed change"
Perhaps motion isn't being halted if a feed move is underway (even by 2ms) when the at-speed signal goes false.
Just to test, I'd throw a short G4 pause in the program right before the speed change and see if that corrects the behavior.
According to the manual, motion will be paused "before the first feed move after each spindle start or speed change"
Perhaps motion isn't being halted if a feed move is underway (even by 2ms) when the at-speed signal goes false.
Just to test, I'd throw a short G4 pause in the program right before the speed change and see if that corrects the behavior.
Please Log in or Create an account to join the conversation.
- Alexandrion
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 3
09 Aug 2024 17:54 - 09 Aug 2024 17:55 #307376
by Alexandrion
Replied by Alexandrion on topic Spindle.0.at-speed False not inhibiting motion
You may be right about the timing because I tested the code below and works as expected, but I had to put G4 after the speed line.
%
G90 G17 G40 G80
S50 M3
G4 P0.1
G1 x0 F1000
S100
G4 P0.1
G1 X100
S300
G4 P0.1
G1 X200
S700
G4 P0.1
G1 X100
S1700
G4 P0.1
G1 X0
M30
%
Last edit: 09 Aug 2024 17:55 by Alexandrion.
Please Log in or Create an account to join the conversation.
09 Aug 2024 18:18 #307377
by Henk
Replied by Henk on topic Spindle.0.at-speed False not inhibiting motion
If spindle at speed signal goes false during a feed move, motion does not stop. It will only stop at the end of the current move,before the next move.
We have 3 deckels, all with gearboxes that are automated. I always invert the spindle at speed signal and connect it to motion.feed-inhibit to deal with this issue
Henk
We have 3 deckels, all with gearboxes that are automated. I always invert the spindle at speed signal and connect it to motion.feed-inhibit to deal with this issue
Henk
Please Log in or Create an account to join the conversation.
- Alexandrion
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 3
09 Aug 2024 20:46 #307385
by Alexandrion
Replied by Alexandrion on topic Spindle.0.at-speed False not inhibiting motion
That is exactly what I did to solve the issue. The interesting part is that this behavior become apparent only after I upgraded my PC and changed my Mesa 5i25(PCI) with 7I92TF(ethernet).
Please Log in or Create an account to join the conversation.
10 Aug 2024 02:46 #307397
by Henk
Replied by Henk on topic Spindle.0.at-speed False not inhibiting motion
I can confirm that it is not due to that. 2 of our deckels use 5i25s and it happens with them as well. Motion.feed-inhibit takes care of the issue.
It has been this way since I started using linuxcnc in 2014 on version 2.6
Henk
It has been this way since I started using linuxcnc in 2014 on version 2.6
Henk
Please Log in or Create an account to join the conversation.
Time to create page: 0.126 seconds