Spindle delay
17 Nov 2024 13:26 - 17 Nov 2024 21:20 #314660
by f3nix
Spindle delay was created by f3nix
Hi guys.
I'm just starting so please be gentle
I would like to add a delay for spindle to come up to speed. I'm using version 2.9.3
I have tried adding these lines:
But I get error with this text:
The whole spindle section looks like this:
Could anyone push me in the right direction?
Thanks.
Cheers,
Mateusz
I'm just starting so please be gentle
I would like to add a delay for spindle to come up to speed. I'm using version 2.9.3
I have tried adding these lines:
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 => spindle.0.at-speed
But I get error with this text:
254: Pin 'spindle.0.at-speed' was already linked to signal 'spindle-at-speed'
The whole spindle section looks like this:
#*******************
# SPINDLE S
#*******************
setp pid.s.Pgain [SPINDLE_9]P
setp pid.s.Igain [SPINDLE_9]I
setp pid.s.Dgain [SPINDLE_9]D
setp pid.s.bias [SPINDLE_9]BIAS
setp pid.s.FF0 [SPINDLE_9]FF0
setp pid.s.FF1 [SPINDLE_9]FF1
setp pid.s.FF2 [SPINDLE_9]FF2
setp pid.s.deadband [SPINDLE_9]DEADBAND
setp pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
setp pid.s.error-previous-target true
net spindle-index-enable <=> pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm-abs => pid.s.command
net spindle-vel-fb-rpm-abs => pid.s.feedback
net spindle-output <= pid.s.output
# ---PWM Generator signals/setup---
setp hm2_5i25.0.pwmgen.00.output-type 1
setp hm2_5i25.0.pwmgen.00.scale [SPINDLE_9]OUTPUT_SCALE
setp hm2_5i25.0.gpio.000.invert_output true
net spindle-vel-cmd-rpm => hm2_5i25.0.pwmgen.00.value
net spindle-enable => hm2_5i25.0.pwmgen.00.enable
# ---setup spindle control signals---
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
net spindle-enable <= 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
# ---Setup spindle at speed signals---
#sets spindle-at-speed true
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 => spindle.0.at-speed
Could anyone push me in the right direction?
Thanks.
Cheers,
Mateusz
Last edit: 17 Nov 2024 21:20 by f3nix.
Please Log in or Create an account to join the conversation.
17 Nov 2024 13:35 #314661
by Aciera
Replied by Aciera on topic Spindle delay
remove/comment this line in your spindle section:
net spindle-at-speed <= spindle.0.at-speed
Please Log in or Create an account to join the conversation.
17 Nov 2024 13:46 - 17 Nov 2024 13:49 #314662
by f3nix
Replied by f3nix on topic Spindle delay
Thanks @Aciera
I've tried that but the machine does not move after that. Trying to run some gcode the spindle starts but nothing else happens.
Cheers,
Mateusz
P.S. Are the code blocks broken in the forum?
I've tried that but the machine does not move after that. Trying to run some gcode the spindle starts but nothing else happens.
Cheers,
Mateusz
P.S. Are the code blocks broken in the forum?
Last edit: 17 Nov 2024 13:49 by f3nix.
Please Log in or Create an account to join the conversation.
17 Nov 2024 14:16 #314665
by Aciera
Replied by Aciera on topic Spindle delay
Your signal names don't match up.
replace
with
the editor is buggy and messes up the formating when you edit things. Use the 'Source' button in the top left of the editor to see the tags and move them around.
replace
net spindle-on => timedelay.0.in
with
net spindle-enable => timedelay.0.in
the editor is buggy and messes up the formating when you edit things. Use the 'Source' button in the top left of the editor to see the tags and move them around.
The following user(s) said Thank You: f3nix
Please Log in or Create an account to join the conversation.
17 Nov 2024 21:21 #314694
by f3nix
Replied by f3nix on topic Spindle delay
Thank you @Aciera.
It does work as expected now.
Have a nice one.
Cheers,
Mateusz
It does work as expected now.
Have a nice one.
Cheers,
Mateusz
Please Log in or Create an account to join the conversation.
Time to create page: 0.064 seconds