Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: comet on February 06, 2013, 07:42:07 AM

Title: output 3 oem codes?
Post by: comet on February 06, 2013, 07:42:07 AM
hi cant find the codes to switch output 3 on and off any ideas?
  Tony
Title: Re: output 3 oem codes?
Post by: BR549 on February 06, 2013, 10:05:08 AM
ActivateSignal(output3)

DeactivateSignal(output3)

(;-) TP
Title: Re: output 3 oem codes?
Post by: comet on February 06, 2013, 11:11:39 AM
does that go for on the screen buttons as well?
Title: Re: output 3 oem codes?
Post by: Hood on February 06, 2013, 03:59:24 PM
Yes if you use a VB button.
Hood
Title: Re: output 3 oem codes?
Post by: comet on February 06, 2013, 04:49:31 PM
well i guess the simple thing is to move it to the next free output number 5
Title: Re: output 3 oem codes?
Post by: Hood on February 06, 2013, 04:55:03 PM
Why? Just as easy to put a VB button on screen, you can even make it toggle it on/off if you wanted.
Hood
Title: Re: output 3 oem codes?
Post by: comet on February 06, 2013, 05:14:46 PM
ah yes but i dont know how to put a vb led on in screen 4
Title: Re: output 3 oem codes?
Post by: Hood on February 06, 2013, 05:16:25 PM
Thought it was a button to switch Output 3 on and off you wanted?
Hood
Title: Re: output 3 oem codes?
Post by: comet on February 06, 2013, 05:22:16 PM
sorry yes but i also need an led to flash when output 3 is on (drawbar) output 4 swings the carosell in
Title: Re: output 3 oem codes?
Post by: Hood on February 06, 2013, 05:27:23 PM
Well if you wanted to put a VB button on screen its easy, just add a button in screen4 or Machscreen and choose for it to be a VB button instead of choosing the OEM code or function option.
Then when back in Mach3 you go to Operator menu and choose Edit Button Scripts and it will flash, click it and enter the following

If GetOemLED(854) Then
DeActivateSignal(OutPut3)
Else
ActivateSignal(Output3)
End If
 Then save and exit the editor and you have just made a toggle button that will switch Output 3 on or off depending on whether its already on or off.

The LED will be  Output 3 LED and you can add that to the screen page beside your button if you wish, just add a LED in Screen4 and set it as OEM 854

Hood
Title: Re: output 3 oem codes?
Post by: comet on February 06, 2013, 05:29:16 PM
OK but what about activating output 4?
Title: Re: output 3 oem codes?
Post by: Hood on February 06, 2013, 05:33:57 PM
Same thing, just the code in the button would be for output 4 LED so

If GetOemLED(77) Then
DeactivateSignal(OutPut4)
Else
ActivateSignal(OutPut4)
End If

Hood
Title: Re: output 3 oem codes?
Post by: comet on February 06, 2013, 05:38:01 PM
is that a toggle on off?
Title: Re: output 3 oem codes?
Post by: Hood on February 06, 2013, 05:39:43 PM
yes
Title: Re: output 3 oem codes?
Post by: comet on February 06, 2013, 05:43:16 PM
great got it thanks for your help