I'm new there with LabVIEW and Raspberry Pi. So I get assignment from my adviser use LabVIEW to create a DAQ system with Raspberry Pi. He told me use a STM32 to get AI as a slave target and then the date has been transmitted to RPi via SPI communication. Now I get the LINX from the VIPM and create a VIs like this to get date form the RPi .
but there always an error 5005 like this
My first guess is that there might be a problem with SPI communication ,but I‘m not sure. Could you please help me with this problem. Thanks a lot.
(my English expression may not be too standard, but I hope you can understand me please help me)
How should your RPI magically know that he should talk with the STM32 over SPI when you tell him to read AI 0? The RPI has no analog IO on board so Linx doesn’t support any analog IO. You need to instead use the Linx SPI functions to talk to your STM32.
That’s going to be a lot more work. First you need some firmware (not written in LabVIEW) that implements a specific SPI data protocol over which it serves the analog values. Then on the RPI you can use Linx to implement that SPI protocol using the Linx SPI functions.
Unless you already have some ready made firmware for the STM32 that does everything including the SPI communication, I would first create a variant that talks over serial UART instead and then use the Linx UART functions. That is a little more straightforward to develop and debug than SPI communication.