LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error in pop up menu: continuously running

hi
i m a greenhorn 2 labview n now i got problem with the pop up menu..When i run my VI,the pop up menu works but then after i typed in the data, it didn't close by itself n the vi hanged, i hav to close all the VIs.i m using Labview 8.0. My program is that if i click on my first boolean,i want the pop up menu activates and i wana  save the data in spreadsheet file that i keyed in.Likewise,if i click on the second boolean, i want e program 2 function as i mention earlier. and that file hav to b able 2 retrieve bak wen i recall..can somebody guide me???
i alr tried lots of examples fr forums but i still cannot find the relevant result..thanks a lot in advance..
i attached my files below before and after adding the dialog box!!
Download All
0 Kudos
Message 1 of 11
(5,859 Views)

cannot open the attached myproj_2.vi

Try attaching it once more

0 Kudos
Message 2 of 11
(5,854 Views)
hi
thx 4 reply.. i attached the file again..
0 Kudos
Message 3 of 11
(5,841 Views)
hi
sorry 4 inconvinence... bcoz myproj_2.vi got subvi and now i attached that one also.
thx

Message Edited by poll3n on 01-25-2007 12:07 AM

Download All
0 Kudos
Message 4 of 11
(5,832 Views)

The Flaw lies in your implementation

As long as the input to case structure remains 1, the case 1 will get executed and your dialog box, keeps popping up.

To avoid this, here is on one possible solution

Use an event structure as shown in attached vi.

Note: I have moved out your visa read section to another while loop, so that I could demonstrate the use of event structure

Any doubts, do ask

Regards,

Dev

 

0 Kudos
Message 5 of 11
(5,822 Views)

hi

thx 4 modifying my program..

but if we modified like dat,wen i typed in '1' in my room no, my boolean doesn't light up n also the pop up menu doesn't activitate also...

bcoz in my original program, if i put '1' in room no, the first boolean lights up, for 2nd row 1st boolean, u just type '21' then e boolean will

lights up.. n i want to open pop up menu to key in some data... thx

0 Kudos
Message 6 of 11
(5,813 Views)

Hi poll3n,

I'm not clear on what is not working correctly.  I opened up devchander's program and it seemed to work correctly for me.  I would also reccommend using a 2D array of booleans instead of the 100 separate booleans that you have.  Having all of those different cases in your block diagram that essentially do the same thing is not a very good programming practice.  For example, if you wanted to change the logic that determines when the booleans light up, you would have to change your 100 or so different cases manually.  If you had an array of booleans, you could use a FOR loop to iterate through your booleans for you.

Also, in the future, please try and use fewer abbreviations and internet-isms in your posts because it makes them a little hard to read/understand.

Regards,
Justin D

0 Kudos
Message 7 of 11
(5,799 Views)
Just for the suggestion of a "2D array of booleans" I quickly cooked up a simple example (actually two examples).
 
First a more direct translation of your code logic (2DArray2.vi), jumping through some hoops to parse the complicated numbering system (e.g. 11-> 1-1, 23->2-3, 1010->10-10, 102->10-2, 310->3-10, etc). I did not treat your "special handling" of 1..10, so use 11..110 instead for these Rooms.
 
If it would be easier to start counting at zero, so we have 00-99 (->0-0..9-9) and the code is simpler (2DArray.vi).
 
(All examples are in LabVIEW 8.0)
 
Both codes are certainly easier than a case structure containing 100 cases, each with an indicator and 99 local variables 😮 :))
 

Message Edited by altenbach on 01-25-2007 11:39 AM

Download All
0 Kudos
Message 8 of 11
(5,793 Views)

Sorry to bother you again altenbach.

I've tried the attached files 2DArray.vi and 2DArray2.vi..but unfortunately,i couldn't see any result although i tried different numbers

between 00-99 as you said.The LED never lights up and the numbers go back to the default value -1 && 0.What I see is, before i run

your vi,all the LEDs are in dimmed and if I keyed in any number and run the vi, the whole arrays (LEDs) become brighter (green

 color) ..Is it because of my software?? How about the result at your side?? Because I want to flash any of the  LED one at a time

depending on the numbers that we choose.

thanks in advance.

0 Kudos
Message 9 of 11
(5,742 Views)

No, you're using it wrong. You need to run the VI first (and keep it running), then enter the desired number (s). The loop will only spin if the selector changes so it won't use any significant amount of CPU.

If you look at my code, you see that I reset the selector to a value that does not show any active LEDs using a signaling property node. This ensures that the initial state executes once and that the selector and LED display agree. Without that, somebody could enable a few LEDs in edit mode and select an unrelated selector value and the display would be wrong until the first time the selector is changed.

There are many ways to do thigs differently, you just need to decide how it should react. 🙂

If you want the LEDs to update according to the value you selected in edit mode, you could read the selector using a local variable and feed it to the signaling property of same before entering the main loop to trigger an update of the LED display upon first run.

All clear? 🙂

Message Edited by altenbach on 01-30-2007 09:29 PM

0 Kudos
Message 10 of 11
(5,738 Views)