how to add a delay to machine on/off button

More
10 years 3 weeks ago #81297 by b2unit
I made a connection on 'machine on/off button' to 'servo on' signal and 'servo brake' signal which controls each relay switches.
when I click machine on/off button(on) servo brake(on) signal and servo on(on) signal react simultaneously.
but in a real world servo brake(on) signal is a bit slower than servo on(on) signal..so there's little movement with some sound..
what i want is..
when I click machine on/off button( on) servo on(on) signal go first and then servo brake(off) signal in turn.
and
when I click machine on/off button(off) servo brake(on) signal go first and then servo on(off) signal in turn.

how can I add delay to hal pin connection?

thanks,
Byoungil Choi

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

More
10 years 3 weeks ago #81300 by Rick G
The following user(s) said Thank You: b2unit, MacGalempsy

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

More
10 years 3 weeks ago #81303 by b2unit
I read the manual,
if you dont mind can i have some similar example which is use timedelay component for halpin?

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

More
10 years 3 weeks ago #81307 by Rick G
The following user(s) said Thank You: b2unit

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

More
10 years 5 days ago - 10 years 5 days ago #82126 by b2unit
=========
loadrt timedelay count=1

addf timedelay.0 servo-thread

setp timedelay.0.on-delay 0.1
setp timedelay.0.off-delay 0

#for Z axis servo-on & servo-brake time delay
#hm2_5i25.0.7i76.0.0.output-02 : servo on signal for relay
#hm2_5i25.0.7i76.0.0.output-01 : servo brake signal for relay

net machine-is-enabled => hm2_5i25.0.stepgen.04.enable hm2_5i25.0.7i76.0.0.output-02 timedelay.0.in
net delay_sig timedelay.0.out => hm2_5i25.0.7i76.0.0.output-01
=========

it's working and can eliminate the Z axis flinch action when I click Turn the machine on/off button for machine on action.
but still have the flinch action when I click Turn the machine on/off button for machine off action.
machine-is-enabled is true or false as one..
there's no seperate pin for machine off action as I know..

what I want is the process below

when I click the machine on/off button for machine on(solved)
1. servo-on
2. servo-brake release(I delayed it with the timedelay component)

when I click the machine on/off button for machine off
1. servo-brake lock
2. servo-on off

Is this available? if it is please let me know.
Last edit: 10 years 5 days ago by b2unit.

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

More
10 years 5 days ago - 10 years 5 days ago #82140 by Todd Zuercher
I think you are on the right track, but I think you need to use 2 time delays, one set with a delay on (and 0 off), the other with a delay off (and 0 on).
Code:
loadrt timedelay count=2 addf timedelay.0 servo-thread addf timedelay.1 servo-thread setp timedelay.0.on-delay 0.1 setp timedelay.0.off-delay 0 setp timedelay.1.on-delay 0 setp timedelay.1.off-delay 0.1 #for Z axis servo-on & servo-brake time delay #hm2_5i25.0.7i76.0.0.output-02 : servo on signal for relay #hm2_5i25.0.7i76.0.0.output-01 : servo brake signal for relay net machine-is-enabled => timedelay.0.in => timedelay.1.in net delay0_sig timedelay.0.out => hm2_5i25.0.7i76.0.0.output-01 net delay1_sig timedelay.1.out => hm2_5i25.0.stepgen.04.enable => hm2_5i25.0.7i76.0.0.output-02
Last edit: 10 years 5 days ago by Todd Zuercher.
The following user(s) said Thank You: b2unit, Stormholt

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

Time to create page: 0.344 seconds
Powered by Kunena Forum