LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to Measurement File writes samples out of order.

Solved!
Go to solution

Hello Everyone,

 

I'm having a strange problem with either the DAQmx read or the Write to Measurement File express Vi where the data being written to the excel file is out of order as if it's throwing every 1/10th in first instead of the actual timed order. I've highlighted the excel file to give a better idea.

 

The PCI card is a 6040E if that matters.

 

Can't seem to wrap my head around this so I'd appreciate any help. 

Download All
0 Kudos
Message 1 of 4
(2,486 Views)

Gonna give this a little bump, still frustrated with this problem. In the meantime I might try to do away with the express VI and just get it done the long way with the write to spreadsheet.vi and see if the results are the same

0 Kudos
Message 2 of 4
(2,415 Views)
Solution
Accepted by topic author jtboik

Hi jtboik,

 

it's your fault…

 

You read your samples as 1D array - without any timing information. This array is written by WriteMeasurementFile - but as the timing information is missing it assumes a sample rate of just 1Hz (instead of 100Hz as configured)!

 

Simple solution: read the samples as waveform (with timing data included)!

 

Other suggestions:

- Never hide the label of terminals in the block diagram!

- Don't use a "value" property when you could use a local variable. Don't use a local when you can use wire.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 4
(2,413 Views)

Thanks so much! That did fix it!

 

I swear I already tried switching to waveform, but I must have left that conversion before it went into the write measurement, thus maybe removing the timing info. 

 

Other than that I appreciate the suggestions, but I'm not sure I am actually hiding any terminal labels or using unnecessary values, but I will keep this programming guidelines in mind.  

0 Kudos
Message 4 of 4
(2,408 Views)