Spindle delay

More
1 year 11 months ago #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:

Code:
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:

Code:
254: Pin 'spindle.0.at-speed' was already linked to signal 'spindle-at-speed'


The whole spindle section looks like this:

Code:
#******************* #  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

Please Log in to join the conversation.

More
1 year 11 months ago #314661 by Aciera
Replied by Aciera on topic Spindle delay
remove/comment this line in your spindle section:
Code:
net spindle-at-speed <= spindle.0.at-speed

Please Log in to join the conversation.

More
1 year 11 months ago #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?

Please Log in to join the conversation.

More
1 year 11 months ago #314665 by Aciera
Replied by Aciera on topic Spindle delay
Your signal names don't match up.
replace
Code:
net spindle-on => timedelay.0.in

with
Code:
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.

Please Log in to join the conversation.

More
1 year 11 months ago #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

Please Log in to join the conversation.

More
6 months 3 weeks ago #345181 by reboots
Replied by reboots on topic Spindle delay
I just wanted to register that this solved the same issue for me on 2.9.7. There are older solutions on the forum, for example " Automatic pause when spindle is started " from 2015, but they don't reflect current pin/signal names. Modified default spindle control HAL section below, two lines commented out and six more required.
Code:
# ---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 # 5-second spindle ramp delay loadrt timedelay count=1 addf timedelay.0 servo-thread setp timedelay.0.on-delay 5 net spindle-enable => timedelay.0.in net spindle-timer <= timedelay.0.out net spindle-timer => spindle.0.at-speed

My spindle VFD is connected as follows for simple "run" operation with no feedback:
Code:
net spindle-enable  =>     hm2_5i25.0.7i77.0.0.output-00

Please Log in to join the conversation.

Time to create page: 0.085 seconds
Powered by Kunena Forum