08-24-2021 03:29 AM
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
08-24-2021 03:40 AM
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)?