Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: rkd on January 03, 2008, 03:46:30 PM

Title: Using external inputs and OEM codes
Post by: rkd on January 03, 2008, 03:46:30 PM
Hi, I ahve a question about assigning oem codes to external pushbuttons.  I currently am using 2 pushbuttons for the pause/freehold and the resume functions.  I was able to find the codes for those on the wiki.  My question is how do you set up an external button for a function that doesn't have an OEM code assigned to it in the wiki?  ie.  I am using a script with an on-screen button for a z-zero routine and would like to be able to access that function from a pushbutton at the machine itself.  I did a search through the wiki and found that code 301 is used somehow but i can't figure out how to assign it to my input.
Thanks, Ryan
Title: Re: Using external inputs and OEM codes
Post by: Chip on January 03, 2008, 10:08:34 PM
Hi, Ryan

I think you need to set an oem trigger up, In ports and pin's, Inputs, To a OEM trigger # (1-15) for your switch.

Then include that triggers oem code in your script, something sorta like this.

If IsInputActive( OEM Trig # ) Then
   DeActivateSignal( OEM code )
Else
   ActivateSignal( OEM code )
End If

Well it's a Start, Chip 
Title: Re: Using external inputs and OEM codes
Post by: cnceer on October 12, 2008, 01:51:12 PM
Hi Chip,
can you elaborate on that.
Thanks.
Title: Re: Using external inputs and OEM codes
Post by: Chip on June 05, 2004, 04:55:15 AM
Hi, Cnceer

Looking at PM you sent me.

Is it a Script issue ?

If your trying to Zero the Z axis Dro with a external  button,

Hears two screen shots that should help,

Set for pin 10, trigger 1, Gnd pin 10 to Zero Z (OEM 1010).

Hope this Helps, Chip