LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SMC100 motion controller use with Labwindows CVI?

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.

https://www.ni.com/en/support/documentation/supplemental/09/calling-a-dll-in-labwindows--cvi---expli...

 

Thanks in advance 

 

 

0 Kudos
Message 1 of 7
(4,848 Views)

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?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 7
(4,832 Views)

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

 

 

0 Kudos
Message 3 of 7
(4,821 Views)

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)



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 7
(4,815 Views)

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

Message 5 of 7
(4,799 Views)

Thanks for reply and your help. I successed to implement the .NET Assembly in my program.

0 Kudos
Message 6 of 7
(4,679 Views)

Hello choa974,

Can you explain what excatly you did, a resume of your troubleshooting, that will help me if this problem occurs again.

 

0 Kudos
Message 7 of 7
(4,674 Views)