LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making a VI run with a subroutine priority

I was told to make a VI run with subroutine priority. As soon as I did that (that was the easy part) a number of errors emerged and the VI got broken. Here are the errors;
    SubVI 'GLOB-Tests-UUTInfoList.vi': subroutine priority VI cannot contain an asynchronous node
This VI has subroutine priority selected in VI Properties»Execution. It may not use an asynchronous node on its block diagram. Asynchronous nodes allow other VIs to execute in parallel, which a subroutine should not do.
    SubVI 'GLOB-Tests-UUTInfoList.vi': subroutine priority VI cannot call a non-subroutine priority subVI
This VI has subroutine priority selected in VI Properties»Execution. It may not use a subVI that does not have subroutine priority.
    SubVI 'GLOB-Tests-UUTInfoList.vi': subroutine priority VI cannot contain an asynchronous node
This VI has subroutine priority selected in VI Properties»Execution. It may not use an asynchronous node on its block diagram. Asynchronous nodes allow other VIs to execute in parallel, which a subroutine should not do.
    SubVI 'GLOB-Tests-UUTInfoList.vi': subroutine priority VI cannot call a non-subroutine priority subVI
This VI has subroutine priority selected in VI Properties»Execution. It may not use a subVI that does not have subroutine priority.
    For Loop: subroutine priority VI cannot contain an asynchronous node
This VI has subroutine priority selected in VI Properties»Execution. It may not use an asynchronous node on its block diagram. Asynchronous nodes allow other VIs to execute in parallel, which a subroutine should not do.
    SubVI 'PUME-TestModules-RemoveSpaces.vi': subroutine priority VI cannot contain an asynchronous node
This VI has subroutine priority selected in VI Properties»Execution. It may not use an asynchronous node on its block diagram. Asynchronous nodes allow other VIs to execute in parallel, which a subroutine should not do.
    SubVI 'PUME-TestModules-RemoveSpaces.vi': subroutine priority VI cannot call a non-subroutine priority subVI
This VI has subroutine priority selected in VI Properties»Execution. It may not use a subVI that does not have subroutine priority.

Any suggestion? And if I make those sub-VI's run with subroutine priority (as the error window suggests) then does that mean that I'll have to repeat the same process with any sub-vi's that these sub-vi's contain? And what are asynchronous nodes? If they are not allowed in above case, what may they be replaced with?


Message Edited by rashid19672008 on 05-13-2008 05:40 PM
0 Kudos
Message 1 of 5
(3,512 Views)
Hi rashid,

it's all in the error massages:
"subroutine priority VI cannot contain an asynchronous node" and "subroutine priority VI cannot call a non-subroutine priority subVI"!!!

Don't use asynchron nodes (wait functions...) and non-subroutine nodes (any non-subroutine sub-vis...) in your subroutine-vi!
A standard vi may contain subroutine-vis, but a subroutine vi cannot call non-subroutine vis! Standard-execution-mode vis will not show an error message here...

Subroutine vis should not take long time to execute, so remove any delaying functions (wait; asynchronous VISA calls ?). A subroutine is (mainly) used to allow faster data handling as values are handed over by pointer instead of (usual) "call by value" behaviour...


Message Edited by GerdW on 05-13-2008 02:48 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(3,506 Views)
Well it looks like Gerd was expanding on his reply while I was outside inspeting the mods my Kneedragger made to his ride.
 
This is what I was going to add but now is redundent.
 
"asyncronous nodes" are nodes who's execution time is not bounded. I/O (file DAQ, comm) are examples whos execution time are dependent on factors outside the CPU.
 
Sub-routine VI's are generally number crunching functions that only depend on the CPU.
 
Ben


Message Edited by Ben on 05-13-2008 07:53 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 5
(3,499 Views)
Wow! I am feeling dizzy from al that information that you (GerdW) gave in reply. It made me realize that there is so much I don't know about LabVIEW (thanks god you guys are here for support). Now that definitely was an uncharted territory for me. Thanks again. I'll bother you again when I've digested this new information (and when I try to make the amendments to the VI's so that they become subroutines).
Thanks for being there when help is needed (a friend in need is a friend indeed; but you are no friends for I consider you guys as my guru's).
Have a very nice day!
0 Kudos
Message 4 of 5
(3,488 Views)
Thanks Ben for the help (and info)!
0 Kudos
Message 5 of 5
(3,484 Views)