ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
04-11-2006 05:07 PM
04-11-2006 07:45 PM
Before we go to far...
Is the calling convention the same for all of the dll's?
If they were you MAY be able to do this with LV scripting but that is not supported even if it was.
The LabVIEW way of doing this is to have a unique "wrapper" VI for each dll and then load the appropriate wrapper VI when it is time to do the dynamic call.
If all of your wrapper VI's have a common icon layout (LV equivelent of a a calling convention) then a "call by reference" node can be used to do the calling as required.
Ben
04-11-2006 09:58 PM
Additionally, LabVIEW R&D has received this feature request before (the ability to dynamically assign the DLL called by a Call Library Node), so you may see it in a future LabVIEW version.
-D
04-12-2006 12:40 AM - edited 04-12-2006 12:40 AM
As Ben has pointed out LabVIEW scripting may be a possibility but you are going with that in highly unsupported area. Also I happen to know that changing the library name of a Call Library Node through scripting has produced unsupported feature errors previous to LabVIEW 7.1 eventhough the method was there. And LabVIEW 8 hides the whole scripting business behind the license manager.
@John Stuart wrote:Our current model is to use dll files as "plug-in" modules for instruments and a top layer test step calls the appropriate driver dll.For instancethe TestStep is called with the kenmore.dll passed as a parameter so the kenmore.dll file is loaded, the functions are registered and the functions are called. Next the TestStep is called with whirlpool.dll as a parameter now the whirlpool.dll is loaded the functions are registered and the functions are called. This works very well in our current CVI/LabWindows environment. Now we plan to work with LabView, we wish to retain this model (as DLL files, there are advantages in our model for us). We have not found a way to load these dll files from LabView without hard coding the path and filenames in.Any suggestions on how to dynamically change the path in the Call Library module, or another suggested method of loading the dll via LabView?Thanks,
Message Edited by rolfk on 04-12-2006 07:40 AM
04-12-2006 03:40 AM