LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programatically query number of running instances of re-entrant vi?

I have a re-entrant vi that I'm asynchronously launching multiple times (call and forget, options 80 and 40).

 

I want to know how many of them are running at any given time, is there a simple query for this? 

 

I thought if trying to use this and just sorting for the counts of the name of interest...

 

https://forums.ni.com/t5/Example-Code/Finding-Running-VIs/ta-p/3996230

 

Thanks

 

edit: actually looks like that example i linked to might work great if just edited to be a little simpler...

0 Kudos
Message 1 of 25
(2,683 Views)

VI I Linked to doesnt list duplicates for multiple instances so I've reverted to a more hacky way of getting the information I want, I would explain, but it's very app specific so I don't think it would be helpful - If I had to solve this right now another way I'd probably just have the re-entrant vi msg another process when it starts up and shuits down...

 

If anyone knows a simple way to do this though I'd love to know about it

0 Kudos
Message 2 of 25
(2,633 Views)

There is a private property:

nc.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 3 of 25
(2,617 Views)

snippet's not working for me in FF or IE- mind detailing where I can find this? (I was looking for class output from prop list but not sure if thats a poor assumption)  How do I even get to private properties? I searched in a regular node and didn't see it, google isn't much help seems to link to some .NET stuff...

 

thanks!

 

 

0 Kudos
Message 4 of 25
(2,587 Views)

I have a lot of extra things turned on in LV.  I think this property will become available of you place one of these in your labview.ini file:

    SuperPrivateScriptingFeatureVisible=True
    SuperPrivateSpecialStuff=TRUE
    SuperSecretPrivateSpecialStuff=True

 

Note: Private properties are unsupported by NI; and there is some risk in using them as they may be changed or removed in future versions of LV (although over the course of more than a decade, I haven't seen that happen yet).

"If you weren't supposed to push it, it wouldn't be a button."
Message 5 of 25
(2,559 Views)

I don't mind using private properties and methods in my utilities, but I am very reluctant to use them in released code.

"If you weren't supposed to push it, it wouldn't be a button."
Message 6 of 25
(2,556 Views)

>SuperSecretPrivateSpecialStuff=True

 

this is hilarious... can't help but wonder what other comical undocumented flagnames there are...

 

Thanks!

 

 

0 Kudos
Message 7 of 25
(2,553 Views)

Make sure this one is set to false

 

>DoubleSecretProbation = False

 

😀

 

mcduff

0 Kudos
Message 8 of 25
(2,523 Views)

@p27 wrote:

>SuperSecretPrivateSpecialStuff=True

 

this is hilarious... can't help but wonder what other comical undocumented flagnames there are...

 

Thanks!

 

 


Perhaps you'll find these entertaining:

EnableStrictTypedefConstantConfiguration
AdvancedPlotLegendMenu
enableSecretPopups
ActiveXMoreContainerOptions
SuperPrivateScriptingFeatureVisible
SuperPrivateSpecialStuff
SuperSecretPrivateSpecialStuff
SuperSecretListboxStuff
SuperSecretCLAFeatures
allowBrokenForeverAbsolution
funkyErrClustWire
showHiddenUserDefinedRefnumClasses
ShowHiddenLibraryItems

"If you weren't supposed to push it, it wouldn't be a button."
Message 9 of 25
(2,503 Views)

@paul_cardinale wrote:

There is a private property:

nc.png


I got 0 from that node, with several clones open... I don't think it does what we want it to do.

 

AFAIK, the only way to get\count clones is to generate the 'magic clone number' and add 'i' to it in a for loop, and try to open the reference... How long should we iterate? No idea. 100000 times is probably enough.

 

Sad, but true...

 

IIRC, the 'official' statement is that VI Server is not supported for clones...

Message 10 of 25
(2,487 Views)