NI-DCPower provides two VIs that can be used for taking measurements. The first VI is niDCPower Measure. This VI can be used to get a single voltage or current measurement for only one channel. The second VI is niDCPower Measure Multiple. This VI can be used to get measurements for voltage and current from one or more channels all at the same time.
Measure Multiple offers better performance than niDCPower Measure if both a voltage and current measurement are needed or if measuring multiple channels. However, if you only need a single measurement Measure offers better performance.
The PXI-4130 constantly measures the voltage and current on all channels every 333 µs for a sampling rate of 3 kS/s. The Samples to Average property and the Reset Average Before Measurement property can be used for controlling how these measurements are used and reported back by Measure and Measure Multiple.
The PXI-4130 can average measurement samples to reduce noise and improve sensitivity. The instrument averages a fixed number of samples acquired at a rate of 3 kS/s. You can set the number of samples to average programmatically using the niDCPower Samples to Average property. When one of the measurement VIs is called an averaged measurement will be returned.
The PXI-4130 uses a simple averaging scheme. It is not a moving average. Whenever the instrument collects the fixed number of samples, it produces the average and discards the samples. It then starts acquiring the next set of samples for the next averaged measurement.
Reset Average Before Measurement Property
You can use the Reset Average Before Measurement property to control when the samples that are averaged get acquired.
If the property is set to false, the instrument constantly acquires measurements and averages them. When you call niDCPower Measure or niDCPower Measure Multiple, the last averaged measurement is returned. This means that the samples used to get this average have been acquired before you even called that VI. Use this setting to get the best possible performance since it allows the instrument to acquire samples while your application is busy doing something else.
If the property is set to true, NI-DCPower discards previous samples and previous average, and starts acquiring a new set of samples to average them.
Therefore, to ensure that the measurement returned by niDCPower Measure or niDCPower Measure Multiple is composed of samples taken after you call the VI, set the Reset Average Before Measurement property to true. This is the default setting.
Software Measurement Rate
The software measurement rate is the fastest rate at which an application using NI-DCPower can acquire measurements. This rate is determined by two factors. The first factor is the fixed sampling rate of the PXI-4130, which is 3 kS/s. The second factor is the number of samples to average as set by the niDCPower Samples to Average property. This is the maximum rate at which the following LV loop runs.
Figure 2: Calling the Measure Multiple VI at maximum rate.
The default value of the niDCPower Samples to Average property and the NIDCPOWER_ATTR_SAMPLES_TO_AVERAGE attribute is 10. As expressed in the following equation, the fastest possible software measurement rate is 300 measurements per second using the default value.
If no measurement averaging is used (Samples to Average = 1), the fastest possible software measurement rate is 3,000 measurements per second.
While measuring without averaging yields the fastest measurement rate, noise from the environment (for example, the 50 Hz or 60 Hz noise introduced by cabling) increases measurement uncertainty. Adjust the niDCPower Samples to Average property or the NIDCPOWER_ATTR_SAMPLES_TO_AVERAGE attribute as necessary to optimize the noise performance and measurement rate for your application.
For more information on rejecting noise, please refer to the NI DC Power Supplies and SMUs help file.