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

Local variable (RT)

Use a local variable (front-panel indicator) to communicate between two parallel process loops contained within the same VI, and use a local variable to stop parallel loops with one "stop" button.

LabVIEW RT block diagram snippet: Process Loop #1 writes an indicator, Process Loop #2 reads the indicator value with a local variable

Use cases


Keep in mind

NOTE: The stop button’s mechanical action must be changed from the default (“Latch When Released”) to either “Switch When Pressed” or “Switch When Released”. Both of these settings leave the stop button pressed down when the VI stops. Write a “false” value to the stop button local variable after all loops have stopped to reset the stop button to its default state as the last step before the VI stops running.

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:

Local Variable
Feedback Node

Example code

Expected results

https://youtu.be/Qmuv-K8qlsg (0:46)

Developer walk-through

https://youtu.be/K0yiWDk68co (2:46)


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.