Log in

View Full Version : Library Access Scope Problems


CVassos
24-01-2009, 19:14
For controlling our robot I created my own subvi for controlling the drive. Within it I use the get pwm ref vi's. When I opened all of the motors and servos I'm using for the drive, I created a subvi to house all of them to keep the main clean and associate them all under the robotdriveref cluster. The drive vi I made is now non-executable. I get the error message "This VI cannot access the referenced item because of library access scope. Private library items can only be accessed from inside the same library or libraries contained in that library. Protected library items can only be created inside LabVIEW classes and can only be accessed from inside the same LabVIEW class or LabVIEW classes inheriting from that class." My programming mentor is no more familiar with LabVIEW than I am. Is there any way to get around this? I use the basic framework by the way.

CVassos
24-01-2009, 20:21
Nevermind. I got it to work by including the drive vi in the wpi library.

Greg McKaskle
25-01-2009, 11:12
Glad to see you got it working. That error message is a bit advanced and hard to understand.

What it is saying is that the person who wrote the PWM library didn't expect you to use some of the VIs you were trying to use. So as you dug around and copied and pasted, you copied some of the internals.

You may wonder why anything is protected like this, and again, it is kind of advanced. In some ways it would be easier to keep everything open. But what would happen is that when the author of PWM wanted to change something, they would break lots of people's code. By telling you to use things like Drive, they can make sure that keeps working while being able to add features or improve things internally.

Greg McKaskle