01-31-2011 03:33 PM
How can I get the value of a control (as set by the user) on a calling VI Front Panel to evaulate/use within a state Exit while loop in of a called StateChart?
02-01-2011 04:44 PM
Hi ggeisen,
I'm not sure if I completely understand your question. Could you possibly explain a little more?
Thanks,
02-02-2011 03:32 PM
I have a parent VI that runs a statechart. The parent vi has a thermometer control on its front panel. The statechart contains a PID in a while loop. I want the PID to use the value of the thermometer on the front panel of the vi as the process value. My current attempt only updates the pv input on the first iteration of the loop and stays constant. How do I get the PID in the while loop in the called statechart to use the value of the thermometer control as the process value and react to changes in the thermometer control?
02-03-2011 06:00 PM
Thanks for the explanation.
It sounds like you may have your control outside of your loop. When your loop runs, it will only keep the value of the control when it was first read into the loop. If you place the control inside the loop, it will read the new value of the control each time the loop executes.
Hope this helps,
02-04-2011 08:43 AM
I started with the async statechart example -- contains trigger loop and a statechart loop. Inside the statechart loop there is a Run Statechart. Also in this loop are my inputs to the Statechart. Everything is good so far. As each state is entered, the correct input is obtained. Then I added a PID.vi inside a loop to one of the state action tabs. When that particular state is entered and the PID loop runs, I no longer get updated input values. I've tried to copy and reference the Inputs onto the action tab diagram to no avail.
I've attached my VI and lvsc for some hopeful assistance.
02-07-2011 04:53 PM
Hey ggeisen,
I looked at your VI's, and did not see your PID.VI inside the loop. Did i miss it in the .lvsc?
Try this Knowledge Based Article: How Can I Update the Front Panel of a Calling VI From a SubVI?
This may be able to help since you are dealing with controls and sub VI's
Ricky
02-07-2011 11:32 PM