Appendix E Common Questions; S Mode - National Instruments GPIB-232CT User Manual

Microgpib rs-232 to ieee-488 controller
Table of Contents

Advertisement

Appendix E
Common Questions
This appendix consists of two sections. The first section answers questions
about S mode. The second section answers questions about G mode.

S Mode

Question
Why does the manual suggest that I use INPUT$ sometimes, and LINE
INPUT# at other times? Microsoft suggests using INPUT$ to read from
the serial port.
Answer
Use LINE INPUT# to read status information from the GPIB-232CT.
GPIB-232CT software formats its status information so that your BASIC
program can easily read and interpret each of its pieces. Each logical piece
of status information is followed by a carriage return (<CR>) and linefeed
(<LF>). LINE INPUT# allows you to easily read each piece of status
information and assign it to a variable.
Use INPUT$ to read a data string from your GPIB device. INPUT$
requires that you know the exact number of characters you wish to read
from the serial port. When reading status information from the
GPIB-232CT, this is not always possible since the responses can vary in
length from one call to the next. However, when reading a data string from
your GPIB device, you requested a certain number of bytes and you should
use INPUT$ to read the number of bytes you requested in your rd function.
The GPIB-232CT appends to the end of the data string a string containing
the number of bytes that were actually read from the GPIB. When you
have read in the data bytes using INPUT$, use LINE INPUT# to read the
string containing the byte count. Refer to the example following the rd
function description in Chapter 5.
© National Instruments Corp.
E-1
GPIB-232CT User Manual

Advertisement

Table of Contents
loading

Table of Contents