开发者

Syncing the timestamp with incoming data in Labview

开发者 https://www.devze.com 2023-02-02 18:11 出处:网络
In Labview, I\'m trying to produce a .csv file with one column being the timestamp and the others being the data so each data point is timestamped.I have succeed开发者_JS百科ed in doing that, but my t

In Labview, I'm trying to produce a .csv file with one column being the timestamp and the others being the data so each data point is timestamped. I have succeed开发者_JS百科ed in doing that, but my timestamp and data aren't synced so the values don't always align. For example, sometimes it will only have a data point, but not a timestamp associated on the same line. Here is the section of the code that takes the waveform (data) and timestamp to spit out the spreadsheet file.

Syncing the timestamp with incoming data in Labview

Not shown is the time delay.

Thank you in advance!


at first sight one problem is that you don't seem to be timestamping everey single datapoint, but instead an array of points: Waveform Chart is converted to DBL array, that is converted to a string, and that string gets the timestamp. If the array has more than one point, likely only the first point will get the timestamp.

Apart from that, it also seems that if the record flag is on, each loop call will append to an array and you write the entire array to the csv (so in fact writing duplicates), is this correct?

0

精彩评论

暂无评论...
验证码 换一张
取 消