Installation manual
Chapter 6 Programming
6-68
Program description:
Example: for Visual C++
The output channel 4 of tool1 (port 1) has to be switched ON.
When the input channel 3 turns ON, channel 4 has to be OFF.
UBYTE io;
pa_set_dio(ARM0, DP_PORT1, DC_CH4);
while(1){
pa_get_dio(ARM0, DP_PORT1, DC_CH3, &io);
if(io<>0) break;
}
pa_rst_dio(ARM0, DP_PORT1, DC_CH4);
Example: for Visual BASIC
Dim io As Byte
Dim ret As Long
io = 0
ret = pa_set_dio(ARM0, DP_PORT1, DC_CH4)
Do While io = 0
ret = pa_get_dio(ARM0, DP_PORT1, DC_CH3, io)
Loop
ret = pa_rst_dio(ARM0, DP_PORT1, DC_CH4);