LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I put strings, which I get during runtime, in a Ring-item? And how to open a Frontpanel of a SubVI by pushing a Button in the MainVI during runtime?

I'm very new to LabVIEW and every day I learn such a lot about LabVIEW. I did not find any example according to my problem, but I don't know how to do the following :

In the MainVI I read different strings from file in an array (In the example below I defined them as constants. The example only shows how the frontpanels should look like).
During a loop I calculate different values, which will be written in an array, too, and in every loop the array of values will be overwritten with the new calculated values. (string[i] belongs to value[i])
Now, by pushing the button 'sub' during runtime, I want to op
en the Frontpanel of a SubVI, on which you see a Ring and a numeric Indicator. Now, I want to show the strings I read in the MainVI as items in the Ring-menu. If I choose one of the items (strings) in the Ring-menu during runtime, I want to show the accordant value, which was calculated in the MainVI, in the numeric Indicator, and in every loop the new calculated value should be shown in this Indicator automatically.

So I have two questions:
1. How do I put the strings into the Ring-menu during runtime?
2. How to open a SubVI-Frontpanel during runtime, and how to pass the calculated values to it?

Every answer I accept with thanks!
Download All
0 Kudos
Message 1 of 5
(3,290 Views)
See the atttached vis :
1/ Pass the string array to the sub-vi, then use a property node to replace the ring node strings
2a/ From the subvi front panel window, rightclick on the icon, and select "Show connector". Define the connections
2b/Set the sub vi properties (right click on the vi icon, select "VI properties... >> Window appearance..." go to "customize...", and checkmark the "Show front panel when called" item).
3/ your main vi should run 2 separate loops in order to avoid that reading the data stops the aquisition process (if any !..), or the reverse situation.

You should read the LV manual to find out how to create a sub-vi : there are a number a basic things to learn and to memorize...

CC
Chilly Charly    (aka CC)
Message 2 of 5
(3,290 Views)
for yet unknow reasons, I can't post more than 24 Ko attached docs at a time. Probably a US retaliation to Europ... :))
Chilly Charly    (aka CC)
Message 3 of 5
(3,290 Views)
Thank you very much for the very quick and helpful answer.

Do you know if it is possible to use one Property Node for several Rings, or do I need a seperate Property Node for every Ring (because there are 32 Rings in the SubVI, which all should get the same strings as items)?
0 Kudos
Message 4 of 5
(3,290 Views)
The most straight forward solution is as follow :
1/ pass the strings as a 2D array to the subvi
2/ get the references to the rings and build an array with them
3/ pass the strings to the rings using a loop and a property node

Do not mistake lines and columns in the 2D array, and avoid scrambling of the rings.

See the attached VI.
Chilly Charly    (aka CC)
0 Kudos
Message 5 of 5
(3,290 Views)