Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout error every other GPIB command

Solved!
Go to solution

Hi,

I am sending periodically same GPIB command "*IDN?\n' to my instrument. I am talking via the GPIB interface. This works perfectly on the NI VISA test panel. If I ran it in my program I will get the first command response correctly, the second time will fail with timeout, the third will be fine and the fourth will fail and so on. I have checked and there is no loops in my GPIB setup.

 

I tried to slow down the periodic with longer interval but it did not help 

Any thoughts?

 

Thanks

 

 

C:\Windows\System32>python -m visa info
Machine Details:
Platform ID: Windows-7-6.1.7601-SP1
Processor: Intel64 Family 6 Model 60 Stepping 3, Genuine

Python:
Implementation: CPython
Executable: C:\Program Files (x86)\Python36-32\python.exe
Version: 3.6.1
Compiler: MSC v.1900 32 bit (Intel)
Bits: 32bit
Build: Mar 21 2017 17:54:52 (#v3.6.1:69c0db5)
Unicode: UCS4

PyVISA Version: 1.8

Backends:
ni:
Version: 1.8 (bundled with PyVISA)
#1: C:\Windows\system32\visa32.dll:
found by: auto
bitness: 32
Vendor: National Instruments
Impl. Version: 17825792
Spec. Version: 5244672
#2: C:\Windows\system32\visa32.dll:
found by: auto
bitness: 32
Vendor: National Instruments
Impl. Version: 17825792
Spec. Version: 5244672

0 Kudos
Message 1 of 5
(4,715 Views)

Is there a posibility for you to attached your code? the python code. 

0 Kudos
Message 2 of 5
(4,653 Views)
Solution
Accepted by morpheus77

Are you initializing the port, writing, reading, then closing the port or looping on the write and read section only?  Most devices do not react well to initializing/opening the port numerous times without closing it first. 

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 3 of 5
(4,631 Views)

Thank you. The problem seems to go away after I upgraded the firmware version. 

0 Kudos
Message 4 of 5
(4,627 Views)

I added time delay for before every query and after a close

0 Kudos
Message 5 of 5
(4,626 Views)