10-23-2013 06:12 AM
Hi all,
We are working on a data acquisition application via SPI, and we already achieved reading from our sensors with NI-USB8452 from a C++ program. However, we have to manually ("polling") issue writing+reading commands to read each measurement, which imposes some delay.
Is there any way to tell the USB board to perform some SPI script automatically at a fixed rate? In that case, how are the reading data retrieved from the C++ program?
Best,
Jose Luis
01-02-2014 02:52 PM
Depending on the script you can use the SPI streaming mode.If your script is to write a consistent, small output message (up to 64-bits, if I recall correctly) and read N bytes (N is not limited) then streaming mode will continue to run at a rate dictated by your configuration. However, this isn't exactly the same as the scripting API, but if you aren't doing anything fancy, this will give you great performance. The one thing to note is that SPI streaming is limited to one chip select.