Spindle at speed - time delay

More
16 Sep 2022 07:06 #252066 by tommy
I have configured my machine with mesa configurator, so spindle configuration is:
# Spindle

# Spindle Velocity Pins
net spindle-vel-cmd-rps <=  spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs

# Spindle Command Pins
net spindle-on <= spindle.0.on
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake
net spindle-revs => spindle.0.revs
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net spindle-index-enable => spindle.0.index-enable

# Set spindle at speed signal
sets spindle-at-speed true

# Spindle Board Connections
net spindle-on => hm2_7i95.0.pwmgen.00.enable
net spindle-vel-cmd-rpm hm2_7i95.0.pwmgen.00.value
setp hm2_7i95.0.pwmgen.00.scale [SPINDLE]MAX_RPM
setp hm2_7i95.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY
setp hm2_7i95.0.pwmgen.00.output-type [SPINDLE]SPINDLE_PWM_TYPE

As I don't have feedback from VFD when spindle is at speed, I would like to add time delay. What would be the correct way to do it?

Please Log in or Create an account to join the conversation.

More
16 Sep 2022 11:30 #252070 by tommylight
You can add a delay in gcode by using G04 Pn , where n is the time in seconds and should be 2 or more seconds over the "ramp up" time on the VFD, just to be sure.
Also this way you can edit and change it without reloading LinuxCNC and homing and ....
The following user(s) said Thank You: Aciera

Please Log in or Create an account to join the conversation.

More
16 Sep 2022 12:48 #252074 by Aciera
Should you want to handle the delay outside of your gcode you could add the delay in your hal file by replacing this:

# Set spindle at speed signal
sets spindle-at-speed true

with this for a 5s delay (or change value in line 3)

loadrt timedelay count=1
addf timedelay.0 servo-thread
setp timedelay.0.on-delay 5
net spindle-on => timedelay.0.in
net spindle-timer <= timedelay.0.out
net spindle-timer => motion.spindle-at-speed

See the discussion of the above solution and other options here:
forum.linuxcnc.org/21-axis/29564-automat...tarted?start=0#61840
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

More
17 Sep 2022 01:00 #252133 by cmorley
It;s too bad we don't have a pin from motion like: waiting-for-spindle-at-speed and that would make it easy.

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum