HP 61010A Owner's Manual page 65

Digital i/o
Table of Contents

Advertisement

Example 2
program shell
1010 DIM A (10)
1020 CALL SET.DRIVER(DIG.OUT.01,TTL)
1030 CALL EN ABLE .OUTPUT(DIG. OUT.01)
1040 CALL ENABLE.HANDSHAKE(DIG.OUT.Ol)
These statements dimension an array, set the Digital Output to
be compatible with TTL logic levels, and enable the output driver
and handshake mode.
1050 FOR 1 = 1 to 10
1060 WXYZ = A(I)
1070 CALL OUTPUT.NO.WAIT(DIG.OUT,01,WXYZ)
These statements start a FOR/ NEXT loop that outputs data and
does not zvait for the ODAC signal to return from the external
device.
1080 CALL CHECK.DONE (DIG,OUT.OLOUTSTATUS)
1090 IF OUTSTATUS = 0 THEN GOTO 1080
1100 NEXT I
These statements check the handshake status to see when the
ODAC signal is returned. When the signal is returned,
the loop repeats for the next piece of output data.
1110 STOP
Example 2 will execute faster if an OUTPUT statement is
used in line 1070 instead of the OUTPUT.NO.WAIT
statement. Because the OUTPUT statement will wait for
the ODAC signal to return before program execution
continues, it is not necessary to include lines 1080 and
1090 when using an OUTPUT statement. However, if the
external device does not return the ODAC signal when
using an OUTPUT statement, it will be necessary for you
to reset the computer to continue.
Programming with BASIC
5-17

Advertisement

Table of Contents
loading

Table of Contents