Hello Guest it is October 17, 2019, 03:03:28 PM

Author Topic: Ref Home Brain  (Read 3167 times)

0 Members and 1 Guest are viewing this topic.

Ref Home Brain
« on: May 03, 2015, 05:31:22 AM »
I have a brain that activates the Ref Home function when I press a button on my panel. If for some reason the Ref Home button input is triggered whilst some code is running, the moment the code is stopped / Paused / or ended, it goes into ref home mode.
Is there any way to prevent this? Maybe even modify the brain so that the button has to be held for more than 1 or 2 seconds?
Could someone please help with this as I have very little brains when it comes to this :)

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: Ref Home Brain
« Reply #1 on: May 13, 2015, 12:52:31 PM »
When ever I create a function that can cause harm if accidently activated I make it a 2 button function. One button being a safety button AND both buttons have to be pressed at the same time before the function will activate . Also the safety button is out of reach from the primary button. More than a single hand span away. This makes you keep your hands OUT of harms way when activating the function.

(;-) TP
Re: Ref Home Brain
« Reply #2 on: May 13, 2015, 01:24:01 PM »
You could include the 999-IsMoving LED (inverted) so it wont be triggered if anything is in motion. And include a timer as well if desired.

I did not try this, but it looks like it would work.  :)

Russ
Re: Ref Home Brain
« Reply #3 on: May 15, 2015, 06:41:29 AM »
Thanks for the ideas, both look like good ones. I did manage to add a timer in, but will look at the "IsMoving LED" as well.
One other problem I have is when the "RefAll" terminator goes active, All axis simultaneously go RefHome. I would like it to run exactly as I it does if I press the button on the screen with the mouse, which has the following code;
Code: [Select]
DoOemButton (1024)
   While IsMoving()
   Wend
   DoOemButton (1023)
   While IsMoving()
   Wend
   DoOemButton (1022)
   While IsMoving()
   Wend
   DoOemButton (1026)
   While IsMoving()
   Wend
   
   DoOEMButton(133)
   DoOEMButton(134)
   DoOEMButton(135)

The only way I can think of doing this is to set a USERLED as a terminator, then monitor this LED with a macropump and when it goes active get the macropump to run this code.
I cant work out how to get the macropump to have the safety checks, or the brain to do the refhome how I want it, so it looks like I have to run both.
I'm using dual steppers on an axis that I want to home separately to keep gantry square.