07-29-2021 01:31 AM
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.
07-29-2021 01:48 AM
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…