From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does private access scope manifest itself?

Solved!
Go to solution

Hi,

 

I am in the process of converting an old project to use Project Libraries (*.lvlib). I have read and watched all the tutorials, LV Help sections, etc. I understand the benefits of using project libraries. But, I still do not understand how access to VIs is restricted after setting their scope to private. For example, I can create a new VI, outside the project library, then "Select a VI" to place on the block diagram, using a subVI with private access from a project library. And I can can run this test VI without any apparent problem.

 

So, I seem to be able to access a 'private' VI. How and where is the access restricted for a VI with private scope?

 

Thanks,

 

RonC

0 Kudos
Message 1 of 3
(2,499 Views)
Solution
Accepted by topic author RonC

RonC,

 

A VI that is marked "private" in a library should definitely not be accessible in VIs outside of that library, so the behavior you describe sounds strange.  Could you attach a simple example that demostrates what you're seeing?  Also, which version of LabVIEW are you using?

 

Chris M

0 Kudos
Message 2 of 3
(2,482 Views)

Hi Chris,

 

No example required...I can explain.      Smiley Embarassed

 

You know, after trying and trying to sort this out myself, and not being able to, I knew that when I asked, it would turn out to be something stupid. Here is what happened...

 

I was using the "Data Acquisition Reference Design" project example as a reference to sort this out. I think this is an excellent one. I looked at the Configuration module and Display module sub-libraries, and the scope is just as described in the tutorials; i.e. the API VIs marked Public and the subVIs marked Private.

 

Then, for my little example VI, I used a "Private" subVI from the Logging module, because it did not require any other resources to run, it just checked the root directory.  It worked fine, and hence my confusion. But, after you told me that should not work, I looked again, and out of the four sub-libraries used in the example, two (the two I looked at) have the access set as described, but the other two do not -- everything is Public. And, of course I used one of the public ones.

 

I just tried again, using a "Private" subVI from the Display module, and although I can see it and place it on my block diagram, my calling VI is broken, the reason given is because of the private scope.

 

Doh! I have only been doing this for 22 years, so not yet long enough to avoid the dumb mistakes I guess.

 

Thanks for setting me straight.

 

RonC

 

P.S. I am using LV 2010 SP1

0 Kudos
Message 3 of 3
(2,479 Views)