Installation manual

Chapter 6 Programming
6-99
Example: for Visual BASIC
Dim ret As Long
Dim i As Integer
Dim j As Integer
Dim mat(3,2) As Single
ret = pa_add_pnt(ARM0, PT_PTP)
ret = pa_add_pnt(ARM0, PT_PTP)
For i=0 To 2 Step 1
For j=0 To 2 Step 1
If i = j Then
mat(i,j) = 1.0
Else
mat(i,j) = 0.0
End If
Next j
Next i
mat(3,0) = 250.0
mat(3,1) = -100.0
mat(3,2) = 0.0
ret = pa_set_mtx(ARM0, mat(0,0))
ret = pa_chg_pnt(ARM0, PM_TOP, 0)
ret = pa_mov_pnt(ARM0, WM_WAIT)
ret = pa_ply_pnt(ARM0, PB_FORE, WM_WAIT)