LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving data every second in serial communication

I want to save data every second from the weighing scale. I have prepared the attached code. However, based on the remainder, I am saving data, but sometimes the remainder exceeds that value, and it isn't easy to estimate. Suppose I changed to save data every 2 seconds or minutes. Kindly help me solve this issue. Thank you in advance for your help.

0 Kudos
Message 1 of 2
(994 Views)

Hi Chirag,

 


@Chirag134 wrote:

I want to save data every second from the weighing scale. I have prepared the attached code. However, based on the remainder, I am saving data, but sometimes the remainder exceeds that value, and it isn't easy to estimate.


How long does your scale need to response/send new data?

 

When you want to save data exactly each second then I would place that code in a separate loop to avoid timing problems because of delays induced by the scale communication! You can transfer data between your DAQ loop and the file saving loopp using notifiers, channel wires, even local variables. And I would not use Q&R on the tick value to determine the time, but use "ordinary" wait functions…

Best regards,
GerdW


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