LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Byte count for read sensitivity on SRS SR830

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

0 Kudos
Message 1 of 2
(2,665 Views)

Hi mziffer,

 

use 10000…

 

Background:

VISARead will stop reading for those reasons:

  1. an error (including timeout) occurs
  2. the number of bytes to read is available
  3. the TermChar (if enabled) has been received

 

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,656 Views)