LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

possible reasons for vi not doing anything

Hello
 
I have a Labview application which acquires the data and displays some analysis. There are lot of controls and graphs on the front panel. The problem is that when I start this VI sometimes it runs and at other times it is just sitting still in running mode. I don't get any errors but the VI is not running and then I abort execution and try it again it may or may not run.
 
Any ideas on why this is happening or how to find out what is causing this.
 
Thanks
 
Ankit
0 Kudos
Message 1 of 8
(3,408 Views)
Hi ankit,
did you use the highlight function to see what happens? Can you upload this vi?
Mike
0 Kudos
Message 2 of 8
(3,405 Views)

Can you post your code?

Did you have "Highlight Execution" turned ON (unlikely).

Do you have a breakpoint somewhere in your code that only gets called occasionally?

Easiest way is to post your code.  Or look at the execution using the Highlight Execution..

RayR

0 Kudos
Message 3 of 8
(3,404 Views)

I don't get any errors but the VI is not running and then I abort execution and try it again it may or may not run.

How can you abort execution if the VI is not running? 
0 Kudos
Message 4 of 8
(3,398 Views)
I will not be able to post my code but I will explain a little bit....
 
A producer consumer design pattern for continuous data acquisition...Producer acquires data and consumer does the analyses. I am using some vies from Sound and Vibartion toolkit and I also read and  write data to excel.
 
The VI seems to be in running sate but all the controls on the front panel get disabled (meaning it is sitting still doing nothing and even I can't change tabs and do stuff) Then I have to abort the VI and run it again and just hope to be lucky.
 
Ankit
0 Kudos
Message 5 of 8
(3,391 Views)
Some other ideas:
  • Are all controls back to what you think they should be or are e.g. possibly some latch action booleans still in a depressed/unread state because you left them out of the dataflow (e.g. the stop button).
  • Does the same also happen if you reset all to default before running again?
  • Does it ever happen when you run it for the first time?
  • Do you have uninitialized shift registers or anything else that leaves the VI in a different state after running.
  • Is the priority of your VI anything above "normal"? For example if your VI is set to time-critical, front panel interactions and updates (e.g. updating the graphics of the run and stop buttons or reacting to button presses) are deferred, possibly for a long time.
  • Are you using value(signaling) properties?
  • Do you have event structures inside case structures?
  • Do you have interactive while loops inside event structures?
  • Do you use third-party DLLs or other external code?
  • Does the program interact with external hardware?

Can you switch to the diagram when it stalls and enable execution highlighting? Anything happening?

0 Kudos
Message 6 of 8
(3,372 Views)
AltenBach
 
From all the things you mentioned I am using value(signaling) properties a lot to cause events. In the beginning of my code (outside the producer consumer loops) I initialize some of the controls and cause events placed in event structures inside both loops. Do you think that can be a reason. I am only creating a single event from those event structures and that is the default state I want my from the front panel everytime it runs fresh. 
 
I don't think I am making any other mistake from the ones you mentioned.
 
Yes I am talking to two different devices one is PXI-chassis and another one is through VISA (temperature probe)....,but both these devices run fine and don't give any error. It has happened sometimes for the first time...and the thing is it is not repeatable. When this thing happens I can't even go in the tool bar and select show block diagram.
 
 
Thanks
 
Ankit
 
 
 
0 Kudos
Message 7 of 8
(3,361 Views)


ankit wrote:
When this thing happens I can't even go in the tool bar and select show block diagram.

This seems to happen for example if you lock the front panel for an event and the code is stuck in it. You can open the diagram before starting the program and then switch to the diagram window.
 
You might also want to configure some events to not lock the FP while the event executes.
0 Kudos
Message 8 of 8
(3,338 Views)