From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Faster Sampling Rate using SPI and I2C Driver API

Hello all,

 

I currently own cRIO and NI 9401 module.

Using the SPI Driver API from here: https://www.ni.com/en/support/downloads/tools-network/download.spi-and-i2c-driver-api.html,

I was able to read the data using the example code.

 

Now I am trying to read the data at a rate of 1kHz but I cannot change the sampling rate to achive that rate.

I need to read in 128 bits (16 bytes) of serial data at once.

What I tried is to change the clock rate value on configuration but it wasn't successful.

 

Thanks in advance.

0 Kudos
Message 1 of 2
(2,674 Views)

Is the current rate higher but you're finding that you're unable to lower the rate, or vice versa? How have you been trying to change the rate? Could you clarify what you mean by it wasn't successful? Are you getting an error when trying to change the rate or does it just get coerced to another value? If so, what is that value? It might be useful to see the VI that you're using for your SPI application. 

Eden K
Applications Engineer
0 Kudos
Message 2 of 2
(2,589 Views)