B.8 etc, B.8.1 adddwell sample, B-29 – ElmoMC Multi-Axis Motion Controller-Maestro User Manual
Page 281

end
for
end function
B.8 Etc.
B.8.1
Adddwell Sample
Adddwell (Add Dwell) causes a pause at a specific point in a trajectory
function run()
InitAxis(a1)
InitAxis(a2)
sync(0, 10) //send a sync signal to CAN
//bus 0 every 10ms
homing(a1, 0)
//set coor. x to 0
homing(a2, 0)
//set coor. y to 0
setWorkMode()
drawTrj()
//wait until both axes have stopped
while
(a1.ms==2)||(a2.ms==2)
wait(10)
end
while
end function
function InitAxis(AXIS axis)
axis.rm = 0 //The reference is generated //by the interpreter command //or by the user program.
axis.mo
=
0
wait(10)
axis.sf = 0
axis.um = 5
axis.ll[2]
=
-833333
axis.hl[2] = 833333
axis.VH[2] = 750000
axis.VL[2]
=
-750000
axis.ll[3]
=
-1000000000
axis.hl[3] = 1000000000
axis.VL[3]
=
-999999990
axis.VH[3] = 999999990
end function
function setWorkMode()
v1.vum=1
//build trajectory in max. velocity mode
v1.vsc=3 //smoothed with fixed dist
from the corner
v1.vtm=1 //enable PVT motion
//
initialization
v1.vac = 28000000 //max acceleration
v1.vdc = 28000000 //max deceleration
end function
function homing(AXIS axis, int home_pos)
axis.px = home_pos
axis.mo
=
1
wait(10)
axis.pa = home_pos
axis.bg
end function
function drawTrj()
Maestro
Software Manual
Appendix B: Sample Programs
MAN-MASSW (Ver. Q)
B-29