
B.8.4 Poin2Point
function run()
int count,position,multiply
count=0
position = 10000
multiply = 5
// TODO: Add your specialized code here...
InitAxis(a1)
InitAxis(a2)
sync(0, 10)
//send a sync signal to CAN bus 0 every 10ms
homing(a1, 0)
homing(a2, 0)
a1.sp = 8000
a2.sp = a1.sp*multiply
while (count<10)
count++
while (a2.ms==2||a1.ms==2)
wait(10)
end while
a1.pa=abs(a1.pa-position)
a2.pa=abs(a2.pa-position*multiply)
v1./jointfilesconvert/1588249/bg
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 homing(AXIS axis, int home_pos)
// axis.mo = 0
// wait(10)
axis.px = home_pos
axis.mo = 1
wait(10)
axis.pa = home_pos
axis./jointfilesconvert/1588249/bg
end function
Maestro Software Manual Appendix B: Sample Programs
MAN-MASSW (Ver. Q)
B-32
Comentarios a estos manuales