Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

.Net GPI Device ReadByteArray method beeing called twice

Solved!
Go to solution

Hi, I'm having timeout issues while communicating to my OTDR Device through the NI's GPIB interface.

What happens is that when I call the instance method ReadByteArray of the Device class, my application freezes and, after a while,  a bus timeout happens, throwing an exception.

While trying to figure out why that was happening I used the NI Spy to check what was going on when my application talks to the device.

 

The write commands work fine, the device receives the command and performs the expected operation.

However, I noticed that when trying to read the device through ReadByteArray method or ReadString method, the  command ibrd is beeing called twice. Inspecting the output through NI Spy I noticed that this output was what I should expect, however, when the ibrd command is called a second time, there is a timeout as the device has nothing else to transmit.

 

I don't know why ibrd command is  beeing called twice when I use the ReadByteArray. So I'm here to check if you guys can help me out.

I'm using the NI4882 VS 2008 components  (version 8.5.35.308, runtime 2.0.50727).

 

I appreciate for your help.

 

Regards,

Fábio

0 Kudos
Message 1 of 5
(5,061 Views)
Solution
Accepted by topic author francofs

Solved it, used another assembly, maybe there was something wrong with that one.

 

Thanks

0 Kudos
Message 2 of 5
(5,039 Views)

Hai, I have the similar problem. Can you please write exactly how you solved that problem because the word assembly is very general?

0 Kudos
Message 3 of 5
(4,483 Views)

Could you please let me know which assembly to change?

I am facing the same issue. Write is working fine, however ReadByteArray() or ReadString() is not working.

It just times out.

0 Kudos
Message 4 of 5
(3,517 Views)

hey! 2022 and having this same problem. 

I've tried different NationalInstruments.4882.dll's to get a different assembly and that isn't working.

I've tried changing the bus timing to longer (2 us) and the I/O settings to longer timeout out too.

Any help would be great! 

Thanks!

0 Kudos
Message 5 of 5
(2,096 Views)