how to add a delay to machine on/off button
06 Oct 2016 10:37 #81297
by b2unit
how to add a delay to machine on/off button was created 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
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.
06 Oct 2016 13:43 #81300
by Rick G
Replied by Rick G on topic how to add a delay to machine on/off button
The following user(s) said Thank You: b2unit, MacGalempsy
Please Log in or Create an account to join the conversation.
06 Oct 2016 14:08 #81303
by b2unit
Replied by b2unit on topic how to add a delay to machine on/off button
I read the manual,
if you dont mind can i have some similar example which is use timedelay component for halpin?
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.
06 Oct 2016 17:17 #81307
by Rick G
Replied by Rick G on topic how to add a delay to machine on/off button
The following user(s) said Thank You: b2unit
Please Log in or Create an account to join the conversation.
27 Oct 2016 01:23 - 27 Oct 2016 03:58 #82126
by b2unit
Replied by b2unit on topic how to add a delay to machine on/off button
=========
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.
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: 27 Oct 2016 03:58 by b2unit.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
27 Oct 2016 13:06 - 27 Oct 2016 13:09 #82140
by Todd Zuercher
Replied by Todd Zuercher on topic how to add a delay to machine on/off button
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).
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: 27 Oct 2016 13:09 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
28 Oct 2016 06:57 #82166
by b2unit
Replied by b2unit on topic how to add a delay to machine on/off button
you are so genius!!
I was so stupid..
THANK YOU!
I was so stupid..
THANK YOU!
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
28 Oct 2016 13:12 #82183
by Todd Zuercher
Replied by Todd Zuercher on topic how to add a delay to machine on/off button
No, you're not. You were just looking at it from the wrong angle.
Please Log in or Create an account to join the conversation.
15 Jan 2021 15:13 #195438
by Thods1222
Replied by Thods1222 on topic how to add a delay to machine on/off button
Hello all, I know this is an old thread but I am looking to do something similar with my cincinnati retrofit. I am running 7i92h with 7i71 for my output card and 7i77 for my servo interface card. I used the code above and modified it for my cards and pins but it was not liking the stepgen line. Also I am running linuxcnc 2.8.
Please Log in or Create an account to join the conversation.
15 Jan 2021 15:20 #195440
by andypugh
Replied by andypugh on topic how to add a delay to machine on/off button
Can you describe exactly what you want to do (and, possibly more importantly, why)
Then we can either modify this answer to suit you, or tell you a better way to do it.
Then we can either modify this answer to suit you, or tell you a better way to do it.
Please Log in or Create an account to join the conversation.
Time to create page: 0.096 seconds