Data Grabbing with NI DAQ
이전 댓글 표시
I am using NI USB-6009 to both measure the input from a sensor and output data to an actuator. The output has to be modified based on the input. I have tried using singleinputscan to acquire data, then perform calculations and output data in a loop, and this works but is quite slow. The singleinputscan in particular is very slow.
I believe it could be faster if I could run continuous data acquisition in the background and periodically grab that data. The grabbed data has to be processed before the next set of data is grabbed, and so the grabbing rate is not known beforehand. In other words I want to run background data acquisition then run other calculations in parallel, when these calculations are complete the programme should then ask the background process for the most recently acquired data, process this data then ask for more data and so on.
I know I can run background acquisition and use a listener to periodically deliver data and run a callback function. This doesn't work for me. I need the callback to ask for the data when it is ready and not have it delivered and called when the data is available. I cannot see a method to do this in the documentation, but there surely should be a way.
I hope it is clear what I want/need.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Acquisition Toolbox Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!