Sets the specified function and apply the function settings.
GxCalSetFunction (nHandle, pnFunction, pdValue1, pdValue2, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX1034 board. |
pnFunction |
SHORT |
Connected function number (see comments for details):GXCAL_FUNCTION_NOT_CONNECTED: No function connected.GXCAL_FUNCTION_4WIRE: 4-wires resistors is connected.GXCAL_FUNCTION_2WIRE: 2-wires resistors is connected.GXCAL_FUNCTION_POSITIVE_VDC: Positive DC voltage is connected.GXCAL_FUNCTION_NEGATIVE_VDC: Negative DC voltage is connected.GXCAL_FUNCTION_AC: AC voltage is connected.GXCAL_FUNCTION_TTL_CLOCK: TTL clock is connected.GXCAL_FUNCTION_CURRENT_SOURCE: Current source is connectedGXCAL_FUNCTION_MEASURE_VDC: Output voltage measuremnt is is connected.GXCAL_FUNCTION_MEASURE_RESISTANCE: Cutput voltage measuremnt and Current source is connected. |
pdValue1 |
DOUBLE |
See comments. |
pdValue2 |
DOUBLE |
See comments. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Connected function is as follow:
Connected function: 4-wires resistors (GXCAL_FUNCTION_4WIRE):
dValue1: supported values are: 1, 10, 100
There are three 4-wire resistors on-board of 1W, 10W, 100W. Actual measured values are stored in the on-board EEPORM and can be retrieve by calling the GxCalGetFunctionMeasuredValue function.
dValue2: Not Used.
Connected function: 2-wires resistors (GXCAL_FUNCTION_2WIRE):
dValue1: supported values are: 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000.
There are eight 2-wire resistors on-board of 1W, 10W, 100W, 1KW, 10KW, 100KW, 1MW, 10MW. Actual measured values are stored in the on-board EEPORM and can be retrieved by calling the GxCalGetFunctionMeasuredValue function.
dValue2: Not Used.
Connected function: Positive DC voltage (GXCAL_FUNCTION_POSITIVE_VDC):
dValue1: supported values are: 9.0V, 0.9V, 0.09V, 0.009V.
There are four positive DC voltages on-board of 9.0V, 0.9V, 0.09V, 0.009V, actual measured values are stored in the on-board EEPORM and can be retrieved by calling the GxCalGetFunctionMeasuredValue function.
dValue2: Not Used.
Connected function: Negative DC voltage (GXCAL_FUNCTION_NEGATIVE_VDC):
dValue1: supported values are: -9.0V, -0.9V, -0.09V, -0.009V.
There are four negative DC voltages on-board of -9.0V, -0.9V, -0.09V, -0.009V, actual measured values are stored in the on-board EEPORM and can be retrieved by calling the GxCalGetFunctionMeasuredValuefunction.
dValue2: Not Used.
Connected function: AC voltage (GXCAL_FUNCTION_AC):
dValue1: VAC (nominal) voltage supported values are: 3..5VAC, 0.35VAC, 0.035VAC, 0.0035VAC.
There are four AC voltages on-board of 3..5VAC, 0.35VAC, 0.035VAC and 0.0035VAC, actual measured values are stored in the on-board EEPORM and can be retrieved by calling the GxCalGetFunctionMeasuredValue function.
dValue2: VAC frequncy supported values are: 100, 1000, 10000, 100000, 50, 60, 400.
The supported AC frequncies are 100Hz, 1KHz, 10KHz, 100KHz, 50Hz, 60Hz and 400Hz, actual measured values are stored in the on-board EEPORM and can be retrieved by calling the GxCalGetFunctionMeasuredValuefunction.
Connected function: TTL clock (GXCAL_FUNCTION_TTL_CLOCK):
dValue1: TTL clock divider value, supported values are integers 1 through 10000000.
The TTL clock frequancy is set by deviding an on-board 10MHz time base with integer values between 1 and 10e6 with a Duty Cycle of 50%.
dValue2: Not Used.
Connected function: Current Source (GXCAL_FUNCTION_CURRENT_SOURCE):
dValue1: output current settings, range is 0.0A through 0.0199A.
dValue2: Not Used.
Connect the output the board’s current source.
Note: Make sure that there ar noe components in the connected cuircuit that can be damaged by the 20mA (Max) current settings.
Connected function: Output voltage measuremnt (GXCAL_FUNCTION_MEASURE_VDC):
Conrnect the bord’s internal ADC to the ouput connector. Voltage measurements can than be done by calling GxCalMeasure.
dValue1: Not Used.
dValue2: Not Used.
Connected function: Resistance measurement (GXCAL_FUNCTION_MEASURE_RESISTANC):
dValue1: ouput current settings, range is 0.0A through 0.0199A.
dValue2: Not Used.
Connect the outptut the bord’s current source and the internal ADC to the output connector. The use can then measure the output resistance by calling GxCalMeasure function. Calling the function with different output current settings (lower or higher values) can increase the accuracy and stability of the resistance measurements.
Note: Make sure that there are no components in the connected circuit that can be damaged by the 20mA (Max) current settings.
The following example sets the function to be 4-wires resistance of 100:
SHORT nHandle, nStatus;
DOUBLE dValue, dValue1;
GxCalSetFunction (nHandle, GXCAL_FUNCTION_4WIRE, 100, 0, &nStatus);