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: 

How to interface NI myRIO with Arduino Uno Board?

 I have written the code in Arduino IDE, now I want to interface Arduino board with NI myRIO 1900 board to get the data.

What code required to be written in LabVIEW ?

What connections are required?

0 Kudos
Message 1 of 4
(5,085 Views)

Well an Uno interfaces to the micro with a converter board which I believe is an FTDI serial device.  So plugging the USB into the myRIO requires drivers for the FTDI chip for it to be recognized and used when deploying code.  There are some examples of loading drivers in the RT Linux to add USB serial ports and this will probably work.  Once you have that working the Simple Serial example should work for reading and writing raw serial data.

 

Alternatively it looks like you can wire up the TX and RX from the micro to the UART of the myRIO and use those functions to talk directly to it.

0 Kudos
Message 2 of 4
(5,047 Views)

Thank You for replying..!....

But I still have some doubts....after I connect the Tx-Rx of Arduino Board and NI myRIO, what steps do I need to follow to get the output on the Front Panel of LABVIEW?

 

Suppose the code I dumped in  Arduino is ---LED BLINK..

void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

 

What should I do in the block diagram panel of LABVIEW to get the desired output?

 

Please explain...!...

Thanks for your time..

 

 

0 Kudos
Message 3 of 4
(5,041 Views)

Well since there is no communication in your code, from the Arduino to anything I'd say you should first start with arduino tutorials describing how to communicate with devices over serial, and how to use UART communication.  Then I'd suggest taking some LabVIEW tutorials, focusing on NI-VISA and serial communications if you intend on using the USB.  Also I'd suggest some myRIO tutorials on using the express VIs and the UART ones in particular. 

 

http://www.ladyada.net/learn/arduino/lesson4.html

https://www.youtube.com/watch?v=0FMnkFDsGQs

 

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide 

Learn NI Training Resource Videos

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required

0 Kudos
Message 4 of 4
(5,031 Views)