Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Enable Event fails for TCP/IP resource

Solved!
Go to solution

When I call VISA Enable Event to enable Service Requests for my TCP/IP (VXI-11) instrument, it returns error code -1073807265, "No listeners condition is detected (both NRFD and NDAC are deasserted)."

 

Apparently this error usually means you're not connected to your instrument; all relevant Discussion Forum end up referring to these Knowledge Base articles:

Error -1073807265 and

Error -1073807265 or -1073807304 Occurred at VISA Write

But that is NOT the case here: all open/read/write/status-byte/... operations work perfectly.

 

Other observations:

 

  • Enabling service requests on a USB connection to the same instrument (USBTMC-USB488) works as expected, so I think I basically know what I'm doing.
  • I tried the same operation in the VISA Test Panel in MAX - same result (works on USB, not on TCP/IP).
  • I tried it under Mac OS as well as Windows - same result.
  • One curious thing: both Mac and Windows popped up a firewall warning when I first ran my test program. ???

For completeness, I include my little test program, which should function with any IEEE 488.2 compliant instrument. Any ideas would be GREATLY appreciated; this thing is driving me nuts. Oh, by the way, I'm using LabVIEW 2010 SP1 and VISA 5.0.

0 Kudos
Message 1 of 7
(4,682 Views)
Solution
Accepted by topic author Keller

Update:

The main problem turned out to be a problem with the instrument - one of ours, under development. Under VXI-11 (=IEEE 488.2 on top of TCP/IP), the VISA Enable Event issues a CREATE_INTR_CHAN Remote Procedure Call (RPC), upon which the instrument is supposed to open a socket (the interrupt channel) back to the host. On our instrument, this socket connection was failing, causing VISA Enable Event to return the error shown.

 

A secondary issue was that the instrument requires the Status Byte to be read in order to acknowledge that the host has received the interrupt. I didn't do that in the original version of my test program.

 

For those interested, I am attaching the output of the Open Source network analysis software, Wireshark, showing the build-up and tear-down of the VXI-11 interrupt channel - the working version and the non-working version. I also include the updated version of my test program.

 

Special thanks to Lam Dang of NI Applications Engineering (Germany), who got me going in the right direction in solving this problem.

 

0 Kudos
Message 2 of 7
(4,651 Views)

Hi Keller,

 

I am also trying to establish interrupt channel with NI-Max,  but still I am not getting VI_EVENT_SERVICE_REQ  event at NI-Visa client side  and viWaitonEvent() function giving timeout.

 

Could you please let me know what Socket msg supposed to send to Interrupt channel server?

 

 

I have created new thread for my issue: -

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/How-to-create-the-VXI11-interrupt-channel-whi...

 

Please help.

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

Dear C++Coder,

Sorry, I can't help you there; the NI-Device package handles all that. We just had to supply a socket class for our RTOS.

-- Philip

0 Kudos
Message 4 of 7
(4,594 Views)

Hi Philip,

 

Thanks for your response.

 

since you just supply the socket class; do you also send any RPC message?

If yes could you please share the meassge structure and other information related to the same?

 

Thanks

 

0 Kudos
Message 5 of 7
(4,583 Views)

No, the RPC is all handled by NI-Device. Just out of interest, I looked at the RPC structure definition in NI-Device; it is compatible with the code that you showed in your other thread. (The NI-Device code is copyrighted, so I can't publish it here.) By the way, I see a little typo in your structure name: "typedef struct rcphdr " -> "typedef struct rpchdr ".

-- Philip

0 Kudos
Message 6 of 7
(4,577 Views)

I came across the exact same thing: the instrument setting vi works fine, but when it comes to some vi that requires VISA enable event, it keeps returning error code -1073807265, "No listeners condition is detected (both NRFD and NDAC are deasserted).

However, the problem has been solved by turning off the WIN10 firewall, another way to tackle the error.

0 Kudos
Message 7 of 7
(1,819 Views)