Matlab API

The RoboDK API for Matlab is available in the RoboDK install folder with some examples (C:/RoboDK/Matlab/). The RoboDK API for Matlab is provided as a group of m files.

Matlab is a proprietary programming language developed by MathWorks. Among other things, MATLAB allows matrix manipulations, plotting of functions and data and implementation of algorithms.

The main section of this document explains the advantages of using the RoboDK API with a widely used programming language such as Matlab for robot programming.

The RoboDK API for Matlab includes:

Robolink.m is a class that interfaces with RoboDK. Any object in the RoboDK Station Tree can be retrieved using the Robolink object and it is represented by the RobolinkItem object (same as Python’s Robolink class).

RobolinkItem.m is a class that represents a RoboDK item in the Station Tree. It is possible to perform different operations on that item (same as Python’s Robolink.Item class).

transl.m, rotx.m, roty.m and rotz.m are functions that create pose matrices given an XYZ translation vector or rotations along a specific axis.

Pose_2_XYZRPW.m an XYZRPW_2_Pose.m allow converting poses to XYZ position and RPW Euler angles and vice versa. More information in the Reference Frames section.

Sample code is available in the following page:       
https://robodk.com/Matlab-API

Simulink Example

A Simulink project is available as an example. In the simulation, the robot is moved along a set of XYZ coordinates generated arbitrarily.

The following video shows the result of running the simulation:       
https://www.youtube.com/watch?v=7DDBMwa0-Oc

RoboDK API - Image 21