05-09-2018 07:12 AM
Hello,
I wrote a VI to read data from a temperature controller, including to plot the data in a X-Y-Graph. I can see the data immediately in the graph. When I try to insert it as a SubVi into an other program, the graph does not show immediately the data. When the whole data recording is finished, the graph appears.
The program, which I want to include as a SubVI is in the appendix.
Can someone help me and explain me the problem?
Thanks!!
05-09-2018 07:21 AM
Hi Stefanie,
I can see the data immediately in the graph.
That's how you wrote this VI.
When I try to insert it as a SubVi into an other program, the graph does not show immediately the data.
The graph in this very (sub)VI will still show the data immediatly!
When the whole data recording is finished, the graph appears.
I guess you talk about a graph in your calling MainVI: yes, it will show the data once the measurement is finished.
Can someone help me and explain me the problem?
That's no problem.
It's the way LabVIEW works: THINK DATAFLOW!
The main VI will receive the data only when your subVI finishes it's execution!
05-09-2018 07:32 AM
Thanks for your answer! Did I understand it right, that the best would it just be: Not including this Vi as a SubVi?
Or is there an other possibility?
05-09-2018 07:45 AM - edited 05-09-2018 07:47 AM
You can leave this code as a subVI. You have to be aware of when you are executing the code. You need to make sure that where you place your code in the program will cause the subVI to execute. You also need to make sure that all of the required set-points are connected to the subVI to ensure that it functions properly.
If you show us the rest of your code we can help you implement this code so it will execute as you are hoping.