S Mode Functions
Chapter 5
GPIB-232CT User Manual
5-14
© National Instruments Corp.
Examples:
1.
PRINT #1,"eos R,B,10" 'Terminate read when <LF>
'is detected; compare all
'8 bits; do not send EOI
'with <LF>.
PRINT #1,"rd 10 5"
'Read 10 bytes from device
'5 into serial port
'buffer.
RESP$=INPUT$(10,#1)
'Input 10 bytes from
'serial port buffer.
LINE INPUT #1,COUNT$ 'Input string that
'indicates number of bytes
'actually read from GPIB.
PRINT COUNT$;" bytes were read from GPIB"
'Print number of bytes
'that were read from
'the
GPIB.
2.
PRINT #1,"EOS X,13"
'Send EOI with <CR> on
'wrt; do not terminate
'when <CR> is detected
'on rd; compare 7 bits.
PRINT #1,"wrt #10 5" 'GPIB-232CT sends EOI with
'<CR> (CHR$(13)) to tell
'Listeners that this is
'the last byte of data.
#1,"012345678"
3.
PRINT #1,"eos"
'What are the current EOS
'settings?
response:
X,13<CR><LF>