02-10-2021 11:56 AM
hello
I am setting a measurement vi using :
I have set a sample clock @100hz on the anolog input and then placed a daqmx read @1 sample per read in a while loop. In this same loop, I am reading all other input (expecting the same frequncy for all) and write everything in a write to measurement vi express.
When I am enabling write measurement, I only write 150 logs lines (after 1.5sec) then it stops with no error message.
By increasing the sample read to 10 on the daqmx read, my output file give analog input datas @100hz and all others sensors @10hz (1 log line every 10 lines). But in this case, writing measurement does not stop.
I have tried to increase buffer (with daqmx buffer node) on the analog input channel but does not help
By decreasing the frequency, duration before the writing stops is longer. And @10hz it works
I don't understand what happen and what to test.
Hope my explanation are clear
thank you for your help
02-10-2021 12:50 PM
Hi pi3rr3,
@pi3rr3 wrote:
I don't understand what happen and what to test.
Hope my explanation are clear
We don't know either, because your explanation is missing a VI to show the problem in your code…
@pi3rr3 wrote:
write everything in a write to measurement vi express.
This might be a part of the problem…
02-10-2021 03:55 PM
thank for your answer gerdW, I will clear up my vi first.
What do you advise to replace this express vi?
04-13-2022 11:23 PM
Did you get a solution?
04-14-2022 02:10 AM
not really
I have replaced every VI express but did not resolve.
I finally have increased the frequency to have the lower one at the right level and have decimated the higher one...
04-19-2022 10:59 PM
Thanks for the reply! I have never found a good solution to acquiring digital and analogue signals synchronously into the same file. At least, not in the time in which I need to provide a solution. I resort to an asynchronous capture, and entering the digital value as a comment in the LVM file. So far, it has been close enough, but the day will come when someone wants fast and accurate timing...
04-20-2022 12:01 AM
Actually, it is not logical to synchronize different types of devices (at the hardware clock level, maybe of application-level importance at certain events in execution). For instance, the DAQ AI are continuously sampled whereas I2C communication using 8451 is packet-based and not continuous.
If you were to synchronize both an I2C packet and a continuous AI capture, you could use the I2C clock edge as a start trigger and capture a known number of samples on DAQ so that the samples correspond to the I2C packet duration.
Moreover, 8451 is not a device designed to be synchronized to external instruments and is meant to be just a simple I2C/SPI interface for asynchronous data read/write. If you were to implement I2C on the same DAQ that does AI capture, you can perfectly synchronize.