LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subVI data

I open a VI in one of the subpanels in my main VI. I need to enter a filename, valid pulse widths and no:of commands in the subpanel VI. Using the filename entered in the subpanel, I should open the binary file and find the no:of valid commands and their pulse widths and dispaly that in another subpanel . I don't know how to get these values from the subpanel VI and do mt job. Hope someone can help me.
0 Kudos
Message 1 of 6
(3,012 Views)
Hello srini,

to transfer data from one vi to another you have several options. The easiest is to use the connector pane. You find that if you right-click on the vi-icon in the upper-right corner of the front panel. You can select the number of outputs with "Patterns". If you connect your indicators with those terminals, you can transfer data to other vi's. (LabView User Manual, chapter 7)
You can also use global variables, references to your controls/indicators, queues and probably some other techniques to transfer your data...

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,012 Views)
hi sreeni,
All you have to do is make use of the connectorpane
0 Kudos
Message 3 of 6
(3,012 Views)
Hello GerdW,
Actually what you told will work if I want to dispaly something in the subpanel VI from the main VI bcoz the subpanel VI is acting as an indicator and I can't enter a filename or ssomething like that in a indicator. In my case, I want to enter a filename in a text control field in the subpanel VI and upon pressing the OK button in the subpanel VI, I should need to use a case structure to open a file dialog . Again I am not able to wire the OK button to the selector terminal of the case structure. Could you please give me an example of how to do it.
0 Kudos
Message 4 of 6
(3,012 Views)
Hello srini,

two answers:
1) If you need your filename as indicators (for sending data through connector to an other vi) just make a indicator, connect that indicator with your text control and with connector terminal and finally hide that indicator (right-click on terminal in block diagram).

2) Do I understand you right: you want to send the status of the OK-button also to a second vi (with the case structure in it)? See answer 1!

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(3,012 Views)
In order to read the value of an control/indicator in a sub-panel, you need to use either an invoke node and the method Get Control Value (or Get Control Value Variant) or soemthing similar to the sub-panel shipping example called templates.vi.
Message 6 of 6
(3,012 Views)