LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MyRIO + Raspberry

Hi,

I wanted to ask about the best way to establish communication between my myRIO and a Raspberry Pi using Python. I’m not sure if the myRIO’s USB ports (A or B) function as serial interfaces, similar to how an Arduino communicates with a Raspberry Pi.

Could you clarify whether USB can be used for serial communication, or if there’s a better approach?

Thanks!

0 Kudos
Message 1 of 2
(110 Views)

First questions you need to answer are:

  • What version of LabVIEW are you running?  Please tell us the year and the bittedness (e.g. LabVIEW 2019, 32-bit).
  • What version of the myRIO Software Toolkit are you using?

The Software Toolkit has functions to handle three types of serial communication.  The Toolkit comes with Express VIs that can let you use selected pins on the A and B ports to support serial communication either using the RS-232 protocol (i.e. act as a UART), SPI, or I²C.  You can also "roll your own" -- I've worked on a 16-channel stimulator that used a myRIO (and a few other boards, including a motherboard into which the myRIO "plugged" through its A and B connectors (with a ribbon cable going to the C connector) and was capable of handling 16 channels of SPI communications with 16 daughter boards that managed the 16 channels of stimulus.  [Just because the myRIO Toolkit implements only 2 channels of SPI and specifies the pins to use doesn't mean you can't re-arrange the pins are used and make a system running 16 SPI channels in parallel].

 

[Note -- I'm currently not on my "myRIO" PC, so I can't provide an example.  But as long as you have the correct versions of LabVIEW (32-bit) and the corresponding myRIO Software Toolkit on a Windows 10 (64-bit) PC, and have a myRIO configured by this PC (the myRIO software has to "match" the PC software), you should be able to use Serial Port communication.  I also know you asked about using the USB port for Serial Communication, and my response was using a Serial Port for Serial Communication -- I must confess I've not used the myRIO's USB port in my code.]

 

Bob Schor

0 Kudos
Message 2 of 2
(85 Views)