IviPwrMeter_ConfigureMeasurement
IviPwrMeterBase Capability Group
C Function Prototype
ViStatus IviPwrMeter_ConfigureMeasurement (ViSession vi, ViInt32 operator, ViConstString operand1, ViConstString operand2);
Purpose
This function configures the instrument to take single or dual channel measurements.
For single channel measurements, this function enables the channel specified by Operand1 and disables all other channels. The result returned by the Fetch or Read functions is the measurement taken at the channel specified by the Operand1 parameter. Although, the driver measures the power in Watts, the result is converted to the same unit the IVIPWRMETER_ATTR_UNITS attribute.
For dual channel measurements, this function enables the channels specified by the Operand1 and Operand2 parameters and disables all other channels. The result returned by the Fetch or Read functions is the result of the specified math operation applied to the measurements on the channels specified by Operand1 and Operand2.
Although, the math operation is performed on the measured values in Watts, the result is converted to the appropriate units depending on the value of the IVIPWRMETER_ATTR_UNITS attribute and the value of the Operator.
For Difference and Sum operations, the resulting units is the same as the IVIPWRMETER_ATTR_UNITS attribute.
For Quotient operations, the resulting units are in dB, except when IVIPWRMETER_ATTR_UNITS attribute is set to Watts. When set to Watts, the resulting measurement is without units.
Parameters
Name | Type | Description |
---|---|---|
vi | ViSession | The ViSession handle that you obtain from the IviPwrMeter_init or IviPwrMeter_InitWithOptions function. The handle identifies a particular instrument session. Default Value: None |
operator | ViInt32 | The math function applied to the operands.
To configure the power meter to take single channel measurements, pass None as the Operator value. To configure the power meter to take simultaneous dual channel measurements, pass one of the other defined math operators as the Operator value. Valid Values: IVIPWRMETER_VAL_NONE (No Operator) - Take a single channel measurement. Return the measured value for Operand1. Operand2 is ignored. IVIPWRMETER_VAL_DIFFERENCE (Difference) - Subtract the power measured on Operand2 from the power measured on Operand1. IVIPWRMETER_VAL_SUM (Sum) - Add the power measured on Operand2 to the power measured on Operand1. IVIPWRMETER_VAL_QUOTIENT (Quotient) - Divide the power measured on Operand1 by the power measured on Operand2. Default Value: IVIPWRMETER_VAL_DIFFERENCE (Difference) |
operand1 | ViConstString | The name of the channel from which the value for the first operand of the math operator is measured.
Default Value: "" |
operand2 | ViConstString | The name of the channel from which the value for the second operand of the math operator is measured.
Default Value: "" |