Showing results for 
Search instead for 
Did you mean: 

how to acquire data from loop faster

hi sir good day 🙂 i just want to know how to acquire the data outisde the loop faster.. as you can see on the vi i have attached, i am using DAQmx write and read to send the image data in the digital i/o lines of fpga board.. daqmx write generate a single sample of boolean. my problem is i cant get output data when i press the stop button... the loop is only aborted when it written all the data of the pixels i have write.. im just asking if theres a way to speed up the writing of data so that i will not wait a long time just to acqure the data i have writen. thank you 🙂

0 Kudos
Message 1 of 8

help sir.. please.. 😞

0 Kudos
Message 2 of 8

I would do it like in the attached example. But I think you need to rework this VI a little. First of all try to keep the data flow from left to right (input and output of the for loop) and use the error wire to ensure data flow.

Message 3 of 8

thank you for the reply sir.. 🙂 i wil work on it.. i will post later whatever problem  i may encounter.. 🙂 

0 Kudos
Message 4 of 8

sir, how can i increase the speed of writing of the boolean data? because in the vi that i have attached, the writing of single sample of data is slow since it is written serially.. i just want to ask if theres a way i can write it faster..  😞 thanks..

0 Kudos
Message 5 of 8

Hi Robin123_Hood, 


You should look into a producer/consumer architecture to perform tasks in parallel, rather than serial. An overview of the producer-consumer architecture can be found here:


This should give you a good starting point to work from. 

National Instruments
Staff Certification Engineer
0 Kudos
Message 6 of 8

I'm a bit confused by how you have set up that code.


First, what is the DAQmx device?  You are writing and reading the same Task.  This is probably not only unnecessary but, may just be wrong.


Next lest speed up things considerably by adding a DAQmx Control Task before the loop and COMMIT the task (this will prevent a bunch of unnecessary DAQmx state transitions)


Last, (If I understood) you want the write loop to stop when you hit the Stop Button Read the stop button in the for loop and show the for loop conditional terminal

"Should be" isn't "Is" -Jay
Message 7 of 8

thanks for the reply and the modifications sir.. really appreciated 🙂 the speed of writing of samples increased. ahm is theres a way to write sample serially as fast when writing it in parallel? thanks 🙂

0 Kudos
Message 8 of 8