01-30-2018 02:25 AM
Hi,
I am using the VISA sub vi's for the Stanford Research Systems SR830 that I downloaded through the NI vi finder in MAX, and I had a very amateur question about editing some of the sub vi's. I want to edit one of the sub vi's to read the sensitivity on the SR830 using the SENS? command. I noticed that for different commands where "VISA Read" is used in the sub vi's, different byte counts are wired (as constants) to the "VISA Read" vi. For instance, in the "Read (All Parameters)" vi for the SR830, a byte count of 10000 is wired to "VISA Read". In this case the SNAP? command is being sent to the SR 830. However in the "Query Error Status" vi for the SR830, a byte count of only 20 is wired to "VISA Read", when the ERRS? command is being sent to the SR830. I'm wondering how to know what byte count to use for a command that is not in any of these examples (like SENS?). I've had issues in the past using the SENS? command in other vis where occasionally I get back the wrong value from the SR830, which messes up some vi's I have written to do autoranging functions. I'm not sure if this is related to using the wrong byte count but it is one of my suspicions so I wanted to ask for help. Any help would be appreciated, thanks.
Mark
01-30-2018 02:43 AM - edited 01-30-2018 02:44 AM
Hi mziffer,
use 10000…
Background:
VISARead will stop reading for those reasons:
In your case the 3rd option applies: there has been a TermChar configured and by wiring a high number of bytes to read you simply wait for that TermChar!