LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Hangs

Helllo EveryBody,

 

I have been stuck up in a problem,explanation:

 

I am using  boolean buttons to change the pages of tab. 

 

On the first tab the controls(i.e buttons) for traversing to the tab pages is given (I page of tab = MENU)

 

On the other tab i am implementing other processes.

 

It normally behaves fine but sometimes the program hangs( only the button part) like i am displaying current time on menu, so when it hangs the time is updated but the buttons wont work.

 

I have to restart the application for that.

 

any possible reasons for that? and is there any method to debu it.

 

Regards

 

Shrek

Message Edited by shrekt on 12-04-2009 10:56 AM
0 Kudos
Message 1 of 19
(4,330 Views)

What sort of program structure do you use?

Do you have a Producer-Consumer-Pattern?

I think you need to give some more details. 

 

May be this helps: Is the process on the other tab really finished?

0 Kudos
Message 2 of 19
(4,317 Views)

Many things could be wrong, but we cannot tell without seeing some code.

 

  • Why are you using boolean buttons to change tabs? Isn't the tab itself a control?
  • Are you using event structures? How many?
  • Are any event structures trapped inside other structures (case, sequence, etc.)?
  • Do you have interactive while loops inside event cases?
  • Are the events configured to lock the front panel?
  • Is the code flat or is e.g. a case structure tied to your tab control?
  • What is the mechanical action of the buttons?

 

Show us some code and we will tell you what the problem is! ;).

0 Kudos
Message 3 of 19
(4,307 Views)

Hello Shrek 

 

What do you use to change the tab page? The terminal, a local variable or a value property?

Maybe using the value property helps.

It is not a good idea to always do this because using a local variable is quicker (and the terminal the quickest). But on tab controls local variables sometimes fail to change the page. (Also other users saw this problem, see this Lava post.)

 

Greetings

shb

0 Kudos
Message 4 of 19
(4,301 Views)

I have three reasons in mind for not using the tabs:

1. you want to have a wizzard like behaviour and jump one page foreward or backward

2. have a intro screen and jump from there to a couple of different process and back to the intro screen when the processes are finished

3. to have extended graphical and behavioral capabilities like for a ribbon like front panel

 

 

By the way, I had a similar problem. I had a button on a tab-structure which should allow the user to jump to the next page. This button worked only occationally. I haven't found the reason why. The program has got a producer consumer pattern. pressing this button added an element to the queue which was processed in the consumer loop. In that processing case another boolean was value signaled. This signaling was processed in the producer loop with its event structure and set the tab-structure to another page.

0 Kudos
Message 5 of 19
(4,295 Views)

  • Why are you using boolean buttons to change tabs? Isn't the tab itself a control? using one of page as main menu
  • Are you using event structures? How many?                                                       only 1 w/o timeout
  • Are any event structures trapped inside other structures (case, sequence, etc.)?  yes,case
  • Do you have interactive while loops inside event cases?                                       while inside case but not interactive
  • Are the events configured to lock the front panel?                                                lock front panel?
  • Is the code flat or is e.g. a case structure tied to your tab control?                        case structure for every tab page
  • What is the mechanical action of the buttons?                                                     latch when released

 

  i am using local variables only.

 

Sorry but can't post the code, (company issues)

 

and i cannot replicate the code also as i dont know what is causing the problem.

 

If i click 2,3 buttons at a time then sometimes it hangs the buttons,  so different code is executing and the front panel is showing different page, as i have a case structure for every page of tab and checking the tab page to execute the repective code.

 

 Can the above explanation be the reason for it?

 

Am i doing it coreectly, or any other optimised way is there.

 

Regards,

 

Shrek

0 Kudos
Message 6 of 19
(4,268 Views)

You've got a couple of things that are design problems.

 

First, you should minimize/eliminate the use of local variables.

Second, an event structure should not be placed inside a case statement. You are very wrong if you think the event structure will not fire if the opposite case is selected.

 

Message 7 of 19
(4,261 Views)

Hi,

 

The use of variables is minimal.

 

 

So how can i implement the different pages that i want to use other than tab.

 

Regards,

 

shrek

 

0 Kudos
Message 8 of 19
(4,255 Views)

shrekt wrote:

So how can i implement the different pages that i want to use other than tab.


Maybe this will help. 🙂

0 Kudos
Message 9 of 19
(4,240 Views)

Hi Dennis,

 

In your post you told that event structure should not be used in case structure.

 

but if i have a while in case structure and in that while i have event structure, so is it ok for designing

 

regards

 

Shrek

0 Kudos
Message 10 of 19
(4,214 Views)