04-04-2016 12:18 PM - last edited on 01-04-2025 02:18 PM by Content Cleaner
Hello,
I have a SMC100 series motion controller and I don't find the way to interface it with Labwindows CVI. I have only the Newport.SMC100.CommandInterface.dll but I don't know how to use it in Labwindows.
I found examples for Python and LabView but not in Labwindows. Doe anyone know how use the dll in Labwindows and call the functions?
I have already try this way but it does not work.
Thanks in advance
04-04-2016 05:34 PM - edited 04-04-2016 05:36 PM
Well, as explained in the document you link, you must have the include file, the .lib file and the .dll: with these three elements you should be able to establish the communication. I suggest you initially put the .dll in the project folder, so that you are sure it is found by the system; the .h file must be #included in the code and the .lib must be added to the project.
With these elements you should be able to succesfully compile and execute a simple program that simply issues a OpenInstrument () and CloseInstrument (): no errors should be returned from the functions.
Have you tried this? Have you found problems or errors in any of these steps?
04-05-2016 02:59 AM - last edited on 01-04-2025 02:18 PM by Content Cleaner
Thanks for your reply. I would like include the .lib in my project but I don't have it, I only have the .dll (ftp://download.newport.com/MotionControl/Current/MotionControllers/SMC100/Software/ ) (.NET Assembly)
Does exist another way to include and use this dll on my project??
Thanks
04-05-2016 03:12 AM - last edited on 01-04-2025 02:20 PM by Content Cleaner
What I told before was referenced to traditional .dlls. Since this is a .net assembly I suggest you carefully study the possibilities offered by CVI on this subject. You can start reading this document: .NET Library Overview
The first step appears the creation of the controller out of the assembly: if the assembly is correctly registered in the system you should be able to locate it in the list exposed by the tool (e.g. if you are able to communicate with the device using Newport utilites)
04-05-2016 07:24 AM - last edited on 01-04-2025 02:21 PM by Content Cleaner
Hello,
Because you don't have the .lib file and the header file only the .dll to interact with the SMC100 motion controller
I suggest you to use the explicit linking (cf : http://www.ni.com/tutorial/8503/en/ ).
Before trying to resolve if the problem is linked with your .dll in .NET, we should first know if you are able to integrate a dll in LabWindows/CVI so please go to http://www.ni.com/example/31151/en/ download calling_dll_from_cvi.zip and try the Explicit Linking process all the code is above at http://www.ni.com/tutorial/8503/en/ .
I wait for you
Bye
04-11-2016 02:37 AM
Thanks for reply and your help. I successed to implement the .NET Assembly in my program.
04-11-2016 04:08 AM
Hello choa974,
Can you explain what excatly you did, a resume of your troubleshooting, that will help me if this problem occurs again.