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: 

ReadString() get time limit exceed to complete operation error

I agree that there is something wrong. I did not notice that you had said the instrument is not visible in MAX. Very low level GPIB functions are used for this and IEEE-488.1 instruments should be detected as easily as current implementations of the standard.
0 Kudos
Message 21 of 32
(3,636 Views)

I don't think there is something wrong with the meter since EasyCal can read data from it. I agree with Dennis that it requires a low level function to communicate with the device. However I don't know any thing other than ReadString and ReadByteArray functions.

 

Curt_C: There is only one GPIB port, no RS-232 / USB port.

 

I am trying to recreate the demo application in WPF since there is something wrong with the Winform application. VS keeps get error and restart whenever I select a updown spinbox or a text box.

 

Thanks and kind regards,

Thang

0 Kudos
Message 22 of 32
(3,618 Views)

Here is the demo application in WPF.

0 Kudos
Message 23 of 32
(3,615 Views)

Hi,

 

I used the demo application successfully with VS2012 and NI 488.2 Ver 3.1.2.

The references to the NET libraries for 448.2 and the Common interface are 13.0.35.159

 

It worked with an Aglient 34401a meter.

 

On one of your previous posts your OI trace ouput had a device primary address of 2, but on your NI-MAX image the meter shows up with an address of 1.

Check that.

Or try to re-install NI-gpib. Maybe your library references are out of date. I've had issues with that in the past

 

Good luck

 

Curt

 

  1. simple_read_write_34401a.png
0 Kudos
Message 24 of 32
(3,597 Views)
To clarify, you have one instrument at address 1 and another at address 2? The one at address 1 shows up in MAX but the one at address 2 does not? The one at address 2 is the one with the timeout error? If so, what happens when you disconnect the instrument at address 1?
0 Kudos
Message 25 of 32
(3,592 Views)

Curt_C:

The device at address 1 is TE 5025C, the calibrator.

I have installed VS2012 and NI Measurement Studio 2013, NI Device Driver Aug14 on my laptop and had the same error.

I have also created another demo application using VisaNS that I attached hereafter. It is strange that at first time I open session, the device always beeps and reset and it does not show GPIB0::2::INSTR. I close the Select Resource window and open it again. At now, no beep, no reset and GPIB0::2::INSTR is showed. However even though now I can send commands to the device, I still cannot read data. Sorry. I did not notice that the device always beeps and reset when I click open in the IEEESimpleReadWrite demo application that I posted before.

I have worked with some other devices such as Time Electronics 5025, Agilent E8257D and it works normally with GPIB interface. However, all of them are visible in NI MAX.

So I think the problem may not be software out of date and reinstall NI GPIB can solve the problem.

Dennis:

you have one instrument at address 1 and another at address 2? YES
The one at address 1 shows up in MAX but the one at address 2 does not? YES and NO, IT DOES NOT
The one at address 2 is the one with the timeout error? YES
If so, what happens when you disconnect the instrument at address 1? Still error

 

Thanks and kind regards,

Thang

0 Kudos
Message 26 of 32
(3,570 Views)

Have you tried communicating using a Input/Output function tab in the VISA Test Panel in NI-MAX?

 

Curt

0 Kudos
Message 27 of 32
(3,548 Views)

Curt_C: The device is not visible in NI MAX. How can I use Input/Ouput function?

0 Kudos
Message 28 of 32
(3,541 Views)

This  is Suhwan Kim from NI Korea.

 

I had a problem like you when I tested VISA readstring function. But It was different from with your case.

 

I tried test your WPF code. But there wasn't any problem to read data from NI simulator device.

 

I tried to send "*IDN?\n" and MEAS:VOLT:DC?\n to Digital Multimeter Simulator. It's totally working.

 

Please, Check the command to send if the device can reply to the host.

 

 

0 Kudos
Message 29 of 32
(3,122 Views)

Here is the screen shot I tested.

0 Kudos
Message 30 of 32
(3,120 Views)