Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started 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
-
ActivateSignal(output3)
DeactivateSignal(output3)
(;-) TP
-
does that go for on the screen buttons as well?
-
Yes if you use a VB button.
Hood
-
well i guess the simple thing is to move it to the next free output number 5
-
Why? Just as easy to put a VB button on screen, you can even make it toggle it on/off if you wanted.
Hood
-
ah yes but i dont know how to put a vb led on in screen 4
-
Thought it was a button to switch Output 3 on and off you wanted?
Hood
-
sorry yes but i also need an led to flash when output 3 is on (drawbar) output 4 swings the carosell in
-
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
-
OK but what about activating output 4?
-
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
-
is that a toggle on off?
-
yes
-
great got it thanks for your help