Per scaricare il software NI, compresi i prodotti illustrati di seguito, visitare il sito ni.com/downloads.
Overview:
This example demonstrates how to add the feature of pausing then continue execution of a while loop.
Description:
This example determines if a button has been pressed to pause the while loop, and takes action accordingly. The pause button uses a local variable to transfer the boolean data into the pause control loop.
Requirements:
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code:
Additional Information or References:
Block Diagram:
Note: If the loop was paused, it cannot be stopped in this example unless you continue execution first. If you want to implement the option of stopping execution when the loop is stopped, then you must add another local variable linked to the stop control button and wire it to an "invert" then an "or" function inside the pause loop so you can stop the internal loop first. Otherwise, the external loop will never affect the value change of the stop control to the stop condition terminal since the code inside did not terminate execution (Dataflow concept).
**This document has been updated to meet the current required format for the NI Code Exchange.**
Il codice di esempio scaricato dall'Example Code Exchange nella NI Community è concesso in licenza con la licenza MIT.
What about the Stop button when the Pause is set ?!?
The Stop button should stop the VI without the need for another action to "un-pause" the loop, no ?
This example is very helpful. I am somewhat new to LabView and am having trouble following how the inner while loop can continue while the outer while loop is suspended. Can you explain how this works?
Thank you for uploading this example.
You can learn more about While Loops and For Loops in the following tutorial.
clever!
Works well!
how to stop the loop when it is paused?
it doesnt stop unless we un-pause it
Bring a local variable from the stop button into the inner while loop.
You will need to change the stop button to switch mode (not latch).
Here is my solution to pausing the loop:"False" case is empty. Uncheck "Lock panel" in "Edit events" window.