Installation manual
Chapter 6 Programming
6-52
Example: for Visual C++
float spd[7];
pa_set_tim(ARM0, 20);
Time-out setting(200msec)
for(i=0;i<7;i++) spd[i] = 0.0;
pa_odr_vel(ARM0, spd);
Velocity command initialization
pa_mod_vel(ARM0,VM_XYZYPR,0);
Velocity mode Base position/orientation selection
:
From here to “pa_sus_arm,” “pa_odr_vel” or “pa_chk_cnt” has to be issued within 200 msec. cycle.
:
spd[0] = 100.0;
Base coordinate system toward X [mm/s]
spd[2] = 50.0
; 〃 toward Z [mm/s]
spd[4] = 0.5
; 〃 toward Pitch [rad/s]
pa_odr_vel(ARM0, spd);
Velocity command input
:
pa_sus_arm(ARM0, WM_WAIT);
Velocity control termination
Example: for Visual BASIC
Dim spd(6) As Single
ret = pa_set_tim(ARM0, 20)
For i=0 To 6 Step 1
spd(i) = 0.0
Next i
ret = pa_odr_vel(ARM0, spd(0)) Velocity command initialization
ret = pa_mod_vel(ARM0,VM_XYZYPR1,0)
:
spd(0) = 100.0
spd(2) = 50.0
spd(4) = 0.5
ret = pa_odr_vel(ARM0, spd(0))
:
ret = pa_sus_arm(ARM0, WM_WAIT)