From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

No Listeners on GPIB

I am using Visual Basic.NET with PCI-GPIB to program HP Power supply. The application is setting voltage thru the HP Power supply programmitically. The application works fine. But randomly i get this 'NO LISTENERS ON GPIB" error. The application will have to be reset and the program starts working fine again.
 
I have looked at some possible causes, like address issue etc. But i would think if there is an addressing issue then the program should not work at all. Please let me know if anyone has seen this kind of error in a similar application.
0 Kudos
Message 1 of 7
(4,391 Views)

Hello KHP,

It would be helpful to see some code that demonstrates exactly how you're communicating with the device. Are you issuing any board-level commands to do things like manipulate line levels on the bus directly? This can sometimes lead to leaving the bus in an invalid state.

Regards,

Glenn Burnside

0 Kudos
Message 2 of 7
(4,391 Views)
I am using the NI488.2 reference in my VB.NET project. I get this error when the code tries to set voltage on HP Power Supply.
 
Heres some code to set voltage:
 

HPPower =

New Device(CInt(BoardAddress), CByte(HPPowerAddress), CByte(0))

HPPower.Write(ReplaceCommonEscapeSequences("ID?"))

ReturnStr = HPPower.ReadString()

If (InStr(ReturnStr, "ID HP6033A") <> 0) Then

HPPower.Write(ReplaceCommonEscapeSequences("RST"))

HPPower.Write(ReplaceCommonEscapeSequences("CLR"))

HPPower.Write(ReplaceCommonEscapeSequences("OUT ON"))

HPPower.Write(ReplaceCommonEscapeSequences("FOLD CC"))

HPPower.Write(ReplaceCommonEscapeSequences("ISET5.0"))

HPMeter.Write(ReplaceCommonEscapeSequences("SYST:ERR?"))

HPERR = HPMeter.ReadString()

HPERR = ""

Else

MsgBox(ReturnStr, MsgBoxStyle.Critical, "HP Power Supply Error")

End If

HPPower.Write("VSET" & Format(Value, "#0.0#") & "V")

0 Kudos
Message 3 of 7
(4,380 Views)

Here is the NI-SPY Capture report for the application. #486 is a good one and #487 is when i got the error. The time between the two commands is very short (probably in milliseconds).

486.  ThreadIbcntl()
Process ID: 0x00000FDC         Thread ID: 0x00000A10
Start Time: 14:13:52.004       Call Duration: 00:00:00.000
ibsta: 0x100       iberr: 0             ibcntl: 8(0x8)

> 487.  ibwrt(UD1, "VSET12.0V", 9 (0x9))
> Process ID: 0x00000FDC         Thread ID: 0x00000A10
> Start Time: 14:13:59.554       Call Duration: 00:00:00.000
> ibsta: 0x8100       iberr: 2             ibcntl: 5(0x5)

0 Kudos
Message 4 of 7
(4,378 Views)
Can you post a larger section of the NI-Spy log? There's nothing about those two entries to indicate why the call to ibwrt is failing.
 
I noticed from the code you posted that this must be a pretty old device - it doesn't appear to support IEEE 488.2 commands like *RST, *IDN?, etc. I have seen where some older devices will not run correctly on newer, faster hardware, because the timing they use to raise and lower lines on their GPIB port are based on assumptions about the speed with which the Controller in Charge will detect and respond to those changes. this can sometimes cause the kind of problem you're encountering.
 
My hunch is that this problem is not related to the .NET API, but rather to something occurring at the bus level. Is this an application that you're porting to .NET from another language, or is this a new development effort? Also, have you used this device in other environments like CVI or LabVIEW, and if so, do you see similar problems when running apps on similar systems?
 
Glenn Burnside
0 Kudos
Message 5 of 7
(4,369 Views)

Seems like you are using very old non-SCPI based instrument from HP (Agilent).  I think that the instrument is likely showing an unstable behaviour for recent high performance GPIB card due to old instrument design, because No-Listener error can normally be generated only when a cabling problem or instrument's firmware problem.

What I noticed is that your program is sending voltage and current values with VSET and ISET commands, but no white space is inserted between VSET (or ISET) and the value.  Also the command string has no explicit terminator (such as CR 0x0D or LF 0x0A) appended.  This may knock out the instrument's command parser (though I don't know what is the correct syntax for your instrument).  Try "VSET 12.0V\r\n" rather than "VSET12.0V". 

Other possible issue is GPIB bus speed.  The default bus-timing for NI PCI-GPIB is 500ns (from 350ns, 500ns, 2us choices) but some old instruments may not work stably with 500ns or 350ns bus-timing.  Try to slowdown the GPIB controller's bus-timing at Device Manager settings. 

Hope this helps,
Makoto

0 Kudos
Message 6 of 7
(4,358 Views)
Glenn/Makato,
 
I am using a HP6033A power supply. It is a pretty old model.
Yes it definitely looks like a bus level issue probably bus timing like Makato mentioned. I have experimented with all the bus timings on the controller and 2 Micro seconds seems to work the best now. I havent had any errors after the timing was set to 2 micro seconds.
I changed the syntax to add some space in the VSET command. Will monitor.
 
Appreciate your feedback on this.
0 Kudos
Message 7 of 7
(4,342 Views)