Page 1 of 1

Remote Continuous averaging

Posted: March 1st, 2011, 4:57 am
by karelk
Hi All,

I intend to use the 2400 sourcemeter to measure a tiny current at a fixed voltage of 10V. Noise is an issue, filtering is therefore required.
If I do it manually, I'd set the voltage to 10V, set the device to measure the current (1 microAmp range), and set a moving filter of say 30 samples. The display shows the result I want, a nicely smoothed value.

I'm tired of writing these values down, hence I want to do this remotely (RS232), via an already existing larger Labwindows/CVI application (that controls the rest of a large set-up) but I cannot get the filtering to work.
The application that reads the current may not be loaded too much, hence communication and waiting times should be minimal.
I do it now via multiple ":READ?" commands, and on the display I can see the value nearing the average value. This is too much load for the application.

How can I program the device such that it continuously performs readings, continuously averages the result, and I use a single serial command to read the most recent average result?
Can anyone help with example code, or the steps to follow to obtain the result?

Many thanks!
Karel

Re: Remote Continuous averaging

Posted: March 1st, 2011, 7:13 am
by Dale C
Try using the following SCPI code to invoke the moving average filter of the 2400.
:SENSE:AVERAGE:TCONTROL MOVING
:SENSE:AVERAGE:COUNT 30
:SENSE:AVERAGE:STATE ON
:OUTPUT ON
:READ?
Then each reading with a :READ? is an average of 30 samples.