Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA read problem

emil_x_1-1743223330177.png

This is my program for sourcing voltage to a bipolar power supply using a lock-in amplifier aux output and to measure the input voltage in the  aux input of the same lock-in amplifier. The marked portion in the image is my code for voltage measurement using the VISA protocol and the commands for SRS 830 Lock-in amplifier. The program in the marked area is to measure the input voltage in the aux input of the lock-in amplifier three times and average its value, unfortunately my average goes wrong since the program is giving some random value in the first iteration and giving the proper value in the next iterations. I haven't done anything other than iterating the measurement program three times and taking the average still the output is showing wrong value even though my lock-in amplifier doesn't have any problems. What could be the reason for the wrong value in the first iteration.?

 

 

0 Kudos
Message 1 of 2
(69 Views)

@emil_x wrote:

This is my program ...


No, that's just a picture! (We cannot debug pictures, even though we see quite a few questionable parts).

0 Kudos
Message 2 of 2
(44 Views)