LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vi stops without error

This is a shot in the dark to see if anyone has had a similar issue.  I have a program that reads data from a serial port using VISA commands (read at 26Hz).  The data is then parsed and statistics are taken, these statistics are sent to shared variables.  This vi acts as a server passing shared variables with statistics out at certain time intervals, as well as saving data to file.  This is a subvi for a master program, it is called and runs in parallel to a while loop which collects other data independent of the server vi.  This other program does access the shared variables of the server vi.  The problem is that the server vi will run for a certain amount of time (changes each time I run it) and then freeze up.  The master vi and the other daq  program will continue to do their jobs though.  When the server program freezes no errors are generated and I cannot access any controls on the front panel, I have to use the abort button to close the program.  When I restart the program it works fine.  Anyone have any suggestions?

Cheers!
0 Kudos
Message 1 of 6
(3,414 Views)
have you tried running it with highlight execution enabled to see where the program is hanging?
 
It is hard to debug without seeing the program, but it sounds like you might be stuck in an infinite loop. Are you certain that you are meeting the exit conditions? Run it with highlight execution and that will give you a better idea where it is getting hung up.
Jeff


Using Labview 7 Express
Message 2 of 6
(3,412 Views)
Thank you for the quick reply.  Unfortunately I cannot run with highlight execution because the VISA read cannot keep up and I get a buffer overrun error.  I am fairly confident that I am not in an infinite loop as the only termination requirements are a stop control or an error.  I am able to run in debug mode (debug mode meaning that I run the program by reading from a data file as apposed to the serial port) and everything runs fine.  This makes me think that the problem could be with reading from the serial port.  Is 26Hz a reasonable rate to be reading?

Cheers!
0 Kudos
Message 3 of 6
(3,408 Views)

I have a similiar problem. I have about 12 VI running under a subpanel and one of the VI stopped running. I suspect mind is a scheduling issue but it is pretty intermitten.

I suggest you check your memory on your computer to see if there are any memory leaks or anything. You can do this by bringing up the task manager to see if anything strange is happening.

Another suggestion is to see if the VI actually stopped or is waiting for something to occur. You should see if the normal grid lines actually show up. If it does not, it might indicate that the VI is waiting for some kind of an event.

If it is waiting, you might want to check if you have timeouts available on the devices it is trying to read or write,

Message 4 of 6
(3,407 Views)
Thank you for the reply.  I have been checking the task manager as it was the first thought that occured.  I have not seen any evidence of a memory leak.  I am testing now and I will make sure to see if it is waiting for something to occur, a good suggestion.  It is a strange problem as sometimes the program will run for hours without freezing and others it only takes 120 seconds.  I have also noticed that sometimes, not always, when I open a file that the VI is writing to it will cause the vi to freeze.  Does that shed light on the problem?

Cheers!
0 Kudos
Message 5 of 6
(3,399 Views)
Hi,
 
You should definitely not open the file that is being written to when the program is running. This will prevent LabVIEW from opening up the file and reading or writing to it. Instead, wait until the progarm has finished running, and then open the file to view it.
 
Have a great day!
Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
Message 6 of 6
(3,373 Views)