LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW program crashes after running for few hours

Hello,

 

I am doing some experiments at the moment which are supposed to last for 18 hours.

Basically, I use a LabVIEW program to control a power supply through a LabJack U6 DAQ. I am currently using LabVIEW 8.5 on Windows 7.

 

In order to do that, I use a laptop where everything has been disabled such as power management settings, network access is off, windows updates are also off...
As far as I know, the computer can't turn into sleep mode or just shut down (I'm a 100% sure of that actually).

 

But last night, I started an 18 hours experiment at 5 pm, and when I came in this morning, the program shutted down by itself. Fortunately, the power supply is still providing the voltage I want, but I can't figure out why the program crashes.

When I start the experiment, it also automatically starting saving data in a spreadsheet file (I guess the size of the file should be 36 MB), so it might be a problem of memory access or something.

 

I really don't know what could have cause this crash, does someone have an idea?

 

I saw some other threads similar to my problem but I am not running an executable, I am running the front panel directly from the editing mode.

 

 

0 Kudos
Message 1 of 27
(5,629 Views)

Hi TiboD,

 

I used to do a lot of debugging like this and I have some suggestions:

 

1.  Make your VI create a log file.  Write stuff to it very regularly.  Even if its just a "hearbeat" signal that write a timestamp every minute.  This will allow you to debug things when they go wrong.

 

2.  Make sure you wire through your error clusters and do proper error handling.  Basically, every VI you use should have an "error out" and you should check these clusters for errors and pop up a dialog (and write to log file) if an error occurs.

 

3.  By monitoring your log file (see above), you should be able to pinpout when things go bad.  Then you can check your Windows Event Log to see if anything else weird is hapenning at that time.  You may also be able to check your log file to see what specific operation caused it to crash.

 

4.  If you are worried about memory or CPU overload, you can use perfmon to monitor your CPU/memory usage over time.

 

That should be enough info to help track down what is hapenning over time and get you on track to find the cause of the problem.

http://www.medicollector.com
0 Kudos
Message 2 of 27
(5,620 Views)

It is always a guessing game when you do not post your code.

 

Are you building arrays of data which can continue to grow over time? That is a recipe which guarantees a crash eventually.

 

Are you repeatedly opening references or files which are not closed?

 

How much data, if any, was saved in the file before the program crashed? Was anything unusual about the last data saved?

 

Does your program shut down on errors or other internal conditions, even if you think they are unlikely or even impossible to happen?

 

Lynn

0 Kudos
Message 3 of 27
(5,619 Views)

Try speeding up your program to see if you can make the problem happen faster.  That will make it easier to troubleshoot.  For example, if your main loop executes every 500 ms try cranking it down to 20 ms, or no delay at all.

 

Try testing with no connections to the LabJack U6 at all, except USB.  This is to eliminate the possibility that some sort of transient is coming in on your signal wires, traveling to the computer, and causing the problem.

 

Try disabling different parts of you program.  For example, disable writing to file.

 

In the event of a crash, if you need to know the state of the U6, use the watchdog feature:

 

http://labjack.com/support/u6/users-guide/4.3.13

 

0 Kudos
Message 4 of 27
(5,613 Views)

@LabJackSupport wrote:

Try speeding up your program to see if you can make the problem happen faster.  That will make it easier to troubleshoot.  For example, if your main loop executes every 500 ms try cranking it down to 20 ms, or no delay at all.

 

Try testing with no connections to the LabJack U6 at all, except USB.  This is to eliminate the possibility that some sort of transient is coming in on your signal wires, traveling to the computer, and causing the problem.

 

Try disabling different parts of you program.  For example, disable writing to file.

 

In the event of a crash, if you need to know the state of the U6, use the watchdog feature:

 

http://labjack.com/support/u6/users-guide/4.3.13

 


BAD LINK- correct link at herehttp://labjack.com/sites/default/files/2011/04/U6_UG_Export_04282011.pdf


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 27
(5,603 Views)
I hate to draw any conclusions based on a single datapoint. So far we don't even know if it is reproducible.
0 Kudos
Message 6 of 27
(5,592 Views)

Oops.  You're right, the link text looks right but when you click it is mangled at the beginning.  Try again:

 

http://labjack.com/support/u6/users-guide/4.3.13

 

0 Kudos
Message 7 of 27
(5,591 Views)

Hi,

 

thank all of you for your quick answers!

 

@Josborne : I do not have an error handling in my program. Actually you can look at my program in the attachment file. This is my first LabVIEW program so I've never dealt with error in and error out function... Moreover, what is a log file exactly?

 

@Johnsold : Yes, I am building an array continously growing over time. Actually, my program stops saving data when you hit the "STOP" button, it doesn't write into a spreadsheet file through a period of time, that is something I eventually need to correct.

 

@LabJackSupport : I can try to reduce my time step, so far it's 100 ms. I have a problem with disconnecting the USB cable from the computer though : for no reason, if I just unplug the connection between the LabJack U6 and the computer, my power supply will just go providing 157 Volts! And for my experiment, this is something we don't want to have so we just leave it as it is now. Disabling some part of the program is a good idea, I can try it

 

Thank you for your answers

0 Kudos
Message 8 of 27
(5,576 Views)

I have a problem with disconnecting the USB cable from the computer though


No, what I am suggesting is removing all connections except USB.  Keep the USB cable connected from the computer to the U6.  Keep the U6 connected to the computer so your program runs, but remove all the wires from the U6 to your system.

 

 


if I just unplug the connection between the LabJack U6 and the computer, my power supply will just go providing 157 Volts!


That sounds like something to look at.  Describe all wires connected to the U6 (besides USB obviously) so we can help with that.

 

0 Kudos
Message 9 of 27
(5,567 Views)

Thank you. Actually, even when I just keep the USB connected to the U6 and I unplug the U6 from my power supply, it will go to 157 Volts again 😞

 

In the attachment file you can find a quick draw I made to understand the connection to the pins

 

 

0 Kudos
Message 10 of 27
(5,562 Views)