GX5296, File.
Sets the specified channel Tri-State termination voltage.
GtDio6xChannelSetTriStateTerminationVoltage (nHandle, lChannelListArraySize, palChannelListArray, dVoltage, 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. |
lChannelListArraySize |
LONG |
Used to specify the number of channels to set. This parameter should not be greater than the size of palChannelListArray. If GTDIO6X_ALL_DOMAIN is passed in, then the palChannelListArray parameter can be set to NULL and the settings will be applied to all channels in the Domain. |
palChannelListArray |
PLONG |
Array containing channels numbers that will be set by this function, channels numbers are 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. |
dVoltage |
DOUBLE |
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, GtDio6xChannelGetTriStateTerminationVoltage, GtDio6xGetErrorString