DioGetInputThresholdVoltages

Applies To

GX5055, GX5295, File

Purpose

Returns the channel input low and high threshold voltages.

Syntax

DioGetInputThresholdVoltages (nHandle, nChannel, pdHiLevel, pdLoLevel, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
DIO Master board handle, Board handle or File board handle.
nChannel
SHORT
If Board Handle was passed:
Channel number in the DIO board, each board has 32 I/O channels, I/O channels number range is 0-31.
GX5295: Each DIO board has 4 Auxiliary channels number range is 0-3.
If Master Board Handle was supposed:
Channel number in the DIO domain, each DIO board adds 32 I/O channels, I/O channels number range is 0-991 (1 master and 30 slaves).
Gx5295: Each DIO board adds 4 Auxiliary channels, Auxiliary channels number range is 0-123 (1 master and 30 slaves).
pdHiLevel
PDOUBLE
GX5055:
Input high voltage threshold, voltage settings and range depends on supply rail voltages see comments for details.
GX5295:
Input high voltage threshold, value can be -2.0V to +7.0V and higher then Input low voltage threshold.
pdLoLevel
PDOUBLE
GX5055:
Input low voltage threshold, voltage settings and range depends on supply rail voltages see comments for details.
GX5295:
Input low voltage threshold, value can be -2.0V to +7.0V and lower then Input high voltage threshold.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

GX5055:

The input voltage can be inside one of the following ranges:

1.    Input voltage is higher than high voltage threshold, input is logic high. Data will be logged as logic high to the input memory and 0 to the invalid logic level input memory.

2.    Input voltage is lower than low voltage threshold, input is logic low. Data will be logged as logic low to the input memory and 0 to the invalid logic level input memory.

3.    Input voltage is higher than low voltage threshold and lower then high voltage threshold, input is invalid. Data will be logged as logic low to the input memory and 1 to the invalid logic level input memory.

Channels input low and high threshold voltages can be read back and set dynamically at any time even while the DIO is running mode.

 Min/Max threshold voltages:

 
Min
Max
pdHiLevel
Low Rail Supply +2V
High Rail Supply -7V
pdLoLevel
Low Rail Supply +2V
High Rail Supply -7V

 

E.g. if high rail supply = 18V and low rail supply = -14V then min high threshold voltage >=-11V and max high threshold voltage <=12V.

GX5295:

The board can only save the input data for all input channels of one of the two input threshold. The user can specify the desired input threshold data to be saved by calling the DioSetupInputDataSource function.

Input data source was set to the low input threshold:

1.  Input voltage is higher than low voltage threshold, input is logic high. Data will be logged as logic high to the input memory.

2.  Input voltage is lower than low voltage threshold, input is logic low. Data will be logged as logic low to the input memory

Input data source was set to the high input threshold:

1.  Input voltage is higher than high voltage threshold, input is logic high. Data will be logged as logic high to the input memory.

2.  Input voltage is lower than high voltage threshold, input is logic low. Data will be logged as logic low to the input memory

Channels input low and high threshold voltages can be read back and set dynamically at any time even while the DIO is running mode.

Example

The following example returns channel 0 input threshold voltages:

 

DOUBLE , pdHiLevel, pdLoLevel;

DioGetInputThresholdVoltages (nHandle, 0, &dHiLevel, &dLoLevel, &nStatus);

 

See Also

DioSetupInputLoadCommutatingVoltage, DioSetupInputLoadResistance, DioSetupInputThresholdVoltages, DioGetErrorString