Jump to content

Need Robotic Arm External Code Help


PhattieM

Recommended Posts

Hello Forum,

My research team is working with a robotic arm that provided defunct datasheets and API information. It is our goal to communicate with this robot through LV by importing a .dll file. However, this option is proving difficult because the only information provided was header files and static libraries, no .dll, and no proper method for making one. We attempted to create a wrapper class that would include the .h files, link the static library, and call the functinos directly but we are not Visual Studio saavy enough to determine if this method will work. Does anyone have any input, or a possible methods by which to do this?

Also, after performing the above method we came across some documentation that said the robotic arm could be controlled through Python. Does Labview provide a way to externally call Python code? If so it may be worth learning Python to get this thing working.

Thanks in advance,

Mark

Link to comment

QUOTE (PhattieM @ Jun 12 2008, 11:02 AM)

Hello Forum,

My research team is working with a robotic arm that provided defunct datasheets and API information. It is our goal to communicate with this robot through LV by importing a .dll file. However, this option is proving difficult because the only information provided was header files and static libraries, no .dll, and no proper method for making one. We attempted to create a wrapper class that would include the .h files, link the static library, and call the functinos directly but we are not Visual Studio saavy enough to determine if this method will work. Does anyone have any input, or a possible methods by which to do this?

Also, after performing the above method we came across some documentation that said the robotic arm could be controlled through Python. Does Labview provide a way to externally call Python code? If so it may be worth learning Python to get this thing working.

This should be fairly simple. For every function in the object library that you want to be available in LabVIEW through a Call Library Node you would have to write a small wrapper.

Something like this:

Original function as exported from the lib:

int MyFunction(int param1, int param2);

Your new function:

__declspec(dllexport) int LV_Myfunction(int param1, int param2)

{

return MyFunction(param1, param2);

}

Then compile it into a DLL, linking this with your object library.

Possibly you could maybe suffice with a modified header file in a DLL project without any other source files where you add the __declspec(dllexport) in front of each function and simply link in the object library but I never tried that.

If you want to persuade the Python solution you could look at LabPython. It is on sourceforge.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.