05-09-2023 04:30 AM
Bonjour,
Je viens vers vous demander quelques orientations sur le problème que je rencontre pour une acquisition synchronisée de 3 voies de température ( prise sur NI-9205) et 3 voies de tension ( prise sur NI-9239), monté sur un châssis compactDAQ-9185. Quand l'acquisition démarre, ça fait à peu près 10 secondes d'acquisition et s'arrête ( je joins en copie la notification ).
J'ai éssayé de diminuer la taille du buffer et la fréquence d'acquisition résoudre se problème mais ça ne marche pas.
Voilà pourquoi, je sollicite votre savoir-faire me donner quelques conseils à faire.
Je joins en copie une capture de mon VI et la notification.
Merci d'avance
05-09-2023 10:09 AM
This error has to do with the value of the sample rate and the number of samples to read. What are the values for these inputs?
Please attach the code as we cannot debug or test an image.
05-09-2023 12:51 PM
Thank you for your answer, here is the code. I take 100 ech/s and a frequency of 1000 Hz.
I use 3 channels for temperature (thermocouple type k) and 3 channels for veltage.
Thank you for your feedback.
05-09-2023 04:00 PM
Firstly, set the number of samples per channel for DAQmx Read VI to 100 instead. Specifying Number of Samples When Continuously Acquiring with NI-DAQmx for LabVIEW explains the differences in sample rate, samples per channel for DAQmx Timing VI and number of samples per channel for DAQmx Read VI.
With your current setting of a 1000 Hz sampling rate and 1000 buffer size (number of samples per channel for DAQmx Timing VI), you are requesting 1000 sample points (number of samples per channel for DAQmx Read VI) every iteration. DAQmx Read VI needs to wait at least one full second for the data points to be available, this guarantees that the buffer is always full. The samples per channel for DAQmx Timing VI should always have a larger value than the number of samples per channel for DAQmx Read VI.
Besides, file I/O takes a much longer time to execute. I recommend you use Producer/Consumer Architecture to move the Write to Measurement VI to another loop.