06-13-2011 08:31 AM
How to execute one part of code before another? The graph vi must execute before the case structure.
06-13-2011 08:44 AM - edited 06-13-2011 08:45 AM
Use a flat sequence?
06-13-2011 08:57 AM
Use dataflow. The error cluster wire is the usual choice to enforce it. If you don't understand dataflow, start reading the LabVIEW 101 tutorials. You won't get far without understanding it clearly.
06-13-2011 09:37 AM
Do you mean conecting error out of first vi to the error in of second vi? But case structure don't have this input.
06-13-2011 09:43 AM
I doesn't matter if there is nothing in a structure that needs the error wire. You can just pass it through (click inside the structure or it may wire under!) and it will create tunnels on the borders that will enforce dataflow. You can even wire to one side of a structure and end the wire if you need to.
06-13-2011 09:43 AM
Why does the graph VI need to execute first? It appears to me from the code you posted that you have created a race condition due to your use of local variables. Why are you trying to update the p- control in the case structure? It appears that you are trying to program LabVIEW as if it were a text-based language.
06-13-2011 01:23 PM
If the integral is supposed to by used as input to the graph, why do you wire the controls to it? Just wire the integral directly, or what do you need the controls for? To see what's updating? Then make then change them to indicators and problem solved.
/Y