Quickstart Guide
Introduction RIO Academic RIO Application examples Your first RT app Your first FPGA app
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)
Design flow Simulation Inter-process communication RT/host communication Derived clock domain IP blocks FPGA personality
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

TCP client-server

Create a server on the Academic RIO Device that listens for TCP/IP network connection requests 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 TCP channel

Use cases


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:

TCP Open Connection
TCP Close Connection
TCP Read
TCP Write
TCP Create Listener
TCP Wait On Listener
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/8HSXcV5pMTg (1:50)

Developer walk-through

https://youtu.be/IuJUR2tOO_s (7:19)