From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-15-2011 03:28 PM
I use this labview code to read and save some electrical measurement data from a set of instruments. I am having a problem that the code stops writing to the file after a while. It stops responding too. The only way to stop it then is to use the task manager and kill it. The code was written for an older version of labview but now I am using labview 9. Everything else seems updated but there's a section that uses Write characters to file vi and that may be causing the problem. I made a few futile attempts to change it. I would highly appreciate if someone takes a look at it and could tell me what's going wrong.
02-16-2011 07:13 AM
Have you ever looked at the size of the file when the program locks up? There is a problem with file that are bigger than 2Gig.
I would also reccomend a look into state machine ans producer consumer loops. You have a lot going on in you code and it would run more efficently if you looked into these structures for programming. It would also make it easier in the future to upgrade and change you code,
02-16-2011 02:15 PM
Definitely check on the file size and processor usage when it crashes. The software should give an error if it's writing too big of a file or the GPIB device times out. If the program is just freezing after a period of time, it's probably getting stuck in a loop somewhere.
How long does the program run before it freezes?
02-17-2011 08:29 AM
I will second aeastet's advice - please look into how state machines and producer/consumer loops work and use them. Your program is very inefficient, but is very similar to what I would have written before I learned about state machines and producer/consumer loops. Start with the LabVIEW help and go from there. These forums and the National Instruments website can give you lots of help.
Two things that will help you for this particular problem: