Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: robertmonroe on August 12, 2009, 09:20:28 PM

Title: Toggle ON/OFF output VB Script?
Post by: robertmonroe on August 12, 2009, 09:20:28 PM
Toggle ON/OFF output VB Script?

I made a screen where I have buttons for the outpus so I need to toggle them on and off.

What would be the VB Script for output 1 for example? ???
Title: Re: Toggle ON/OFF output VB Script?
Post by: ger21 on August 12, 2009, 10:32:38 PM
http://www.machsupport.com/MachCustomizeWiki/index.php?title=Mach_specific_Subroutines/Functions_grouped_by_purpose#Input.2FOutput_signals.2C_Modbus_I.2FO.2C_a_serial_port_and_.22foreign.22_ports
Title: Re: Toggle ON/OFF output VB Script?
Post by: robertmonroe on August 13, 2009, 01:43:11 AM
Could I get a sample VB Script?  For toggling an LED too.

Please, thanks in advance.

Robert
Title: Re: Toggle ON/OFF output VB Script?
Post by: ger21 on August 18, 2009, 10:17:57 PM
What outputs are using? And how are you using them?
Title: Re: Toggle ON/OFF output VB Script?
Post by: Grand Master B on October 30, 2009, 07:31:39 AM
button code:

If IsOutputActive(OUTPUT6) Then
DeActivateSignal(OUTPUT6)
else
ActivateSignal(OUTPUT6)
end if

LED code:
and if you want an LED to go on and off with the button select (Output 6 Active LED) for that LED
(OEM code 79) for output 6
Title: Re: Toggle ON/OFF output VB Script?
Post by: howajo on March 15, 2014, 01:31:08 AM
Just found this snippet of script which totally solved my problem, thanks! :D