Estop, external and internal with physical relay

More
07 Nov 2024 16:46 - 07 Nov 2024 23:39 #314024 by Mattias
Hi guys,

I have been trying for a couple of days to get the e stop to work on my diy cnc router.
I have an safety circuit which connects 24v supply to a relay(which switches on motor powers).  Output 00 of mesa card 7i95t and 4 physical estop NC are wired in series to this safety circuit.
In parallel i have wired this circuit to mesa input 01.

Here is my hal io code.
# E-Stop Chain
loadrt estop_latch count=2
addf estop-latch.0 servo-thread
addf estop-latch.1 servo-thread

net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset => estop-latch.1.reset
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net latch0-faultout estop-latch.0.fault-out
net latch1-okin estop-latch.1.ok-in <= estop-latch.0.ok-out => hm2_7i95.0.ssr.00.out-00
net latch1-faultin estop-latch.1.fault-in <= hm2_7i95.0.inmux.00.input-01-not
net latch1-out estop-latch.1.ok-out => iocontrol.0.emc-enable-in

I have many more attempts but this one came the closest. It triggers the relay for a second but does not 'stick'.
I want to reset with gui request enable en trip the circuit with either estop external button or software internal button on gui.
Can anybody please point me in the right direction, i have tried so many things and i get maybe more confused by the day
 
Last edit: 07 Nov 2024 23:39 by Mattias.

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

More
07 Nov 2024 18:45 - 07 Nov 2024 18:53 #314030 by PCW
if estop-latch.N.ok-out goes false, one of these must have changed:

estop-latch.N.ok-in  goes false
estop-latch.N.fault-in goes true

So I would watch these in halshow or halscope to see whats happening.

I also don't understand why you have two estop latches. It seems that one
should be sufficient (adding some logic if you need to add fault inputs or OK inputs)



 
Last edit: 07 Nov 2024 18:53 by PCW.
The following user(s) said Thank You: Mattias

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

More
07 Nov 2024 18:54 #314031 by Unlogic
I documented my e-stop setup using an external safety relay in the post linked below:

forum.linuxcnc.org/12-milling/50559-opti...rsion?start=0#284533

Maybe it will help you get your setup up and running.
The following user(s) said Thank You: Mattias

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

More
07 Nov 2024 23:50 #314052 by Mattias

I documented my e-stop setup using an external safety relay in the post linked below:

forum.linuxcnc.org/12-milling/50559-opti...rsion?start=0#284533

Maybe it will help you get your setup up and running.

 

Hi, thank you for your reply. I have read your documents on your build, very impressive, thanks for the detailed sharing and documenting.
I saw you used the oneshot function, i have tried implementing it like you did but no succes. I will try again once i got the time.

Thanks, cheers

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

More
07 Nov 2024 23:56 #314053 by Mattias

if estop-latch.N.ok-out goes false, one of these must have changed:

estop-latch.N.ok-in  goes false
estop-latch.N.fault-in goes true

So I would watch these in halshow or halscope to see whats happening.

I also don't understand why you have two estop latches. It seems that one
should be sufficient (adding some logic if you need to add fault inputs or OK inputs)

 

Hi, thank you for your quick reply. I have been looking at these halshow/scope bits but could not get it to click.

I have tried with two latches, with the idea that one will be for external estop (input 00) and the other for software internal estop (user enable out).
I also tried with one, linking the ok-in for user-enable out and fault-in to input00 external estop. No succes.

I will keep trying, thanks.

If you have any more sugestions i would be happy to hear them.

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

More
08 Nov 2024 00:01 #314056 by Mattias

Should we delete the two duplicate replies above without the quoted text?

Yes please, i tried it myself but i guess that is not possible. Thanks!

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

More
08 Nov 2024 01:45 #314059 by tommylight
Done, thank you, i will delete this and the one above this after you get a chance to read it to keep this topic clean.
The following user(s) said Thank You: Mattias

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

More
16 Nov 2024 02:38 #314582 by Benb
The attached control circuit will disable the spindle and servos of the machine if an Estop push button (PB) is pressed or change tool is requested. The arrangement is combination of both software and external hardwired circuit.

To stop any movement of the machine, the approach uses estop and reset pins of the halui component and redundant hardwired external circuit to disable any movement of the machine. The interface between the software and the hardwired circuit is done through digital I/O (2 or 3 inputs and two outputs).

Operation of this system is follows:
If an Estop PB is activated or tool change is requested machine will go into an Estop state.
  • If only Estop is activated, operator is required to press push button reset to enable spindle and servos
  • If tool change is requested, operator is required to change the tool, press tool changed PB (either hardwired or UI) and press reset PB to reset the estop and continue operation. (I know operators don’t like to press two buttons sequentially in certain order, but for their hands and fingers sake the extra mental challenge makes it worthwhile, I think!.

On the left side of the sheet is the electrical schematic. Showing use 5 relays. If you decide to use this circuit you need to determine the number of contacts normally open and normally closed before ordering the relays. The MCR contacts connection to servos and VFD are hardware dependent (if you need help with this part of the diagram ask)

On the right side is a postgui block diagram reflecting net listing of hal file see below.

 

This browser does not support PDFs. Please download the PDF to view it: Download PDF



#
# Load realtime Components and their counts

loadrt and2         count= 2
loadrt flipflop     count= 1
loadrt or2          count= 1

#
# Add functions to threads

addf and2.0                   servo-thread 
addf and2.1                   servo-thread 
addf flipflop.0               servo-thread 
addf or2.0                    servo-thread 

#
# Connect Pins with Wires

#     signal/wire                 connected Pins
#--+
+
net estop.activate.sig     halui.estop.activate  and2.1.in1  flipflop.0.out  
net estop.is-activated.sig halui.estop.is-activated  and2.0.in1  flipflop.0.reset  hm2-7i92.0.7i77.0.0.output-00  
net estop.reset.sig        halui.estop.reset  and2.0.out  
net external.reset         and2.0.in0  hm2-7i92.0.7i77.0.0.input-01  
net external=estop         flipflop.0.set  hm2-7i92.0.7i77.0.0.input-00  
net t.prepare.loop         iocontrol.0.tool-prepared  iocontrol.0.tool-prepare  
net t.xch.done             hal_manualtoolchange.changed  iocontrol.0.tool-changed  
net tool-changed           or2.0.in0  
net tool-xch.request       hal_manualtoolchange.change  iocontrol.0.tool-change  hm2-7i92.0.7i77.0.0.output-01  
net tool.changed           or2.0.out  and2.1.in0  
net tool.changed.button    hal_manualtoolchange.change_button  and2.1.out  
net tool.number            hal_manualtoolchange.number  iocontrol.0.tool-prep-number  
net ui.tool.change.pb      or2.0.in1  
Attachments:

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

Time to create page: 0.088 seconds
Powered by Kunena Forum