LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect Timestamps with Write to measurement file

Hi

 

Good day.

 

I am a beginner to LabVIEW software and recently working with LabVIEW 2017 for data acquisition. I have to acquire airflow signals continuously as I need to perform multiple recordings in one acquisition. I added a waveform chart into the vi for continuous acquisition and write to measurement file for saving data of multiple recordings.

 

Query 1: When I added the write to measurement file the total number of samples of the recorded data was correct. I tried saving the data in both excel and TDMS in write to measurement file. However, the timestamps go haywire, but the data obtained seems to be correct as it corresponds to the plots presented in the chart. The sampling rate is 100Hz.  Could anyone help me to fix this problem? How to get a proper time stamp?

 

Query 2: The waveform chart legend provides me with 4 plots, including ‘Plot 0’. I only want Plot 1-3. When I reduce the number of plots in property icon it removes the latest plot (plot 3). How could I remove ‘Plot 0’ from the legend of the chart?

 

Query 3: Is it possible for me to change the sampling rate in the vi? I tried changing the value 100 to some other digits, but the signals are sample only at 100Hz. How to change the sampling rate?

 

Attached here are the vi responsible for airflow acquisition and the excel sheets of the recorded data. I really hope that I could get solutions to these problems.

 

Thanks.

 

Regards,

Priya

Download All
0 Kudos
Message 1 of 6
(2,571 Views)

Please zip your entire project and attach it. It's hard to tell what's going on with so many missing vis, especially when the ones that acquire the data are missing.

0 Kudos
Message 2 of 6
(2,543 Views)

Hi,

 

Please find the sub VIs below. 

 

Thanks. 

0 Kudos
Message 3 of 6
(2,456 Views)

Hi priyadevi,

 

what about that comment on "ZIP them all into one file" don't you understand?

 

On question 1:

check.png

Which of the timestamps is wrong? For me they all seem ok…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,424 Views)

Hi Mr. GerdW, 

 

If you look at the timestamps of the data, the seconds and milliseconds are not following a proper order. The milliseconds difference is grouped together for each seconds as indicated in the uploaded caption (row 8-26) and (row 27-58; row 59-84 and etc.) in the uploaded excel file.

 

In TDMS file the millisecond differences of each second were presented in multiple sheets. However, the data was correct when it was plotted on a graph. 

 

When I rearrange the timestamp according to seconds and milliseconds, the nature of data is changed. 

 

Thanks. 

 

Regards,

Priya

 

 

0 Kudos
Message 5 of 6
(2,414 Views)

@priyadevi2206 wrote:

 

When I rearrange the timestamp according to seconds and milliseconds, the nature of data is changed. 


I'm not sure what you meant by this, but I see a LOT of problems with your program. Here are a few observations:

 

1. Use Bundle by Name when you want to change one value in a cluster. You don't have to read all of the values and then write them back.

 

2. There is a race condition in STvintegrator.vi. Make sure that you understand the concept of dataflow.

 

3. Why not write the waveforms directly to TDMS?

 

4. Please be careful about hidden code data wires/wires that run the wrong way or are running under an object.

 

5. If you are having to use a sequence structure then you're usually doing something wrong (especially a stacked sequence structure). 

 

6. What is that Resetting Controls and variables case structure all about?

 

7. You may have to get with the driver vendor to discuss the timestamp issue.

 

 

 

0 Kudos
Message 6 of 6
(2,401 Views)