ElmoMC Multi-Axis Motion Controller-Maestro User Manual
Page 180

10.4.2.3
Features of Interpolated Position Operating Mode
Using for Group (Vector)
Interpolated position motion for Group (Vector) DS402 can be implemented by the
following command sequence:
#define ip_time 10
int g_nStatus, g_nPointX, g_nPointY
function run()
//global variable definition
global int g_nStatus, g_nPointX, g_nPointY
sync( 0,
ip_time
)
//work with DS402 motion object required sync mechanism
g1.opm=7
//select operation mode for group g1
g_nStatus=0
//global variable initialization
g_nPointX=0
g_nPointY=0
g1.amc=1
//motion callback mechanism ON
g1.prv=15000
//set profile velocity
g1.pac=10000000
//define acceleration
g1.pdc=10000000
//define deceleration
g1.qsdc=10000000
//define quick stop deceleration
g1.psw=100
//define position windows
g1.pswt=2
//define position windows time
g1.mo=1
//motor on command
g1.iptp=
ip_time
//interpolation period – must be equal to sync period
g1.ipqr=1
//IP queue reset with last point automatically sending
//in case of empty queue
a1.ipqp= g_nPointX
//push position to IP queue
a2.ipqp= g_nPointY
//push position to IP queue
g1.ipa=1
//IP
mode
activation
while (g_nStatus == 0 )
a1.ipqp = g_nPointX
//push position to IP queue of Axis a1
a2.ipqp = g_nPointY
//push position to IP queue of Axis a2
end while
g1.mo=0
//motor off command
end function
// motion completed callback
function @motioncompleted(int busId, int objId)
global int g_nStatus
g_nStatus = objId
//global variable value changing
end function
Each axis entering into a Group (Vector) has an independent interpolation queue.
There are two ways to use the queue configuration:
• If the last point is automatically sent, then there should be at least one
point in the queue before motion starts.
Maestro
Software Manual
DS402 Command Reference
MAN-MASSW (Ver. Q)
10-35