Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA Bug – setting timeout on GPIB instr resource clears STB

Justin,

 

Small correction: the only thing missing from the first post was setting ESE to 1. I must have set it somehow before I started the log. Also, that instrument needed the ESR event register to be cleared to rearm SRQ as well. I used *CLS instead of *ESR? to do it.

 

You should still use example for Keithley as other commands (INIT:IMM) from first post might not work without additional setup.

 

Thanks,

Sebastian

0 Kudos
Message 11 of 18
(1,681 Views)

I guess I was a little misleading by saying the same.  I was not using the INIT:IMM command that doesn't work with the Keithley 2700 I was using.  And interestingly today I'm seeing a different result and reproducing what you are seeing.

 

I've minimized the code to just set the timeout, send "*CLS;*ESE 1;*SRE 32;*OPC", change the timeout and read the status byte.  I now see the behavior you describe.  Attached is the nitrace.  I had someone else open the previous one and it worked for them.  I'm using 3.0.2, but it shouldn't matter.  I'm also attaching the text version incase there's an issue again.

 

I'm going to look at analyzer captures and figure out what is happening on the bus.  I'll let you know what I find.

 

 

Justin Parker
National Instruments
Product Support Engineer
Download All
0 Kudos
Message 12 of 18
(1,660 Views)

Justin,

 

Thanks for working on this. Now, that you have reproduced the problem is there a chance it will be fixed in the near future? Also, have you looked into why disabling auto polling has no effect when VISA events are enabled?

 

Thanks Again,

Sebastian

0 Kudos
Message 13 of 18
(1,635 Views)

Hi Sebastian,

 

I have filed CAR#383583 on the issue we see with the timeout setting modifying the status byte.  I can't give you a timeline for when this will be fixed.  I think that the easiest workaround would be to set the timeout to be the value that you want in the beginning and not change it.  Is there a reason that this would not work for you?

 

Also can you explain in a little more detail what you mean in your last sentence? Are you saying that autopolling doesn't work when VISA events are enabled?

 

Thanks,

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 14 of 18
(1,622 Views)

Justin,

 

Unfortunately, as I said in the first post, rearranging the sequence of triggering, setting timeout, and reading STB is not a viable workaround for me. I have a third party driver that sets timeout before it reads STB. I do not have source code for it and cannot change it. It works fine with Agilent VISA.

 

As far as autopolling.  I’m not saying autopolling doesn't work when VISA events are enabled. I’m saying that it is performed when VISA events are enabled regardless of whether it is disabled or enabled in MAX. If autopolling could be truly disabled then I could use that as a workaround.    

 

I said this earlier, but please remember that opening another session to the same instrument (form another process) makes the problem go away. This also is not a good workaround. However, it does indicate that the underlying problem might be quite significant and affect other functionality.

 

Thanks,

Sebastian

0 Kudos
Message 15 of 18
(1,605 Views)

Hi Sebastian,

 

The autopolling when using VISA events is an expected behavior and is explained here.  Sorry for misunderstanding the first time.

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 16 of 18
(1,571 Views)

I just checked new NI-488.2 v3.1.1. The problem remains. Is there any way to track status of this bug?

0 Kudos
Message 17 of 18
(1,475 Views)

Hello Sebastian,

 

The CAR ID for this bug is 383583.  When it is fixed we will add a note to the readme as well as post to this forum.

 

Have a great day,

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 18 of 18
(1,468 Views)