Popular Post DTaylor Posted March 16, 2017 Popular Post Report Share Posted March 16, 2017 (edited) I've developed a few experimental XNodes to assist with running VIs asynchronously. The ones pictured here are LV-Async.xnode and LV-Await.xnode. You can drag a VI onto LV-Async. It will open or check out (more on this later) a VI reference with code x100. LV-Await.xnode will Wait on Asynchronous Call, but instead of closing the reference it will check it in to a lookup table to be later used by LV-Async.xnode. The benefit of this is that when used with a reentrant VI, the asynchronous hierarchy will not go idle, so reference types created in the hierarchy will not go bad. There is an example in the VI package that demonstrates this behavior. The downside is that the memory the hierarchy uses does not get freed (subsequent async/await calls do not leak memory though since the hierarchy is being reused). LV-Async-And-Forget.xnode opens the VI reference with code x80 and closes it after running the VI asynchronously. LV-Async-Or-Show.xnode is meant for non-reentrant UI VIs. If the VI's front panel is not open, it will run the VI with option x80. If the front panel is open, it will bring the front panel to the front. Attached is a VI package that will add these nodes to your palettes, along with a couple package dependencies. Source code for LV-Async is here: https://github.com/erdosmiller/lv-async LV-Async requires LabVIEW 2015 or later. Let me know what you think! lv_async-1.0.0.12.vip lv_scripting-0.7.0.6.vip lv_vi-0.0.0.5.vip Edited March 16, 2017 by DTaylor 6 Quote Link to comment
infinitenothing Posted March 16, 2017 Report Share Posted March 16, 2017 Looks like it could be a good solution for these ideas: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Integrate-Start-Asynchronous-Call-with-Static-VI-Reference/idi-p/3307187 http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-Asynchronous-Call-By-Reference-with-Strict-Static-VI/idi-p/1662372 Quote Link to comment
DTaylor Posted July 19, 2017 Author Report Share Posted July 19, 2017 I have a (small) update to these nodes since I learned about the RunTimeDoubleClick ability. They now open the target VI at run time as well. Async-Or-Show from this package has become one of my favorite things for non-reentrant UI VIs (runs the VI if its front panel isn't open, makes the target's front panel frontmost if it is open): https://github.com/erdosmiller/lv-async lv_async-1.1.0.4.vip lv_scripting-0.10.0.1.vip lv_vi-0.0.0.5.vip 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.