05-19-2023 04:09 AM
Hello All.
My hardware consists off:
cDAQ 9189
NI 9025
NI 9026
NI 9212
I an experiment in which I need to read 500 AI samples when a user clicks on a button.
my daq setting consist off init for the channels and then reading them with in a loop.
If I continuously read the channels there is no problem.
Then, I placed the AI read vi within a case. so that the channels are read when the user hits the read button.
this where the problems start.
After reading 3-4 times there is a problem and I get the following error:
error code: -200279
gil_wizard_test1.vi<append>
<B>Property: </B>RelativeTo
<B>Corresponding Value: </B>Current Read Position
<B>Property: </B>Offset
<B>Corresponding Value: </B>0
<B>Task Name: </B>_unnamedTask<20>
I've also tried to use the "finite sample" option, but I get the error -200278.
Thanks for your help!
I have attached my file in labview 19
Thanks!
Solved! Go to Solution.
05-19-2023 08:49 AM
1. Place DAQmx Start, DAQmx Read and DAQmx Stop inside the loop.
2. For Finite Sampling, the number of samples input to the DAQmx Timing VI is the total number of samples you want to read.
Please note that the approach using finite sampling will have a slight delay (probably around 100ms) between the time user presses the button and the data is acquired, as it takes some time for the cDAQ to start the acquisition. You can minimize the delay by using continuous sampling, then polling the data repeatedly. This might need a different slightly more complicated coding.
05-30-2023 02:48 AM
Thanks!