National Instruments GPIB-MAC User Manual page 98

Table of Contents

Advertisement

November 1985
Examples:
1. PRINT #l,"wait \x5000" 'Wait for TIM0 or SRQI.
STATUS%=VAL(LINE INPUT #l,STATUS$)'Get status info.
IF (STATUS% AND &H4000) <> 0 THEN GOT0 1000
IF(STATUS% AND &HlOOO) <> 0 THEN GOT0 200
2. PRINT #l,"wait 4"
SPERR%=VAL(LINE INPUT #l,SPERR$)
PRINT #l,"rd lo"
RESP$=INPUT$( lO,#l) 'Input 10 bytes from serial port
LINE INPUT # 1 ,CNT!§ 'Input number of valid bytes in CNT$.
87
SECTION FOUR - FUNCTIONS
'If TIM0 bit is set we timed out before
'getting SRQI. Go to an error routine
'at line 1000.
'If SRQI bit set, go to routine to
'conduct a serial poll.
'Wait indefinitely to become LACS.
'Now that GPIB-MAC is addressed to
'listen, read 10 bytes from the GPIB.
'buffer.

Advertisement

Table of Contents
loading

Table of Contents