Installation manual

Chapter 6 Programming
6-69
《Playback control teach point “DO” status selection》
Setting “DO” data attribution at the teaching point, this can be performed by choosing
its DO information (valid/invalid) or (stop/non-stop) when the arm is stopped.
Setting & acquisition of teach point “DO” output – valid/invalid –
while in playback control.
pa_swt_dio(ARM armno, long sw)
pa_get_pdo(ARM armno, long* stat)
Choose to make valid (output) or invalid (no output) for DO data attribution set at teach
point, while in playback control.
Setting & acquisition of teach point “DO” output – valid/invalid – when the arm is stopped
while in playback control.
pa_set_dlc(ARM armno, long data)
pa_get_dlc(ARM armno, long* stat)
The pre-condition is: the teach point DO output in the playback control, has to be set to
be valid. When DO information is output while in playback control, if the arm is
temporarily stopped or brake-stop, choose to stop output DO information or continue.
Program description:
Example: for Visual C++
While in playback control, make teach point DO information valid. When an arm is not
in motion, stop DO output.
DIOSTATUS dis, dio;
pa_swt_dio(ARM0, 1); Teach point DO information available
pa_set_dlc(ARM0, 1); When in arm-stop, DO-stop available.
Example: for Visual BASIC
Dim dis As DIOSTATUS
Dim dio As DIOSTATUS
Dim ret As Long
ret = pa_swt_dio(ARM0, 1)
ret = pa_set_dlc(ARM0, 1)