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 code example

Channel wire

Use a channel wire to communicate between two (or more) parallel process loops contained within the same VI, and use a channel wire to stop parallel loops with one "stop" button. Requires LabVIEW 2016 or later version.

LabVIEW RT block diagram snippet: Process Loop #1 writes a channel wire, Process Loop #2 reads the channel wire

Use cases


Keep in mind

IMPORTANT: Stream-style channel wire readers do not time out by default and will prevent process loops from stopping even when their “stop” condition is true. Either wire a time-out value to each reader or wire the “stop” condition wire to the “last element? (F)” input of each writer to close the stream.

LabVIEW block diagram elements

Channel wire endpoint writers and readers are subVIs created “on the fly” instead of existing in subpalettes. Simply right-click on an output terminal or wire and select “Create | Channel Writer” (similar to the way you create an indicator); right-click on a channel writer output or channel wire and select “Create | Channel Reader”.

Expect to see a noticeable delay as the subVI is constructed.

Example code

Expected results

https://youtu.be/zc1dZrqlWGY (0:44)

Developer walk-through

https://youtu.be/weo3H8rqWHA (2:31)

For more information

  1. Stopping Parallel While Loops in LabVIEW with One Stop Button (http://digital.ni.com/public.nsf/allkb/267704CDE91156D186256F6D00711AAE)
    Stop multiple process loops with channel wires, local variables, property nodes, notifiers, and queues.
  2. Channel Wires (http://www.ni.com/white-paper/53423/en/)
    From the overview: "The channel wire, a new, feature in LabVIEW 2016, simplifies the programming involved in data transfer between parallel loops, such as the common producer/consumer pattern. This white paper provides an introduction to channel wires and highlights specific use cases".
  3. Real Time Stream (Channel Wires) (https://zone.ni.com/reference/en-XX/help/371361N-01/glang/channel_rt_stream/)
    Describes how to select the "real time stream" channel wire elements.