Home
Quickstart Guide
Introduction RIO Academic RIO Application examples Your first RT app Your first FPGA app
Real-Time
Basic procedures System admin File system I/O monitor System controller architecture Timed loops Inter-process communication RT/Host communication RT/FPGA communication FPGA personalities Interrupts Datalogger (file I/O)
FPGA
Design flow Simulation Inter-process communication RT/host communication Derived clock domain IP blocks FPGA personality
Networking
Get connected Email Web services UDP TCP IP addresses
Site Map
Guides Code examples Procedures Tags LabVIEW block diagram elements Targets Communications All pages
Glossary How to use About
RIO Developer Essentials Guide for Academia
RT PC code example

UDP client-server

Create a server on the Academic RIO Device that listens for UDP datagram messages from a client running on the PC host, accepts client information including the desired state of the four onboard LEDs, sets the LEDs accordingly, and returns the state of the onboard 3-axis accelerometer and pushbutton.

LabVIEW RT block diagram snippet: Read the onboard accelerometer and pushbutton, convert to JSON string, and write to UDP channel

Use cases

Features

Keep in mind

LabVIEW block diagram elements

Locate these elements with "Quick Drop" (press Ctrl+Space and start typing the name); click on an icon to see more sample code that uses that element:

UDP Open
UDP Close
UDP Read
UDP Write
String To IP
IP To String
Flatten To JSON
Unflatten From JSON
Get Date-Time String
Event Structure
First Call?

Example code

Expected results

https://youtu.be/1Vjhxhi1lmo (2:23)

Developer walk-through

https://youtu.be/y6BMRIgefeM (7:06)

Outline