0

I'm trying to make a Servo Motor work with very simple code in C#. The company that built the Servo is called TEKNIC, and the motor that I'm trying to move is the ClearPath-SC-Series.

That company offers a software download called ClearView and contains a lot of sample code to be used in C++, also, they create a DLL file with a ton of Classes, Methods, Codes and so on, that you can use to import into your own code. However, these DLL was built in C++ as well.

Om my C# application I'm trying to use P/Invoke to access that DLL but without success. Can someone please help me? I am using System.Runtime.InteropServices

Here is where I'm calling the DLL

[DllImport("C:\\Program Files(x86)\\Teknic\\ClearView\\sdk\\lib\\win\\Release\\x64\\MNuserDriver20.dll", EntryPoint = "SysManager")]

I'm not sure what would be the next steps

Link for Teknic Software

Filburt
  • 17,626
  • 12
  • 64
  • 115
  • This [answer](http://stackoverflow.com/a/5704843/205233) mentions a tool to help you generate P/Invoke calls - didn't try myself, but might be worth a look. – Filburt Mar 01 '17 at 16:47

1 Answers1

4

I'm an applications engineer with Teknic and I came across your post. I know this is a few months late, but I wanted to respond in case you or others still have questions about this.

Teknic now includes C# example projects included in the sdk installed with the ClearView software.

The ClearView software is a free download from Teknic's website(https://www.teknic.com/downloads/). The C # examples are installed to this file location: C:\Program Files (x86)\Teknic\ClearView\sdk\CSharp Examples

These examples were built and tested with Microsoft Visual Studio 2015, which is a free download(https://www.visualstudio.com/vs/older-downloads/). Using other versions of Visual Studio may cause the projects to load incorrectly, so we recommend using the 2015 version.

For any technical questions regarding these examples, please email us at support@teknic.com

Thank you, Brendan

Brendan
  • 41
  • 2