02-23-2016 01:10 PM
I would like to find any VI clones that are in memory, but the App property App.AllVIs doesn't show any clones.
How can I get those?
02-23-2016 01:14 PM
You should give Kudos to this idea.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-23-2016 01:24 PM
So the answer is that it is not possible.
02-23-2016 01:47 PM
Someone else here might know a workaround
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-24-2016 03:31 AM
Recent versions of LV shows clones under the view>>relationships menu option.
Assuming you want something programmatic, I don't think there's an option. If you go over to the LAVA code repository and find the VI task manager, I believe that does find clones, but I believe it iterates through possible clone names to check if they exist, rather than just getting a list.
02-24-2016 10:41 AM
Yes, we want to programatically kill "zombie" clones.
We used to iterate over names too because in the past they were like MyVI.vi:1 MyVI.vi:2 etc, but now, for some unknown reason the numbers are in the 6 millions, e.g. MyVI.vi:6620001 so iteration is not feasable 🙂
02-29-2016 11:28 AM
I think the numbering scheme changed in some version of LabVIEW (2013?). There is a vi.lib function buried which find the next available clone number. Using this you can try to subtract say 1000, and add 1000 and use that as your range of possible clone numbers. I believe the VI Task Manager uses this function internally.
But a better solution I think might be to have these zombies kill themselves. A reference created in a VI will become invalid if that VI goes Idle. So you can try to say create a queue reference, and pass that into the clones. Then in a timeout of something long like 5 seconds, have them check to see if that reference is still valid. If it isn't then that clone should kill itself. A functional global could also hold some kind of reference as long as it is created in the main VI.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-29-2016 11:38 AM
Thanks! This should help.
02-29-2016 01:50 PM
The clone number VI was posted here by AQ.