Jump to content

VISA Event and STB behaives funny


Recommended Posts

Hello all!

I have just started experementing with VISA Events. I have previously done a lot of VISA polled stuff. I have supplied a simple example that can be used to demonstrate that STB is not updated with the expected value until a coresponding event is read off of the event queue.

For those who dont have lv2010 the code does this:

* Setup a VISA session for handling the SRQ-event

* Issue *CLS *ESE 61 and *SRE 52

*Issue '*IDN?;*OPC'

While loop until an error occur:

*Wait for event

*Close event if no error occoured

*Read stb

When executed withput delays, two events are produced, one for MAV set and one for OPC set This makes sense. But if delays are introduced, for example by placing a breakpont before reading the first event, I would expect STB to have both MAV and OPC set, but this is not the case; only one of them are raised (usually MAV). This does not make sense to me. What makes STB return a value that seems to match what the latest event produced, rather than what could be expected to be in the instrument?

Any ideas appreciated!

VISA-Event test-monitor events flow.vi

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.