Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/05/2024 in all areas

  1. There's also a little known feature in the top method where you can right click the Wait On Asynchronous Call and can set a timeout. This will then wait some amount of time for the VI to finish and will generate an error if it isn't completed yet. There are better ways to handle knowing when the VI is done, but it is good for a quick and dirty solution to wait a few ms for it to finish, and if it isn't done, go service something like the UI and come back again later. I submitted that as an idea on the Idea Exchange, then AQ said why it was a bad idea. Only for years later it to be implemented anyway.
    2 points
  2. One small correction. The Open VI Reference will block on UI Rootloop even in the first (top) one. The Run Asynchronous method will however not incur a rootloop round trip.
    1 point
  3. The top one, the SAC, will run even if the root loop is busy, AND allows you to set the inputs. This function was not available in LabVIEW until version 2011 or so. It is especially useful if you need your application to spawn VI clones to handle various events (TCP session handlers for example) regardless of what the user is doing in the GUI... The two bottom ones will be blocked if the root loop is busy, e.g. if the user happens to be viewing the time picker of a time control it will halt until the user closes the time picker. Before the SAC was introduced in LabVIEW you had to use the run method (bottom one) if you wanted to avoid having to wait for the dynamically launched VI to complete (it has the Wait until done input). The Call by reference node on the other hand had the advantage over the run method of offering control inputs to the call whereas the run method would require you to use set control invoke nodes for that. Here is a long thread about the root loop issue from before the SAC was introduced: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Calendar-control-that-does-not-block-the-GUI/idi-p/1417794?search-action-id=359039184054&search-result-uid=1417794
    1 point
  4. Top: Start Asynchronous Call - Loads a VI, starts running the VI, and then waits for it to complete. The SAC returns as soon as the VI has started to run. The Wait On Asynchronous Call is what waits for the VI to complete and return its outputs. Middle: Call By Reference - Loads a VI and runs it. The CBR will not return until the called VI is complete. Bottom: Run VI Invoke Node - Loads a VI and runs it. If you wire FALSE to the Wait Until Done input, the VI runs asynchronously. If you wire a TRUE to the Wait Until Done input, the invoke node will not return until the VI is complete. You do not have a direct way of getting the results once the VI is complete.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.