Common Questions
Appendix E
GPIB-232CT User Manual
E-2
© National Instruments Corp.
Question
When I use
LINE INPUT#
, my strings are usually preceded by a linefeed
(<LF>)and followed by a carriage return (<CR>). Why don't my strings
contain both a carriage return and linefeed at the end?
Answer
LINE INPUT#
stops reading when a carriage return is seen and does not
skip over the linefeed in the sequence. The linefeed is not read until the
following
LINE INPUT#
. In most cases, you will be using the
val
function to convert the string to a value and a leading linefeed is ignored.
Question
I sent the programming message
"rsp 10"
to the GPIB-232CT to serial
poll device 10. Then, I used
LINE INPUT#
to read the response byte and
got nothing but a carriage return and linefeed (<CR><LF>) as a response.
Am I doing something wrong?
Answer
No. To conduct a serial poll, the GPIB-232CT must be Controller-In-
Charge or it must be able to become Controller-In-Charge. If the
GPIB-232CT cannot become Controller-In-Charge, no serial poll is
conducted, and therefore you will not get a response string. To see if this is
the problem, ask for status (see
stat
) and check to see if the ECIC error
occurred. If it did, you have passed control or System Controller authority
to some other GPIB device, and will not be able to perform a serial poll
until the GPIB-232CT gets Controller authority back.