Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

[SOS] GPIB - First read successful but second times out

Only happens on read, regardless of the command, they can be two different commands, the second and any following will timeout. The device was functioning perfectly for 4/5 months. If I close and reopen the session I can read the result of a previous session, but I can never read anything past the first '\n' character. This applies to reading bytes one by one as well. I have another GPIB device on a different hub that is functioning as expected.

johnstall_0-1645272495391.png

 

0 Kudos
Message 1 of 2
(759 Views)

It appears that you are clicking on the WRITE then READ buttons in NI-MAX. If you click on READ again, you should expect a timeout.  By clicking on WRITE, you inform the piece of equipment to perform a particular task (Provided the command is correct) and stores the result in the buffer (if the command ends with a "?").  When clicking on READ, the data in the buffer is extracted from the buffer and sent across to the system controller.  When another READ occurs, there is nothing in the buffer to send and as such will not send anything and timeout.

Instead, click on the QUERY button.  It acts by performing the WRITE followed by the READ command and should be able to be performed repetitively once the data is acquired from the buffer.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 2 of 2
(699 Views)