Pushbutton To Relay Control
- NICKKINSMAN
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 0
30 Sep 2011 11:55 #13551
by NICKKINSMAN
Pushbutton To Relay Control was created by NICKKINSMAN
Does anyone have experience using relays tied to EMC to replace pushbutton control?
I have the electrical connections all figured out and also type and size of relays needed at the connection points.
I am trying to figure out how to integrate this into EMC through a MESA 7I33. Also how you would architect the relay setup.
The stop circuit is Normally Closed (NC).
The FWD/REV are separate circuits with common, Normally Open (NO).
Certainly simple to get the FWD and REV signals from the Mesa 7i33 via relay. However, all they need is momentary (push) contact, not sure how to tell EMC to do that.
Then, how to seutp EMC to send a signal to another NC relay when it is ready to stop? Or, go with an enable singnal to a NO relay for the stop?
Thanks!
Nick
I have the electrical connections all figured out and also type and size of relays needed at the connection points.
I am trying to figure out how to integrate this into EMC through a MESA 7I33. Also how you would architect the relay setup.
The stop circuit is Normally Closed (NC).
The FWD/REV are separate circuits with common, Normally Open (NO).
Certainly simple to get the FWD and REV signals from the Mesa 7i33 via relay. However, all they need is momentary (push) contact, not sure how to tell EMC to do that.
Then, how to seutp EMC to send a signal to another NC relay when it is ready to stop? Or, go with an enable singnal to a NO relay for the stop?
Thanks!
Nick
Please Log in or Create an account to join the conversation.
30 Sep 2011 13:56 #13554
by andypugh
Replied by andypugh on topic Re:Pushbutton To Relay Control
NICKKINSMAN wrote:
www.linuxcnc.org/docview/html/man/man9/oneshot.9.html
Sounds like a job for the HAL "Oneshot" function:However, all they need is momentary (push) contact, not sure how to tell EMC to do that.
www.linuxcnc.org/docview/html/man/man9/oneshot.9.html
You are probably going to need a network of HAL logic (And2, Or2) and possibly edge detectors, toggles and oneshots.Then, how to seutp EMC to send a signal to another NC relay when it is ready to stop? Or, go with an enable singnal to a NO relay for the stop?
Please Log in or Create an account to join the conversation.
30 Sep 2011 14:46 #13555
by BigJohnT
Replied by BigJohnT on topic Re:Pushbutton To Relay Control
So is this an existing circuit with latching built in? In other words your just paralleling a start stop circuit?
The oneshot component would be too fast to pull in a latching relay I think as it is only on for one scan iirc.
You might need to use a classicladder timer to hold the circuit in long enough for your latching relay to close.
John
The oneshot component would be too fast to pull in a latching relay I think as it is only on for one scan iirc.
You might need to use a classicladder timer to hold the circuit in long enough for your latching relay to close.
John
Please Log in or Create an account to join the conversation.
30 Sep 2011 15:10 #13558
by Rick G
Replied by Rick G on topic Re:Pushbutton To Relay Control
I believe you can program the output length of the oneshot, perhaps to make it long enough to latch the relay.
Rick G
Rick G
Please Log in or Create an account to join the conversation.
30 Sep 2011 17:38 #13566
by BigJohnT
Replied by BigJohnT on topic Re:Pushbutton To Relay Control
Yep, I missed that... good to know.
oneshot.N.width float in (default: 0) Pulse width in seconds
John
oneshot.N.width float in (default: 0) Pulse width in seconds
John
Please Log in or Create an account to join the conversation.
- NICKKINSMAN
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 0
05 Oct 2011 12:23 #13678
by NICKKINSMAN
Replied by NICKKINSMAN on topic Re:Pushbutton To Relay Control
Thanks everyone!
So, I get the theory here, but I am brand-new when it comes to setting up the hal programming - how would that look in HAL?
Does it matter what section of HAL to put the threads in?
Do I have to put the thread in to load the oneshot somewhere in HAL too?
Somthing like this?
loadrt oneshot
oneshot.2.width float in => Obit? (for 2 seconds)
How do you marry this up with the spindle start command in EMC? Do you just assign the start command to the same Obit and go from there (I have it assigned to an out on the 7I33 now via PnCConf).
Thanks, sorry I am new to setting up HAL and still trying to learn how it works in my spare time. I understand the assigning of EMC function in HAL to i/o bits, but not sure on the details.
Thanks!
Nick
So, I get the theory here, but I am brand-new when it comes to setting up the hal programming - how would that look in HAL?
Does it matter what section of HAL to put the threads in?
Do I have to put the thread in to load the oneshot somewhere in HAL too?
Somthing like this?
loadrt oneshot
oneshot.2.width float in => Obit? (for 2 seconds)
How do you marry this up with the spindle start command in EMC? Do you just assign the start command to the same Obit and go from there (I have it assigned to an out on the 7I33 now via PnCConf).
Thanks, sorry I am new to setting up HAL and still trying to learn how it works in my spare time. I understand the assigning of EMC function in HAL to i/o bits, but not sure on the details.
Thanks!
Nick
Please Log in or Create an account to join the conversation.
05 Oct 2011 20:58 #13688
by BigJohnT
Replied by BigJohnT on topic Re:Pushbutton To Relay Control
The loadrt are loaded in order, I generally load mine near the top. You also have to add the component to a thread. If it uses floating point you have to add it to the servo-thread.
You should read this a couple of times.
www.linuxcnc.org/docview/html/hal_basic_hal.html
John
You should read this a couple of times.
www.linuxcnc.org/docview/html/hal_basic_hal.html
John
Please Log in or Create an account to join the conversation.
- NICKKINSMAN
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 0
06 Oct 2011 17:34 #13713
by NICKKINSMAN
Replied by NICKKINSMAN on topic Re:Pushbutton To Relay Control
OK, I will read it over and see if I can figure it out!
Please Log in or Create an account to join the conversation.
Time to create page: 0.140 seconds