LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add a timestamp to serial data capture

Hi!

 

I have a balance that I am reading through RS232 using VISA. The balance output frequency depends a lot on the dynamics of the load applied to it (so high f when the load is changing, and low f when it is stable). I would like to add a timestamp (ideally relative to the point when I click "start") to the data everytime it is captured, but I am not sure how to do it exactly. Any ideas and suggestions are welcome!

 

Thanks a lot in advance!

 

Dani

0 Kudos
Message 1 of 2
(987 Views)

Hi PanDiStelle,

 


@PanDiStelle wrote:

 I would like to add a timestamp (ideally relative to the point when I click "start") to the data everytime it is captured, but I am not sure how to do it exactly. Any ideas and suggestions are welcome!


You need to calculate the relative time in your acquisition loop:

relative_time := current_time - time_at_start_of_loop

Basically just a subtract function: I guess you know how to implement this…

 

Then you need to "combine" that relative time value with your gauge reading: most often such data is collected in (2D) arrays…

 

What have you tried and where are you stuck?

Why don't you attach your current code (aka VI)?

Best regards,
GerdW


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