LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Write to measurement file", time not start from zero, and Long time data aquisition gives error,

Dear Everyone,  With help from this forum I have composed a code to perform data acquisition task. This code works well but errors pop up sometimes. I hope you can help me out. What I have is as follows, NI PCI-6259 (32 AI, 48 DIO, 4 AO), BNC-2120, and labview 8.0.What I want to do. I want to acquire the voltage from a preamplifier, display a real voltage vs. time graph and write to a data file. The real voltage should be the output voltage from the preamplifier divided by the sensitivity of the preamplifier. I used "write to measurement file" to do this job and I attached the code, the screenshot image, and error file with this message for your information. Here are my questions. 1, I believe "write to measurement file" need open then close the file each time it write the data to the file. Is there a better way to keep the file open and continuously write data to the file? When I set the sampling rate very high, such as 50,000 sample/second, labview crash in a few second no matter "number of samples per channel" is -1, 10,000 or any other number.2, Based my current code and your experiences, how to make it more reliable? I need it to acquire data for a long time (sample rate >50 sample/second, and total acquisition time>12 hours)3, When I let the labview run a long time, such as overnight at 50 sample/second, it will crash in the middle. The error message seems "an internal error or crash occurred at TypeManager objects.cpp.line 977". Is it related to "write to measurement file"? I don't have much trouble at a short term (<1h) measurement.4, In the final data file, I always got blank column at the first column, time at the second, and then voltage at the third. Is there an easy way to eliminate the first blank column? This is not critical. 5, The time column does not always start from zero. It might be from zero at the first acquisition. For example, if I acquire data at 10 sample/second, I should have a time column as 0.1, 0.2, 0.3, 0.4.... However, the time in the file might be 11.7, 11.8, 11.9, 12.....6, During the measurement, I write the data to a temporary file called "vt of temp.data". In case labview crashes, I still have the data before the crash.  Do you have better suggestions? Thank you very much!

Rusen

0 Kudos
Message 1 of 3
(2,865 Views)

P.S.

1, lvlog08-19-08-10-11-00.txt is generated at the first startup after the crash.

2, Quesition 1, 2, 3, etc should start from a new line. However, they all come together.  How to make it to start from a new line?

Thanks,

Rusen

0 Kudos
Message 2 of 3
(2,862 Views)

Dear Everyone,  With help from this forum I have composed a code to perform data acquisition task. This code works well but errors pop up sometimes. I hope you can help me out. 

 

What I have is as follows, NI PCI-6259 (32 AI, 48 DIO, 4 AO), BNC-2120, and labview 8.0.

What I want to do. I want to acquire the voltage from a preamplifier, display a real voltage vs. time graph and write to a data file. The real voltage should be the output voltage from the preamplifier divided by the sensitivity of the preamplifier.

 

I used "write to measurement file" to do this job and I attached the code, the screenshot image, and error file with this message for your information. 

Here are my questions. 

1, I believe "write to measurement file" need open then close the file each time it write the data to the file. Is there a better way to keep the file open and continuously write data to the file? When I set the sampling rate very high, such as 50,000 sample/second, labview crash in a few second no matter "number of samples per channel" is -1, 10,000 or any other number.

2, Based my current code and your experiences, how to make it more reliable? I need it to acquire data for a long time (sample rate >50 sample/second, and total acquisition time>12 hours)

3, When I let the labview run a long time, such as overnight at 50 sample/second, it will crash in the middle. The error message seems "an internal error or crash occurred at TypeManager objects.cpp.line 977". Is it related to "write to measurement file"? I don't have much trouble at a short term (<1h) measurement.

4, In the final data file, I always got blank column at the first column, time at the second, and then voltage at the third. Is there an easy way to eliminate the first blank column? This is not critical.

5, The time column does not always start from zero. It might be from zero at the first acquisition. For example, if I acquire data at 10 sample/second, I should have a time column as 0.1, 0.2, 0.3, 0.4.... However, the time in the file might be 11.7, 11.8, 11.9, 12.....

6, During the measurement, I write the data to a temporary file called "vt of temp.data". In case labview crashes, I still have the data before the crash.  Do you have better suggestions?  

 

Thank you very much!

Rusen

 

P.S. I preview and got everything together, then I edit the message and make they separate, then they separate. Strange.

0 Kudos
Message 3 of 3
(2,861 Views)