DioMeasure

Applies To

GX5055, GX5295

Purpose

Measure the specified  signal.

Syntax

DioMeasure (nHandle, nChannel, nSignal, pdResult, nMeasurementRate, dOp1, dOp2, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Board handle.
nChannel
SHORT
GX5055:
Specified channel in the DIO board, channel can be 0-31.
GX5295:
Specified channel in the DIO board to apply the settings:
  • I/O channels: 0-31.
  • Auxiliary channels (Master only): DIO_AUX_CHANNEL_0 (1000) to DIO_AUX_CHANNEL_3 (1003).
nSignal
SHORT
Signal to measure:
GX5055:
0  DIO_CH_TEMP: measures the channel junction temperature, units are specified by the dOp1 parameter.
1  DIO_CH_IO_VOLTAGE: measures the channel I/O voltage in Volts.
2  DIO_CH_OUTPUT_CURRENT: measures the channel output current in mA.
30 DIO_VCC: measures the board’s VCC (3.3V) voltage.
31 DIO_HIGH_RAIL: measure the board’s high voltage supply rail in Volts.
32 DIO_LOW_RAIL: measure the board’s low voltage supply rail in Volts.
GX5295:
0   DIO_CH_TEMP: measures the channel junction temperature, units are specified by the dOp1 parameter.
1   DIO_CH_IO_VOLTAGE: measures the channel I/O voltage.
4.  DIO_CH_PMU_CURRENT: measures the channel’s PMU current in mA.
5.  DIO_CH_PMU_VOLTAGE: measures the channel PMU voltage.
30 DIO_VCC: measures the board’s VCC (3.3V) voltage.
 
pdResult
PDOUBLE
Returned measured signal, units are according to the signal type and optional parameters.
dMeasurementRate
DOUBLE
Measurement rate  can be from 50000 measurements/sec (fastest least accurate measurement) down to 1 measurement/sec. The longer the measurement time the more accurate the measurement is.
E.g. if the measurement rate was set to 100 then each measurement made by the DIO will be sampled for 10ms.
dOp1
DOUBLE
Optional parameter depends on the signal, by default this parameters is 0.
If signal is Temperature, it will specify the Read back temperature units:
 0      DIO_TEMP_CELSIUS: temperature units in Celsius.
 1      DIO_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 number on failure.

Example

The following example measures the temperature of channel 0 in Celsius and set the measurement rate to 100:

 

DOUBLE dResult;

DioMeasure (nHandle, 0, DIO_CH_TEMP, TRUE, DIO_TEMP_CELSIUS, 100, &nStatus);

 

See Also

DioWriteInMemory, DioWriteOutMemory, DioWriteIOMemory, DioReadInMemory, DioReadOutMemory, DioReadIOMemory, DioGetErrorString