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.
Communicate data, control, and status between two or more parallel process loops contained within the same VI (“VI-scoped”)
Make the latest value of a variable available to other process loops
Stop multiple parallel loops from a single control
Stores values in front-panel indicators
Tag-based (latest value) communication
Easy to code
Supports multiple clock domains: timed loops and conventional loops
Keep in mind
Local variables can only be created from front-panel controls and indicators
Because this is tag-based (latest value) communication, rapid changes of a variable in one process can be missed in the other process
Ensure that control signals remain active long enough for the other process to detect them, or devise a hand-shaking scheme
Consider global variables if you need to communicate with process loops in another VI that is part of the same RT target
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:
Connect your Academic RIO Device to your PC using USBLAN, Ethernet, or Wi-Fi. NOTE: Not all Academic RIO Devices have Ethernet and Wi-Fi connectivity options.