AnsweredAssumed Answered

vrf Suggestions and observations on "LOCAL to library" discussions

Question asked by ramarquardt on Aug 22, 2001

Kjeld Alexander brought up some difficulties with calling functions
when duplicate libraries are used with different names which results
in a call to the right function but the wrong library. The solution also
being a problem in that the library needs to specifiy itself in calls it
makes to itself (e.g. a call to reset the instrument).

We solved this a few years ago [I believe I posted it here once before]
by having a function to load the libraries then call a setup() function
that library passing the internal library name which is then stored in a
'Local To Library' variable. Then in any library function which calls
another function within that library a formula is used to append the
function name to the library name then passed to the "function name"
control input to a library 'CALL' box.

This greatly simplified our drivers because we not only could have
multiple instances of the same driver but could have drivers for different
devices (e.g. VXI switch cards) which had all the same function names.

We just started using VEE 6.0 PRO and it seems that this problem may be
going away [I haven't had time to experiment yet]. While doing some
troubleshooting 2 weeks ago, it appeared that a library call made within
the library would first attempt to use a function within itself before
the search for the first instance of the function within the rest of the


Rob Marquardt
System Test Engineering
Rockwell Automation / Allen-Bradley
1201 So. 2nd Street
Milwaukee, Wisconsin, 53204-2496, USA
414-382-3098 Phone
414-382-4820 FAX

"Kjeld Alexander" <> on
08/23/2001 05:36:08 AM

Sent by:


Subject:  vrf LOCAL TO LIBRARY

Hi again

Maybe I need to describe the program i'am working  on, to illustrat the

The programcontrol 5  instruments.

1 HP6622A Power supply

4 FLUKE8840A Multimeter

I've made my own driver for the above mentioned  instrument , for many
One of the design idea is that is has to  beflexible and reuserable . (
more than one instrument of same model

Dealing with 4 instrument of the same model was not  a problem, I assumed.
Just import the driver for the Multimeter into four  different Library's,
named according to the measurement it perform.
Neat, just one version of the driver Fluke8840a for  all projects.

If you specifi the library like  this: Fluke8840aSupplyVoltage
Then a call made from within the library, to a  LOCAL function that reset
the FLUKE8840A could look like this :  Fluke8840aSupplyVoltage.reset
Lets assume that 200 LOCAL calls of different  nature, are being made from
the library, all of the calls looks like this

What if you want to change the name of the library  or reuse it later on
formeasuring Amps.  Fluke8840aSupplyCurrent.xxxxxxx
As I understand one would change the name of all  200 calls every time you
change or reuse.
Result is many versions of the driver that need to  be maintained, and all
versions do the same job thing.

This is not just inflexible with instrument, but in  general.

Kjeld Alexander

This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "".  Subscriptions and
unsubscriptions are done through the address "".
If you need details, just send a message containing the text "help"
to "".