Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: swanner on October 24, 2011, 11:27:16 PM

Title: Macro pump working...but not working
Post by: swanner on October 24, 2011, 11:27:16 PM
I know my macro pump is running, and it works as I should when I run it in the script editor - but I get no response from the part that turns on output 3...I've tried tying it to the output led, flood led...numerous different ways, but it only activates the output when I run it in the editor, the first half of the script controlling output 5 works fine...

'Gate Valve Vacuum Pressure Relief via button
If GetOEMLED(821) Then 'Button next to vac gauge
   If GetOEMLED(78) Then 'Output 5 led
      DeActivateSignal(Output5) ' Close vac valve
      Sleep(150)
      Else
                ActivateSignal(Output5) 'Open vac valve
           Sleep(150)
        End If
End If

If GetUSERLED(1225) And Not GetOEMLED(13) Then 'If dust hood override led on and flood led off then
   ActivateSignal(Output3) 'Raise dust hood
End If
Title: Re: Macro pump working...but not working
Post by: swanner on October 27, 2011, 04:11:43 PM
Got it working...had to:

If GetUSERLED(1225) Then
If GetOEMLED(13) Then
Else
ActivateSignal(Output3) 'Raise dust hood
End If
End If