National Instruments GPIB-MAC User Manual page 90

Table of Contents

Advertisement

November 1985
you
always returned first.
If you call stat
reporting is disabled.
Notice that when you send several programming
messages to the GPIB-MAC, it buffers them and
processes each one without any delay in between.
However, if you enable continuous status reporting and
check the status of each programming message before
sending the next, the GPIB-MAC waits for each
subsequent programming message to arrive at the serial
port before processing it. This slows down the overall
performance of your program. If speed is a primary
concern, disable continuous status reporting.
Examples:
1. 10
PRINT #l,"stat n"
20
REM GPIB-MAC responds with:
3 0 R E M 340<CR><LF>OcCR><LF>O<CR><LF>Oc~><LF>
40
REM Now read status into variables.
50
STATUS% = VAL(LINE INPUT#l,STATUS$)
60
LINE INPUT # 1 ,GPIBERR$
70
LINE INPUT #l,SPERR$
80
LINE INPUT #l,COUNT$
90
REM Go to error routine at 500 if error occurred.
100 IP STATUS% < 0 THEN GOT0 500
110 REM Go to SRQ service routine if SRQ is asserted.
120 IF (STATUS% AND &HlOOO) THEN GOT0 400
. . .
400 REM
410 REM Place code here to service SRQ.
420 REM
500 REM Print gpib-error and serial-error values to
5 10 REM determine what errors occurred
520 PRINT "GPIB-error = ";GPIBERR$
530 PRINT "Serial-error = ";SPERR$
540 STOP
79
SECTIONFOUR-FUNCTIONS
stat
call
with both s and
without an argument, continuous status
n the
numeric status is
'Get GPIB-MAC status.

Advertisement

Table of Contents
loading

Table of Contents