From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with GPIB without EOI

I am trying to communicate with an old instrument on GPIB using NI-pIIA.This instrument does not support EOI. It outputs LF and CR with every string of data it transmits. I am using EOS (VbLF) feature to terminate my read. It works fine except when the instrument sends multiple line data (each line terminated with a CR and LF. The problem is the number of lines of data sent is not fixed so I have to issue multiple read commands (ilrd or ibrd). Since I have no way of knowing the number of lines or bytes transmitted I have to keep reading till I get a time out. I am trying to avoid a time out condition. Is there a solution to this?
Thanks
0 Kudos
Message 1 of 3
(3,351 Views)
Adil,

As I responded to you in person, we need to find out how many bytes are available for read from the instrument. Whether this involves using the SRQ line if the device implements that, or perhaps some command we can send it to see how much data is waiting, without that piece of information the only way to do this is to do a read until we get a timeout. The problem stems from your instrument's lack of a way to tell how much data is available, since it does not use standard termination characters and does not use the EOI line to let the controller know that it should stop reading.

Post here or reply to me if you need further assistance, or have further questions.

Thanks,
Scott B.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(3,351 Views)
Typically if a command returns a multiline response, the command has a fixed number of lines in that response. I would make sure that it really is "not fixed". If it really is not fixed, there is really no good way to communicate to the instrument.
0 Kudos
Message 3 of 3
(3,351 Views)