ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

readstring statement

Solved!
Go to solution

How does the readstring statement pause the vb code until the sweep is done? It works fine I'd just like to understand it better. I was trying to figure out how to get the status of the sweep before I found out I didn't need to do anything. I was quite surprised. So how does it work?

 

Keithley2430.Write(":READ?")
        readString = Keithley2430.ReadString() 'InsertCommonEscapeSequences(Keithley2430.ReadString())

 

0 Kudos
Message 1 of 4
(4,180 Views)
You should study the IEEE-488 standard. The talker will assert EOI when the data write to the output buffer is complete. A read waits for the EOI or until the timeout value is reached. A long measurement could exceed the default timeout so you may have to change that.
0 Kudos
Message 2 of 4
(4,178 Views)

I understand that the equipment waits for the sweep to finish before the readstring takes effect. What I don't know is what is causing my vb code to pause. I'm thinking it's something in the VISA that is telling my software to wait until the readstring is complete.

0 Kudos
Message 3 of 4
(4,176 Views)
Solution
Accepted by DickHutchings
As I said, a read will wait for the EOI or timeout.
0 Kudos
Message 4 of 4
(4,174 Views)