GtDio6xMeasure

Applies To

GX5296, GX5961, GX5964

Purpose

Measures the specified channel's signal.

Syntax

GtDio6xMeasure (nHandle, nChannel, nSignal, pdResult, dMeasurementRate, dOp1, dOp2, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Session identifier:

     Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization.

nChannel
SHORT
Used to specify the channel to Get. This parameter is 0-based and refers to any channel in the Domain. Auxiliary channel numbers begin with 1000.
GX5296: Each GX5296 board has 4 auxiliary channels that support all the Pin Electronics API functions.
GX5961: Each GX5961 board has 4 fully programmable auxiliary channels, and 8 TTL I/O channels. First 4 auxiliary channels may use all the Pin Electronics API.
GX5964: Does not have Auxiliary channels.
nSignal
SHORT
Signal to measure:
GX5960 (GX5961/GX5964):

1.    GTDIO6X_MEAUSRE_TEMP: measures the specified channel junction temperature, units are specified by the dOp1 parameter.

2.      GTDIO6X_CH_IO_VOLTAGE: measures the specified channel I/O voltage in Volts.

3.      GTDIO6X_CH_OUTPUT_CURRENT: measures the specified channel output current in mA.

30. GTDIO6X_VCC: measures the board’s VCC (3.3V) voltage.

31. GTDIO6X_HIGH_RAIL: measure the board’s high voltage supply rail in Volts.

32. GTDIO6X_LOW_RAIL: measure the board’s low voltage supply rail in Volts.

GX5296:

1.    GTDIO6X_CH_TEMP: measures the specified channel junction temperature, units are specified by the dOp1 parameter.

2.    GTDIO6X_CH_IO_VOLTAGE: measures the specified channel I/O voltage.

4.   GTDIO6X_CH_PMU_CURRENT: measures
   the specified channel PMU current in mA.
5. GTDIO6X_CH_PMU_VOLTAGE: measures
   the specified channel’s PMU voltage. The
   channel mode needs to be set to PMU
   Force Current or PMU Force Voltage prior
   to measuring the PMU Current.
pdResult
PDOUBLE
Returned measured signal, units are according to the signal type and optional parameters.
dMeasurementRate
DOUBLE
Sets the reading rate for the measurement in terms of readings per second. A slower rate provides more accurate measurements.
GX5960 (GX5961/GX5964):
Measurement rate can be from 500 measurements/sec (fastest least accurate measurement) down to 1 measurement/sec. The longer the measurement time the more accurate the measurement is.
GX5296:
Measurement rate can be from 10,000 measurements/sec (fastest least accurate measurement) down to 1 measurement/sec. The longer the measurement time the more accurate the measurement is.
NOTE: Temperature measurements are limited to max 500 measurements/sec. Any rate higher than 500 will be set by the driver to 500.
E.g. if the measurement rate was set to 100 then each measurement will be sampled for 10ms.
dOp1
DOUBLE
Optional parameter depends on the signal.
If signal is Temperature, it will specify the Read back temperature units:

0.   GTDIO6X_MEASURE_TEMP_CELSIUS: temperature units in Celsius.

1.   GTDIO6X_MEASURE_TEMP_FAHRENHEIT: temperature units in Fahrenheit.

If signal is other than Temperature, it will specify the number of digits to format the returned value. The number of digits can be 1 to 12.
dOp2
DOUBLE
Optional not used.
pnStatus
PSHORT
Returned status: 0 on success, negative value on failure.

Comments

The function measures the specified channel’s signal.

GX5960 (GX5961/GX5964): The pin electronics rail voltages must be present for this function to operate correctly. Use GtDio6xPowerSetSource to close the power relay.

Example

The following example measures the VCC signal at 10 readings per second and returns the result in degrees Fahrenheit:

 

DOUBLE dResult;

SHORT nStatus;

 

GtDio6xMeasure(nHandle, GTDIO6X_MEASURE_VCC, &dResult, 10, GTDIO6X_MEASURE_TEMP_FAHRENHEIT, 0, &nStatus);

 

See Also

GtDio6xGetErrorString, GtDio6xPowerSetSource