GX5296, File.
Returns the specified channel Tri-State termination voltage.
GtDio6xChannelGetTriStateTerminationVoltage (nHandle, nChannel, pdVoltage, pnStatus)
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. ● File handle is used when communicating with a file. The File handle session identifier is returned by calling GtDio6xFileOpen. |
nChannel |
SHORT |
Used to specify the channel to Get. This parameter is 0-based and refers to any channel in the Domain.Not supported by auxiliary channels. |
pdVoltage |
PDOUBLE |
Returned Tri-State termination voltage. The specified termination voltage is the same voltage that is used by the input active load commuting voltage.Voltage range is -2V to +7V. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
GX5296:
The channel Tri-State termination mode, is used to generate a third voltage level whenever the channel’s driver state is Off (see table below).
The active load and the termination voltage mode are mutually exclusive, if the termination voltage mode was enabled, then regardless of the active load state (enabled or disabled) when the driver goes into HiZ the source and sink are automatically programmed to zero mA.
If the termination voltage mode was disabled and the active load state was enabled then when the driver goes into HiZ the source and sink are active as a function of the input voltage.
Note: The specified termination voltage is the same voltage that is used by the input active load commutating voltage.
Channels termination voltage can be read back and set dynamically at any time even while the DIO is running mode.
The termination voltage enabled only when the specified channel’s driver state is Off. The following Opcodes will activate the termination voltage (if it was enabled through the driver prior to running):
Opcode |
Description |
Driver State |
Drive Level |
Comparator Expect |
Invert Code |
H |
Expect High, Don’t Drive |
Off |
X |
>ViH |
Expect Valid Low ‘L’ |
L |
Expect Low, Don’t Drive |
Off |
X |
<ViL |
Expect Valid High ‘H’ |
Z |
Tristate (Disabled) |
Off |
N/A |
None |
Disable Channel ‘Z’ |
V |
Expect Valid Level |
Off |
X |
>ViH OR <ViL |
Expect Invalid ‘B’ |
B |
Expect Invalid Level |
Off |
X |
<ViH AND >ViL |
Expect Valid ‘V’ |
C |
Collect CRC |
Off |
X |
None |
Collect CRC ‘C’ |
The following example set channels 0 and 2 termination voltage to 3.0V, and returns channel 0 settings:
SHORT nMode;
LONG alChannelList[2];
DOUBLE dVoltage;
// Fill channel array
alChannelList[0] = 0;
alChannelList[1] = 2;
GtDio6xChannelSetTriStateTerminationVoltage (nHandle, 2, alChannelList, 3.0, &nStatus);
GtDio6xChannelGetTriStateTerminationVoltage (nHandle, 0, & dVoltage, &nStatus);
GtDio6xChannelSetTriStateTerminationMode, GtDio6xChannelSetTriStateTerminationVoltage, GtDio6xGetErrorString