LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to relate indicator in main vi


Sorry i have posted this question previously  in the wrong board
 
Hi
 
In my program i using a menu ring control and indicators.i cretaed a subvVI for this  and when i tried to execute in my mainVI the indicators are not working
 
Thanks
0 Kudos
Message 1 of 10
(3,570 Views)

It would be very helpful if you would post your VI.

 

Christian

0 Kudos
Message 2 of 10
(3,569 Views)
When you post your code, remember to post both main & sub-vi's.
 
 
0 Kudos
Message 3 of 10
(3,547 Views)

Thanks All

I have attached my main VI and subVI

1.In subvi you can see when we run the program as per the selection from the ring control the indicator turns on and aswell the selection in the ring list goes grey.

2.In mainvi,indicator doesnt turns on and aswell the the selected option in the ring control is still active(not turned grey).

Thanks

 

Download All
0 Kudos
Message 4 of 10
(3,533 Views)
OK, whatever you are doing make absolutely no sense.
 
 You cannot change properties in the subVI and expect those to magically propagate to the booleans in the calling VI. Only the values are returned.
 
First of all, it seems you simply want to turn LED on or off. For that all you need is to change the value (TRUE of FALSE). In your case, the LEDs in the subVI remain FALSE (but turn to green) while the false color in the main VI is still dark.
 
The loop in your subVI runs at maximum speed, growing the "disables items" array without bounds. You wil run out of memory if you wait too long!
 
All you need is a simple loop and an event structure and a boolean array of size 5 to carry the data. No need to mess with color properties.
0 Kudos
Message 5 of 10
(3,526 Views)

Thanks altenbach

Actually my  i am developing a program for big application,so i am developing step by step.

The case is, under certain condition the LED just turns green and in the next condition(if the next dcondition is selected,here i am using a case structure) the LED which is turned on changes to some other colour(for ex:in 1st case i have choosed D2 and in the next condition if i relate the value of D2 to somewhere else the indicator goes to some other colour).Thats the reason i have used the property node.

There will be a good option,pls guide me.

0 Kudos
Message 6 of 10
(3,523 Views)


Veeru wrote:
Thats the reason i have used the property node.

OK, a boolean is only good for two states, and abusing it for more than that via color chages and propert nodes is just silly.
 
Instead, use a colorbox indicator made to look like an LED and use the value as the data. Now you can do any color you want!
 
Attached is a simple example of your demo.
 
Extract both subVIs onto a folder.
Open and run "callsubVI.vi". (The subVI is set op open the FP when called)
See what happens.
 
Modify as needed.
 
see also the following links:
 



Message Edited by altenbach on 06-25-2008 02:36 PM
Download All
0 Kudos
Message 7 of 10
(3,517 Views)

Thanks altenbach

The code is really superb, is it possible to do the selection and indicator functions in mainvi,without opening a subvi page because i thought of using the subvi only when it comes to a particular sequence.(my thinking may be silly,i thought instead of putting all codes in 1 mainvi,i will create all the requirements as subvi and to use it main VI)

Thanks

0 Kudos
Message 8 of 10
(3,503 Views)
If you don't want to show the subVI, then you need to take out all the event structures and loops so it can complete without user interation.
 
Here's a quick draft..
 
(of course since the subVI has memory (from the feedback node), You will run into problem if you use it a various locations at the same time, for example. It really depends on what you are trying to do overall. I probably would not use a subVI for this, but use flat code in the main VI.)
0 Kudos
Message 9 of 10
(3,494 Views)

Thanks altenbach

sorry to ask you again,i am learning and developing.Thanks for all of your help

 if i want to open a new front panel by selecting from the menu ring control button what i need to do.(for ex:selecting D1 needs to turn on indicator on the main panel and aswell needs to open a new front panel wher i will show all other details forex:waveforms and some datas from the hardware etc).

0 Kudos
Message 10 of 10
(3,492 Views)