03-20-2008 08:52 AM
03-20-2008 09:22 AM
03-20-2008 09:24 AM
03-20-2008 09:29 AM
03-20-2008 10:22 AM
03-20-2008 12:08 PM
You can add a shift register to your while loop to store which valve action you're currently using. An enum would be a good choice, because they're easy to debug. Basically, an enum shows you text, but acts as an integer. So if you had three states, you could pick from Open All, Open Limit, and Close, and they would act in your code as integers 0,1, and 2. Then, in your timeout, just add another case structure that uses the enum as a case selector and code from there.
http://zone.ni.com/reference/en-XX/help/lv/71/glang/Enum_Constant/
http://zone.ni.com/reference/en-XX/help/lv/71/lvhelp/Creating_Shift_Registers/
03-24-2008 08:14 AM
03-24-2008 08:37 AM
03-24-2008 08:46 AM
03-24-2008 09:11 AM