Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: rait279 on April 14, 2014, 04:02:01 PM

Title: THC problem, macro writtinh help needed
Post by: rait279 on April 14, 2014, 04:02:01 PM
Hello all,

please help me out with macro,
i use two outputs, first for plasma generatorand second for pilot arc unit.
Im stuck writing macro on that point,
ActivateSignal(Output2)
DoSpinCW
and now im stuck, i need that when Arc OK signal occures, then Output2 must switch off.

Please help,
regards,
Rait
Title: Re: THC problem, macro writtinh help needed
Post by: BR549 on April 14, 2014, 08:08:20 PM
Look at the arc good LED, when it comes on then deactivate the signal

ActivateSignal(Output2)
DoSpinCW

While not GetOemLed(36)
    Loop

DeactivateSignal(output2)
Title: Re: THC problem, macro writtinh help needed
Post by: rait279 on April 15, 2014, 02:55:13 PM
Hello all,

thaks for help, its working, but for security reason, please tell me how to write something like that: if the arc good led is  not come on 2 seconds, then stop the program.

Regards,

Rait
Title: Re: THC problem, macro writtinh help needed
Post by: BR549 on April 16, 2014, 10:05:15 AM
Timeout =0
ActivateSignal(Output2)
DoSpinCW

While not GetOemLed(36)
Sleep(1000)
Timeout = Timeout+1
If Timeout >1
End
End IF
    Loop

DeactivateSignal(output2)

Something like that may work