TestScript

A simple hardware test script. Illustrates setting a hardware items parameter and sleeping for a specified interval.

code format="csharp"

public class OurClass {   public static void Main {   	Logger.Log(LogLevel.UserInfo, "Setting our new hardware in the new VI."); Thread.Sleep(3000); if(!RelayBox.SetParameter("RedLight", 1)) {   		return; }   	Thread.Sleep(1000); RelayBox.SetParameter("GreenLight", 1); Thread.Sleep(2000); RelayBox.SetParameter("OrangeLight", 1); Thread.Sleep(3000); RelayBox.SetParameter("RedLight", 0); Thread.Sleep(1000); RelayBox.SetParameter("GreenLight", 0); Thread.Sleep(2000); RelayBox.SetParameter("OrangeLight", 0); } }

code