DioLevelShifterGetVoltage

Applies To

GC5050, GX5050, GX5150

Purpose

Returns the group Low level, High level and Threshold voltage.

Syntax

DioLevelShifterGetVoltage (nHandle, nGroup, pdLowVoltage, pdHighVoltage, pdTresholdVoltage, pnStatus)

Parameters

Name

Type

Comments

nHandle

SHORT

Board handle.

nGroup

SHORT

Group number can be as follows:

  0       Group A, I/O pins 1 through 16.

  1       Group B, I/O pins 17 through 32.

pdLowVoltage

LPDUOBLE

Returned low voltage setting.

pdHighVoltage

LPDUOBLE

Returned high voltage setting.

pdTresholdVoltage

LPDUOBLE

Returned threshold voltage setting.

pnStatus

PSHORT

Returned status: 0 on success, negative number on failure.

Comments

See DioLevelShifterSetVoltage for details on Low level, High level and Threshold voltage ranges.

Example

The following example returns the voltages settings (Low level voltage, High level voltage and Threshold voltage) for group A from a board specified by the board handle:

 

SHORT   nStatus;

DOUBLE   dLowVoltage, dHighVoltage, dTresholdVoltage;

DioLevelShifterGetVoltage (nHandle, 0, &dLowVoltage, &dHighVoltage, &dTresholdVoltage, pnStatus);

 

See Also

DioLevelShifterSetVoltage, DioLevelShifterSetByLogicFamily, DioGetErrorString