Dennis: Your vi's work if I run in continuous mode. What the implication of this if I code is imbedded in a sequence, in a vi which is not run in the continuous mode?
Dennis: Your vi's work if I run in continuous mode. What the implication of this if I code is imbedded in a sequence, in a vi which is not run in the continuous mode?
No, it does not need to be run in continuous mode. If you select the front panel boolean and then run the VI, you should see what you want. Your top level VI should really have a while loop and you can place this code inside the while loop or inside an event structure. If your design your program correctly, there is no need for sequence structures. Use dataflow. A much better approach would be a state machine. Sequence structures just be used sparingly, if at all.
I had similar problem where I had a graph indicator in a sub vi's while loop that I wanted to show my Main VI's front panel. Dennis' example VIs were a great starting out point for me but since there wasn't any documentation, I didn't have a clue how you created everything. So to benefit anyone running into this same problem,
here's what I discovered:
1)
Starting with my sub vi, I created a control refnum to the waveform
graph. This was found by going to my sub vi's front panel controls
menu and picking "modern" "refnum" "control refnum". With that on my
front panel, I then right clicked and selected "select vi server class"
"generic" "gobject" "control" "wavegraph" "wavegraph"
2) Next, I
created a property node inside of the while by going to my sub vi's
block diagram functions menu, selecting "Programming" "application
control" "property node"
3) I placed the refnum control outside
of the while loop and connected it to the property node refnum
terminal. Selecting "value" in my property node, I connected that
terminal to my waveform data line.
4) On the terminals of my
icon (accessed on the front panel), I added an input terminal for the
property node and an output for my waveform graph.
5) on my Main
VI's front panel, I copied and pasted the graph indicator from my sub
vi. I then added my sub vi function to the Main VI's block diagram.
6) Next, I created a VI server reference by selecting "Programming" "application
control" "VI server reference". Right clicked on the "Server Reference" and choose "Link to" "Pane" "Waveform plot"
7)
Connected the "VI Server Reference" to the "property node" of my sub vi
icon. The graph terminal of the sub vi connected to the graph
indicator. Saved everything! Tested. All works well!
I hope this helps someone.
Message Edited by mysticfree on 03-15-200811:32 AM