I am recording 7 channels using a VI of LabVIEW. The VI reads 3 analogue inputs from a DATAQ card (DI-158U) connected via USB and the 4 remaining channels from a PLC connected via Ethernet.
I created a while loop to update the indicators and plots every 2 seconds. Moreover, inside the while loop there is a case structure to record the samples into an Excel file (if the user switch on the option of recording).
The main problem is that after running this VI for several hours the sampling interval at the Excel file is not stable at 2 seconds. The first samples have an interval of 2 seconds, but the last ones have an internal of 16 seconds. Therefore, there is a source of delay which it is unknown.
I think it is related with the fact of the file's writing at each iteration, but I am not really sure. I would like to ask for suggestions where the delay could occur when the VI is running for several hours.