HP 61010A Owner's Manual page 54

Digital i/o
Table of Contents

Advertisement

Example:
1010 CALL ENABLE.HANDSHAKE(DIG.IN.01)
This example enables the handshake mode only on
DIG.IN.01.
OISABLE.HANDSHAKE(label) * disables the handshake
mode of either the Digital Output or the Digital Input.
This allows you to operate your Digital I/O
asynchronously, where the computer alone controls data
transmission.
Example:
1010 CALL DISABLE.HANDSHAKE(DIG.OLT.Ol)
This example disables the handshake mode only on
DIG.OUT.01.
CHECK.DONE (labelling) ■ used in handshake mode to
check the status of either the Digital Output or the Digital
Input. The variable flag returns either a 0 or a 1. For the
Digital Input, a 0 indicates that handshaking is done, and
a 1 indicates that handshaking is in progress (busy). For
the Digital Output, a 0 indicates that handshaking is in
progress (busy) and a 1 indicates that handshaking is
done. Figures 3-3 and 3-6 show when the status is busy
during handshake mode.
Example:
1010 CALL ENABLE.HANDSHAKE(DIG.IN.01)
1020 CALL CHECK. DONE( DIG .IN. 01, IN STATUS)
1030 IF INSTATUS - 0 THEN GOTO 1020
1040 CALL ME A 5URE(DI G. IN. 01, V ALUE)
In this example, line 1020 of the program checks the
handshake status only of DIG.IN.01. Notice that
INSTATUS is an example of a variable name that is
meaningful within the context of this application. Line
1030 checks the value of the variable INSTATUS. If
5-6
Programming With BASIC

Advertisement

Table of Contents
loading

Table of Contents