Installation manual

Chapter 6 Programming
6-63
Example: for Visual C++
MATRIX mat;
ANGLE an;
pa_set_tim(ARM0, 20);
Time-out setting200msec
pa_exe_saf(ARM0, WM_WAIT); Moves to safe orientation
an.s1=0.0; Restricted axis value intialization
(Initialize an to 0 in the case of the 6-axis)
pa_get_noa(ARM0, mat); Current position/orientation loading
pa_odr_dpd(ARM0, mat, &an); Target position/orientation initialization
pa_mod_dpd(ARM0); RMRC real-time control mode selection
From here to pa_sus_arm, “pa_odr_axs” or pa_chk_cnt” has to be issued within
200 msec. cycle.
while (Conditional text){
Target position/orientation T-matrix creationmat
“0” initialization or
creation of axis value for the redundant axis restriction data an
pa_odr_dpd(ARM0, mat, &an);
Setting for Target position/orientation T-matrix and axis value for the
restriction data
}
pa_sus_arm(ARM0, WM_WAIT); RMRC real-time control mode termination
Example: for Visual BASIC
Dim mat(3,2) As Single
Dim an As ANGLE
Dim ret As Long
ret = pa_set_tim(ARM0, 20)
ret = pa_exe_saf(ARM0, WM_WAIT)
ret = pa_get_noa(ARM0, mat(0,0))
ret = pa_odr_dpd(ARM0, mat(0,0), an) Target position/orientation initialization
(Initialize an to 0 in the case of the 6-axis)
ret = pa_mod_dpd(ARM0)
Do While (Conditional text){
ret = pa_odr_dpd(ARM0, mat(0,0), an)
Loop
ret = pa_sus_arm(ARM0, WM_WAIT)