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: 

HELP with LabVIEW and raspberry pi3 B+

Solved!
Go to solution

hello dear all

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 .

 

Johny117_0-1620533107650.png

but there always an error 5005 like this 

Johny117_1-1620533645269.png

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)

 

0 Kudos
Message 1 of 2
(807 Views)
Solution
Accepted by topic author Johny117

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. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 2
(768 Views)