ElmoMC Multi-Axis Motion Controller-Maestro Motion Control User Manual

Page 10

Advertising
background image

Maestro Motion Library Tutorial

MAN-INTUG (Ver. 1.7)

7

Figure 1-2: Resources for the 3D vector

Example (Motion Mathematic Lib Samples\ Vector_3D \ Spline_3D – www.elmomc.com)

A spline curve throws a number of arbitrary points

SetAxisStartPos(a1, 0) //set coordinate x to 0

SetAxisStartPos(a2, 0) //set coordinate y to 0

SetAxisStartPos(a3, 0) //set coordinate y to 0

v2.vsp = 50000

v2.vse=0

v2.splines() // start spline sequence

v2.splinep(0, 0, 0) // add spline 3D point

v2.splinep(50000, 100000, 150000) // add spline 3D point

v2.splinep(100000, 50000, 100000) // add spline 3D point

v2.splinep(200000, 150000, 50000) //add spline 3D point

v2.splinee(0) // end spline sequence

Three-dimensional picture can be drawn in Matlab with the use of the following Matlab operators

[n, posX, velX, posY, velY, posZ, velZ, t] = textread('D:\Dir_22_01\trj_file', '%d %d %d %d %d
%d %d %d ', -1)
where 'D:\Dir_22_01\trj_file – full path to the PVT table file.

Advertising