01-15-2015 04:15 PM
I have a labVIEW VI that I would like to use in programs writen in either Matlab or C.
the ideal for me would be if I could just write something like
a = VI(argument1, argument2);
in my C/Matlab code.
I know there is a way of doing it, but I can't find a step by step guide writen for someone like me who knows nothing about activeX and DLLs.
Does anybody knows something like that?
thanks!
01-15-2015 09:10 PM
01-17-2015 10:06 AM
thanks a lot!
I'll read about dll and try the example out.
01-19-2015 06:37 AM - edited 01-19-2015 06:39 AM
@mikeporter wrote:
The only strange thing I have encountered is that sometimes a DLL you create in LV will work fine when called from an external language, but dies if run from LV! Very strange.
Mike...
Then you probably got something wrong with the configuration in your Call Library Node.
Or were using a very old LabVIEW version. The first one or two versions that could create DLLs from VI code, didn't handle the case gracefully where LabVIEW was calling into a LabVIEW DLL.
01-20-2015 07:38 AM
Another option, less elegant but probably easier to implement, is to create an executable from the VI and to call the executable from a line command with arguments. I have used this approach to call a LabVIEW 32-bit function from a LabVIEW 64-bit application. The command-line argument can be accessed through the property node (without reference) in the main VI -> Application -> Command line arguments.