DynamixelSDK Library for MATLAB/Simulink

Use the following template to help create your post:

  1. What model(s) of servo are you using?

AX-12a and AX-18a

  1. Describe your control environment. Include the controller or interface, operating system (and version #) of your computer, and how you are powering your robot.

Using a U2D2 with the U2D2 Power Hub in Windows 10 version 21H2 (19044.1706) and MATLAB 2022a with Simulink version 10.5 (R2022a)

  1. For programming posts, state any libraries or example code you are using. For software posts, be clear about which version of software! R+ Task 3.0, R+ Task 2.0, and RoboPlus Task (“1.0”) can have very different troubleshooting steps, as just one example.

Using DynamixelSDK version 3.7.51 from GitHub

  1. Remember to mark your post Solved when applicable!

Hi everyone,
I have been working with Dynamixel Servos for a while, but recently, I want to use the SDK in Simulink. As far as I know, there is not an official version which works in Simulink, so surfing a little on the Web, I found this solution:

Dynamixel Simulink Library

I can run servos with this solution, but I got curious if I could use the headers and libraries from the SDK to make blocks using those files. Simulink has that ability in a block called C Caller, also, it has an application called Code Importer which can make blocks using the headers and libraries. It has a Wizard to make this process easier, in a way similar if you are setting up the SDK for LabVIEW.

So, i began to try it, and i can get to make the library to work with almost all of the functions in the SDK, as you can see here:

I’m using this setup to make the custom blocks from the Wizard:

Basically, I’m using the x86 libraries and the header, because if I use the x64 libraries, the wizard cant make the blocks.

I even trying to recreate the examples from LabVIEW into Simulink, like the Ping example:

But, as soon I want to execute the program, I receive this error:

I kind of stuck at the moment, so thats why Im asking for some advice.
Thanks in advance.