Jon Sjöstedt Posted February 18, 2011 Report Share Posted February 18, 2011 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.