LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MAV bahavior, when does it assert, unassert?

I have a question regarding the behavior I can expect from the MAV bit in the STB byte. 
I am doing a read, setting the SRE mask so that SRQ is asserted when MAV happens.  I am enabling the service request event and the "wait for RQS" visa tool in labview, which triggers when MAV happens.
So now, on the subsequent read after MAV is asserted, can I assume the ENTIRE message is available?  If not, then a subsequent read may only get part of the message.  Should the MAV bit then still be asserted if there is still part of the message remaining in the buffer?  If so, then I can query in a loop the state of the MAV bit and exit when I have read everything.  If not, how can I tell I have retrieved all of my message?  I see no way to tell how many bytes are in the gpib read buffer using VISA. 

Thanks
David Jenkinson

Message Edited by david_jenkinson on 09-07-2007 05:21 PM

0 Kudos
Message 1 of 3
(2,541 Views)
When doing a read of a 488.2 compliant instrument, EOI will be asserted at the end of a complete message. When doing a VISA Read, you can simply set the number of bytes to read to some high number and the VISA Read will automatically terminate when the EOI is detected. You will then have the complete message.
0 Kudos
Message 2 of 3
(2,517 Views)
So then it sounds like VISA read will always have the complete message if the number you give it to read is greater than what is available.  Simple!

Thanks
0 Kudos
Message 3 of 3
(2,476 Views)