Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

SRQ event not received when multiple process open VISA instrument

I'm having two different processes opening VISA sessions to the GPIB instruments.
This first process install SRQ handler on the ressource and just wait for those events to occurs.
The second process is basically a test program using standard read/write to my instruments.
Provided my instrument is correctly configured, I've found that my first process won't see any SRQ when the second process generate badly formatted commands.
However if the first process send badly formatted commands, then it will see those events.
I've reproduced this easily with the VIC panels and I can't find any explanation for this behavior.

I've hooked an AT-GPIB+ to the GPIB bus and confirmed that the SRQ occurred has expe
cted; I've also confirmed that the GPIB controller do the serial pooling to identify the SRQ origin.

Furthermore this problem is only reproductible with instrument who do not have secondary address :
GPIB::4::INSTR => SRQ not detected
GPIB::5::0::INSTR => SRQ detected

I've tried different instruments without much differences.

Finally, writting my first process using the GPIB library instead of VISA seems to works correctly (i.e. it always detects SRQs on the GPIB bus); the only difference being that in that case my callback is installed on the GPIB board instead of the instrument.

Is it a bug in the VISA library ? How do I work around it ?
0 Kudos
Message 1 of 5
(4,022 Views)
Hi,

I tried to reproduce what you are describing, without luck. I'm using LabVIEW to test this.

I have the following setup: 2 instruments (Addresses 2 and 3). I setup one instrument to generate a SRQ when there is data available. I query the ID string using *IDN?. This works fine.

With the second intrument I also queri it's ID string after I sent the *IDN? to the first instrument. If I send an incorrect command (*ID?, for example) what happens is that the read VI times out and the rest of the VIs do not execute.

Let me know if there is anything in particular I'm missing.

What LabVIEW version are you using?
What NI-VISA version are you using?

DiegoF
National Instruments.
0 Kudos
Message 2 of 5
(4,022 Views)
Hi,

Our test system is as follow :
Industrial PC
Microsoft Windows NT 4
VenturCom RTX 4.3.1
LabWindows/CVI 5.5
NI-488.2 1.50
NI-PAL 1.5.0f0
NI-VISA 2.5.2
NI-VXI 3.2
IVI Engine 1.83

The hardware is as follow :
PCI-GPIB controller connected to several instruments :
GPIB0::4:INSTR
GPIB0::5::0::INSTR
GPIB0::5::1::INSTR
GPIB0::21:INSTR
GPIB0::22:INSTR
GPIB0::23:INSTR
etc.

I agree with the fact that reading after an invalid instruction will return a Time Out.
My point is that sending an invalid command by itself will make the instrument raise a Service ReQuest on the GPIB bus.

Do do this you need an IEEE488.2 instrument which support status registers (accessible through commands like "*ESR?" "*ESE xx" "*STB?" "*SRE xx").
To config
ure the instrument in our test case, you tipically send :
"*ESE 52"
"*SRE 32"

When the SRQ is detected, you need to acknowledge it by reading the Status Byte Register ("*STB?" or viReadSTB) and the Event Status Register ("*ESE?").

Hope this will help you reproduce my problem.
Sincerely,
Rémi THEVENIN
0 Kudos
Message 3 of 5
(4,022 Views)
Hi,

I've further investigated the problem.

I've upgraded to NI-VISA 2.6.1 and NI-IVI 3.3. This gave better results in the event handling mecanisms, but my issue still exist.
I've tried to narrow the problem further and it seems that the issue isn't related to instruments with secondary addresses; in fact, it seems related to instruments session which already have seen SRQs before I open a second session on the same instrument.

Let me try to explain :
Process A start
open instrument GPIB0::4::INSTR
open instrument GPIB0::21::INSTR
acknowledge SRQ on both instruments
send "*SRE?" then read response
call viReadSTB()
install SRQ handler on both instruments
call viEventHandler()
call viEnableEvent()
configur
e both instruments for SRQ handling
send "*ESE 52"
send "*SRE 32"
send invalid command to instrument at address 21
send "xxx"
=> SRQ handler called for the correct instrument
acknowledge SRQ on the instrument at address 21
send "*SRE?" then read response
call viReadSTB()

Process B start
open instrument GPIB0::4::INSTR
send invalid command
=> no SRQ handler called !
install SRQ handler on this instrument
call viEventHandler()
call viEnableEvent()
=> SRQ called in process B (not in process A !)
acknowledge SRQ on this instrument
send "*SRE?" then read response
call viReadSTB()
close instrument
open instrument GPIB0::21::INSTR
send invalid command
=> SRQ handler called in process A
acknowledge SRQ on this instrument
send "*SRE?" then read response
call viReadSTB()
close instrument

I hope this detailed test sequence will help you to reproduce my problem more easily.
Sincerely,
Rémi THEVENI
N
0 Kudos
Message 4 of 5
(4,022 Views)
Hi,

I was wondering if you've been able to further investigate my issue ?!?

Sincerely,
Rémi THEVENIN
0 Kudos
Message 5 of 5
(4,022 Views)