07-28-2013 03:24 AM
Hi all,
Is there any example to drive Aerotech's Soloist CP motor in CVI? I found a labview code for Soloist CP in the installation directory. I used that with labview before but now I am porting lal code to CVI, I have no idea how to make it work in CVI.
07-28-2013 10:06 AM
If you already know and have used the LabVIEW driver, probably the easiest and fastest solution is to build a DLL out of the LabVIEW driver and use it in your CVI application. See this knowledgebase entry for a reference, look also at the linked documents and references. There are also several other documents that you may search for in NI support site.
07-29-2013 02:08 AM
@RobertoBozzolo wrote:
If you already know and have used the LabVIEW driver, probably the easiest and fastest solution is to build a DLL out of the LabVIEW driver and use it in your CVI application. See this knowledgebase entry for a reference, look also at the linked documents and references. There are also several other documents that you may search for in NI support site.
Thanks for your suggestion. I will try.
I have one more question. I find the C++ example enclosed with the distribution of soloist driver come with a DLL. I am not familiar with DLL, will it be something called C++ DLL or C DLL? if the DLL was generated by the c++ code, is that possible to load and call that DLL in Labview CVI (I am using CVI IDE only, I don't have MSVC or other c++ compiler).
07-29-2013 03:07 AM - edited 07-29-2013 03:08 AM
You need to study the documentation that comes with your device and the interfacing possibilities the device offers. If the driver comes with a DLL than you could try using DLL functions directly in CVI: this document offers some explanations on how to realize this part, in any case the DLL must come with some include file that declares functions and types to use. You can also search in the support site or in the forums for additional documents or examples.
The LabVIEW driver itself could be an interface to the DLL, so if you have some familiarity with LV you could try looking at the underlyning code to see what's in it.
Having said this, I have never used devices from that producers so I cannot be of much help in using them.
07-31-2013 12:13 AM - edited 07-31-2013 12:21 AM
@RobertoBozzolo wrote:
You need to study the documentation that comes with your device and the interfacing possibilities the device offers. If the driver comes with a DLL than you could try using DLL functions directly in CVI: this document offers some explanations on how to realize this part, in any case the DLL must come with some include file that declares functions and types to use. You can also search in the support site or in the forums for additional documents or examples.
The LabVIEW driver itself could be an interface to the DLL, so if you have some familiarity with LV you could try looking at the underlyning code to see what's in it.
Having said this, I have never used devices from that producers so I cannot be of much help in using them.
Hi RobertoBozzolo,
With your suggestion, I've compiled the vi to DLL. For testing, I write a code in c to call it and compile with gcc mingw32. It seems ok. But in the environment of labwindows/CVI, I don't have other compiler other than CVI. So following this post http://digital.ni.com/public.nsf/allkb/70995EC2CA1B523386256DD4004F3DE6?OpenDocument, I have the DLL and the related header files copied to the same folder as the CVI program in. I should state that the DLL from Vi was compiled in other computer have labview 7.1 installed, it is running 32bits windows xp. But in the development environment (where I compiled the CVI), I am runing 2012 version in 64bit operating system. I don't know will that cause any conflict. But as directed in that page, I copy all headers in cintools from the LV7.1 computer, but when I compile it, it is said that " "fundtypes.h"(116,20) Redeclaration of 'int64'." I have no idea how to fix this issue then 😞
Well, anyway, I comment out the definition of int64 in fundtypes.h and it finally compiled. However, since the DLL was compiled from LV7.1, when I run the compiled application with functions calling from the DLL, I got an error message that labview 7.1 runtimes required. Well, it is not a good idea to ask the client to install LV7.1 (runtime) just for running our application. So is that possible to compile the DLL and linking everything into the DLL so it doesn't require runtime 7.1? or any other suggestion?
07-31-2013 01:41 PM
Can you try to convert the 7.1 VI code to the version of LabVIEW that you need? You can ask this forum to do it for you as well.
07-31-2013 05:17 PM
@Edna,
dragondriver is looking for a driver for CVI. Existing LabVIEW code is thr only available on th eProducer site, so he's trying to leverge on that.
@dragondriver
Have you tried looking inside the LV code?
Alternatively, in Aerotech site a C library is mentioned (e.g. here and here😞 did you look fot that?
07-31-2013 05:55 PM
@RobertoBozzolo wrote:
dragondriver is looking for a driver for CVI. Existing LabVIEW code is thr only available on th eProducer site, so he's trying to leverge on that.
Have you tried looking inside the LV code?
Alternatively, in Aerotech site a C library is mentioned (e.g. here and here😞 did you look fot that?
Hi RobertoBozzolo,
In side the vi code, it actually wrap .NET dll functions to vi, so the base of the vi is .NET DLL, no DAQ needed. That code (from manufacture) has 3 versions: LV7, LV7.1 and LV8, but I don't know why if I open it with 2012, it doesn't work.
08-01-2013 10:42 AM
You can post your VIs in this forum page and they will convert it for you to the new version.
08-02-2013 03:36 AM
@Edna-S wrote:
You can post your VIs in this forum page and they will convert it for you to the new version.
Thanks. I have the code converted for LV2012 but it doesn't run due to too many error found. Anyway, I finally install the LV7.1 runtime and get the DLL loaded in CVI. But when I round the code, it crashes. It is not easy to get the DLL run, I can't tell why 😞