LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem involving case structures

Hi i'm controlling a thurlby thandar power supply with labview. I need to set the configure and set the parameters i.e voltage current outside a while loop otherwise inside the while loop the voltage and current keep setting themselves causing a cyclic action from the power supply. the problem i'm having with the case structure is that when a voltage from a photo diode goes below or above a certain value the case structures become true it should reset the parameters. it sets the parameters, on the screen but because the string is outside the while loop and the case structures are inside the loop it cannot perform the action. i've tried sending the string from inside the case structures also but it wont work i keep creating errors . can anyone help.
0 Kudos
Message 1 of 2
(2,331 Views)
You should make your main loop into a simple state machine with two states: (1) initialize, (2) run.

The run starts out with initialize and feeds the important parameters to shift registers on the right. The subsequent iteration mainy use the run state unless a reset is needed.

Search for "state machine" in the example browser and you'll get some ideas. Alternatively, you could post a simplified version of your code here. Good luck. 🙂
0 Kudos
Message 2 of 2
(2,327 Views)