Installation manual

Chapter 6 Programming
6-6
func = WM_NOWAIT No wait until the arm motion is terminated
<Library Processing Contents>
・Issues commands to the motion control section.
If any error occurs, terminates processing. An error number is shown as a
return value.
・Confirmation and error observation are not performed at the motion
termination.
Example: for Visual C++
long new, old;
long err;
:
pa_get_cnt(ARM0, &old); ...Control counter setting before the command issue
pa_exe_hom(ARM0, WM_NOWAIT);
while(1){
if(( err=pa_get_cnt(ARM0,&new))!=ERR_OK){
An error occurrence processing
break;
}else if( new != old ){
Motion termination processing
break;
}else{
Processing during performance (Example; axis indication)
}
}
Example: for Visual BASIC
Dim new As Long
Dim old As Long
Dim err As Long
:
err = pa_get_cnt(ARM0, old) ...
Control counter setting before the command issue
err = pa_exe_hom(ARM0, WM_NOWAIT)
Do While 1
err = pa_get_cnt(ARM0, new)
If err <> ERR_OK Then
An error occurrence processing
Exit Do
Else
If new <> old Then
Motion termination processing
Exit Do
Else
Processing during performance (Example; axis indication)
End If
End If
Loop