02-16-2011 10:23 AM
Hello fellow LabVIEw users
Please look at attached code. I have used an event structure to communicate with our electronic apparatus.
The "manual" part of the code has been done. The code is very simple. When I press "Ballast ON" a hex code is sent to the VISA write with the corresponding "Power Level %". When I press "Ballast OFF" the power to 0% and the whole program stops.
The "Automatic" part of the code will send the exact same codes as the manual part but it should do it automatically in certain time increments.
I want to do the following
Your help and guidance is much appreciated.
thank you
mhaque
02-17-2011 12:15 PM - edited 02-17-2011 12:16 PM
It sounds to me like what you want to do would be best suited for a state machine.
The initial state could be the manual state, then once you select automatic it would cylce through your states. Then if you press stop during any of the states it would return to the manual mode.
You can get the state machine template open by going to File > New > Vi > From Template > Frameworks > Design Patterns > Standard State Machine