Installation manual

Chapter 6 Programming
6-4
Explanation on the programming employing samples.
Example: for Visual C++ the one written with the visual C++6.0
programming language is indicated.
It is the same as other C-programming language (either Windows or not)
Example: for Visual BASIC the one written with the visual BASIC
programming language is indicated
.
In the sample, making easier to understand the description method, function return
values ARE NOT checked. When you actually make programming, check any error
shown by a return value.
Depending on the error type, the motion control section terminates the control
automatically.
Regarding errors, refer to the error table.
Program Description:
Example: for Visual C++
pa_ini_sys(); ... PA library initialization
pa_opn_arm( ARM0 ); ... 1
st
arm open
pa_sta_arm( ARM0 ); ... Control Start
:
Motion Description Section
:
pa_ext_arm( ARM0 ); ... Control Stop
pa_cls_arm( ARM0 ); ... 1
st
arm close
pa_ter_sys(); ... PA library termination
Example: for Visual BASIC
Dim ret As Long
ret = pa_ini_sys() ... PA library initialization
ret = pa_opn_arm( ARM0 ) ... 1
st
arm open
ret = pa_sta_arm( ARM0 ) ... Control Start
:
Motion Description Section
:
ret = pa_ext_arm( ARM0 ) ... Control Exit
ret = pa_cls_arm( ARM0 ) ... 1
st
arm close
ret = pa_ter_sys() ... PA library termination
This is the minimum necessary description library.
Remark
R
R
e
e
f
f
e
e
r
r
e
e
n
n
c
c
e
e