07-20-2017 02:03 PM
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.
Solved! Go to Solution.
07-21-2017 08:41 AM
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
07-21-2017 08:48 AM - edited 07-21-2017 08:50 AM
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.
07-21-2017 09:52 AM
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.