Jump to content

denknutson

Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Posts posted by denknutson

  1. QUOTE (Jon Sjöstedt @ Nov 11 2008, 03:34 AM)

    shoneill:

    You're pretty close to the problem that i am thinking of. Your solution work for queries with short data lengths. Problem arises if, for example, a large signal analyser sweep is fetched. Ofcourse one could still set read count to "integer maximum", but the solution is ugly and smells brute force problem solving style.

    To me the ultimate solution would be to read STB over and over again and check the MAV-bit and read more data from the output buffer when MAV is still high. This does not work properly (probably due to problems reading STB and nothing else).

    Guess this post doesnt add much... :)

    The whole idea of polling anything strikes me as an extremely inelegant method. With GPIB, there is ALWAYS a termination character. With 488.2 instruments, it HAS to be EOI. Setting the number of bytes to some arbitrary number has long been an established method. It is certainly much faster than trying to guess the number of bytes and doing some polling. When an instrument has 10 bytes to return, specifying 1000 bytes for the VISA Read has identical behavior to specifying 10.

    For queries that might return large data sets, the instrument will often return a header of known size. This header can be read and the number of bytes in the remaining data can be parsed out. Looking at some of the existing instrument drivers will be of great benefit.

×
×
  • Create New...

Important Information

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