I can see this isn't exactly a well used forum, but hey, can't hurt to try.
I recently downloaded the PythonLabTools specifically for using the vxi11 classes. The classes are great. The only thing that would be nice is slightly more detailed commenting of expected use for some of the functions. But, I've figured out how to use everything I need without much issue.
So, the reason for the post. I'm trying to figure out what the reason value means from the tuple returned by vxi_11_connection.transaction. It returns (error, reason, results).
If anyone reads this and knows the answer, I'd definitely appreciate it. I tried working my way through the various function calls, and unless I missed something, it appears as though the reason comes several parents above vxi_11_connection.
Hi, James. The fields in this are defined in the VXI-11 standard, so I return them. Normally, all you really need is the error flag. however, if you go to
and download the VXI-11 specifications (which are surprisingly readable) and look in section B.6.4.device_read on page 30 of the vxi-11.pdf file, they discuss the meaning of the fields returned from a read operation.
Hope this helps. Feel free to contact me for any more information. I apologize for the somewhat belated response here. Since no-one has posted a real qustion to the forum before, I had pretty much quit looking!
The short answer to this (which I should have posted, too) is that reason is an inclusive OR of 3 bits.
Bit 2 = END/EOI received,
bit 1 = Terminating Character received
bit 0 = full requested byte count received.
Normally, the reason is likely to be 2, since EOI normally terminates a read. However, if you are using terminating characters, or reading indeterminately long byte streams into finite sized buffers, you could easily get other bits set.
oops, 'reason' should really normally be 4, not 2. It is bit 2 that is normally set. Sorry.
Thanks for the answer Marcus. Makes sense. I'll let you know if I come up with any other questions.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.