External Reset Button

More
29 Aug 2021 19:31 #219119 by davidimurray
My adventures with pathpilot continue - I am now trying to add an external button to do the on-screen reset. I am struggling to find what the correct pin is from the GUI to activate to get the reset conditon. Does anyone have any ideas?

Thanks

Dave

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

More
29 Aug 2021 21:03 #219125 by smgvbest
Replied by smgvbest on topic External Reset Button
Thats in the HAL for your Mill/Lathe

here's from the MILL
########################################################################
# E stop
# P3 pin 15 gpio 003

# estop noise debounce
# use this line with a machine attached
net machine-ok-raw <= hm2_[HOSTMOT2](BOARD).0.gpio.003.in_not => debounce.0.3.in

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

More
30 Aug 2021 09:35 #219155 by davidimurray
Replied by davidimurray on topic External Reset Button
I've got that line hooked up to my E-stop button which seems to work correctly. But you then need to click the on-screen reset button to get the machine out of the Estop state - it is this reset I am trying to replicate with an external button.

The code below appears in the e-stop section
​​​​​​​net estop estop-latch.0.ok-out => iocontrol.0.emc-enable-in  => hm2_7i76e.0.7i76.0.0.output-07 => pwmgen.00.enable
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset

I've tried directly connecting my input pin from the 7i76e to estop-latch.0.reset and I can see the reset bit toggle and also the the ok-out bit change - but this doesn't clear the 'reset' condition in PP and the rest on-screen button continues to flash.
 

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

More
06 Sep 2021 20:01 #219786 by davidimurray
Replied by davidimurray on topic External Reset Button
So far from all my research it looks like there is not the capability to setup a reset button without some Python work.
I've created a new Hal-Pin called ext-reset and linked this to my pushbutton. I can see that this is working in halshow

Apologises for the stupid question but I'm a noob to Python. how do I call the reset function? The function is setup as 
def on_reset_button_release_event(self, widget, data=none):
do i just need :
if self.hal['ext-reset'] ==1:
self.call_ui_hook('reset_button')

Any help much appreciated

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

More
10 Sep 2021 00:10 #220090 by gerritv
Replied by gerritv on topic External Reset Button
I used this inside ui_common.py
self.enqueue_button_press_release(self.button_list)

when I was playing with the console modifications.

Gerrit

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

More
13 Sep 2021 18:13 #220480 by davidimurray
Replied by davidimurray on topic External Reset Button
That's brilliant - thanks for that gerrit - now have the external reset button working
The following user(s) said Thank You: gerritv

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

Moderators: cncbasher
Time to create page: 0.183 seconds
Powered by Kunena Forum