Re: If i use a sub-vi 3 times simultaneously in my main program....
if i make my sub vi's as reentrant, do I lose any process speed, in other words are there any limitation for using the reentrant execution? and thanks for your reply.
Re: If i use a sub-vi 3 times simultaneously in my main program....
My NO was to Mudda Q. I am the same page as Ed. Ben
Re: If i use a sub-vi 3 times simultaneously in my main program....
If the subvi does not contain data that are dependent on a previous run , such as local variable or shift register data, then there is no need to make the vi reentrant.
Re: If i use a sub-vi 3 times simultaneously in my main program....
No! You may pick some up. What you will loose is debugging. The main gotcha is the seperate memory space issue mentioned earlier. This means that if your sub-VI's use local storage (like shift register that store results from the last call for use in the next) are distict for each occurence of the sub-VI in a diagram. Also, if your sub-VI use larege amounts of memory the use will be duplicated between each instance. Ben
Re: If i use a sub-vi 3 times simultaneously in my main program....
As far as I know, making a subvi reentrant would have no performance difference over having multiple VIs with different names. Maybe an app eng could verify this. Each time a reentrant VI is called from a new location in the code, it creates a separate area for it in LabVIEWs dataspace, the same as calling a new subvi would do. Ed
Re: If i use a sub-vi 3 times simultaneously in my main program....
If the sub-VI is CPU intensive, and you do not want one call of the sub-VI to delay another call to the sub-VI Then re-entrancy is very useful. Ben
Re: If i use a sub-vi 3 times simultaneously in my main program....
In principle, Yes, However, how much true that is depends on how LabView (R/D)developers are implementing it, and things have been changing between LabView versions, to different degrees, all the time.
Re: If i use a sub-vi 3 times simultaneously in my main program....
Yes sir! From what I have read about LV 7.X and hyperthreading, two of these re-entrant sub-VI's can be executing simultaneously without having to resort to dual-proccessors. Ben
Re: If i use a sub-vi 3 times simultaneously in my main program....
Thanks to all of you for your comments, Mudda.
If i use a sub-vi 3 times simultaneously in my main program....
If i use a sub-vi 3 times simultaneously in my main program. Do i need to create that many of those sub-vi's and the VI's inside the that sub-VI. In my main VI, I am calling a sub vi to do math on the data. I am doing this process simulataneously on the data collected from three channels. I created three sub vi's with same functionality but with different names so that they can be called separetly at the same time. My question is do I also need to create that many copies of the sub-vi's which I am calling inside the Sub-VI used to do math on the data collected from channels?
Re: If i use a sub-vi 3 times simultaneously in my main program....
Simple answer is yes, you would need copies of the subvis also. LabVIEW can only have one copy of a certain named VI in memory at a time. Unless... You make the VI Reentrant. Setting a VI to reentrant causes LabVIEW to open each instance of the VI in it's own data space, so it acts the same as having differently named VI that are the same. You set this by going into the VI properties, select the Execution catagory and checking the Reentrant Execution checkbox. You wold also need to do this on any subvis you want to run as separate copies. The propertiy is not inherited.