Hello Guest it is March 19, 2024, 12:14:43 AM

Author Topic: Unable to activate custom button with external input  (Read 2825 times)

0 Members and 1 Guest are viewing this topic.

Unable to activate custom button with external input
« on: September 27, 2012, 02:46:34 PM »
Alright, I need some help here.   I have created a custom button in the screen with a hotkey of ctrl+g.  I have set the hotkey of input #1 to ctrl+g    input 1 does not, however, activate the custom button,  ctrl+g on the keyboard does work to actuate the button.

Now if I reconfigure input 1 as an oem input and link it to an oem code the input works

the diagnostic screen shows that the input does change when the eternal switch is activated.

can someone please help me figure out how to get an external input to activate a custom button in mach?

thanks
Greg
Re: Unable to activate custom button with external input
« Reply #1 on: September 28, 2012, 06:19:52 PM »
Hi Greg,
you need a simple brain for this.

Alex
Re: Unable to activate custom button with external input
« Reply #2 on: September 30, 2012, 10:33:47 AM »
If it's a custom button, you can write a macropump that looks for the input then when activated, runs the button code.  Just copy the button code into the macropump. It wouldn't actually be hitting the button, but rather just running the code behind the button.  The end result would be the same.

A brain would be better, if you can do it.  VB code is a little more flexible than a brain, but brains execute much faster.  Always use a brain if you can.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Unable to activate custom button with external input
« Reply #3 on: September 30, 2012, 11:36:31 AM »
Brains themselves run faster internally than the macropump but both are just seen by Mach at the 10Hz update rate as far as I know.
Hood
Re: Unable to activate custom button with external input
« Reply #4 on: September 30, 2012, 01:25:49 PM »
so I figured out how to do this for my purpose (will upload code when done so others can see).  the activate button was really an attemtp to execute code.  after I realized the need for more robust error handling, I decided to write VB code within the button that will take certain DRO's, do some math, and then waith for a series of external inputs to execute.  so now I have a button that I press, and it stays in its code until the exit chriteria are met.