GX5296, GX5961, GX5964, File
Sets the specified channels range input constant current commutating voltage.
GtDio6xChannelSetSenseLoadCommutatingVoltage (nHandle, lChannelListArraySize, palChannelListArray, dVComHi, dVComLo, 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. |
palChannelListArrary |
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.GX5961: Each GX5961 board has 4 fully programmable auxiliary channels, and 8 TTL I/O channels. First 4 auxiliary channels may use all the Pin Electronics API.GX5964: Does not have Auxiliary channels. |
dVComHi |
DOUBLE |
Sets the input active load sink and source currents high commutating voltage value.GX5961/GX5964: voltage can be set from -16V to +16V.GX5296: Only one commutating voltage, voltage can be set from -2V to +7V. |
dVComLo |
DOUBLE |
Sets the input active load sink and source currents low commutating GX5961/GX5964: Voltages value, voltage can be set from -16V to +16V.GX5926: Not used, only dVComHi is used. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
Each channel has a constant current source and sink load currents and a corresponding voltage clamp that can be set and enabled programmatically. The constant current source and sink load currents are enabled only when the specified channel’s driver state is Off. The following Opcodes will activate the active load (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’ |
Each channel has an independent load with the following capabilities:
Channels’ Input constant source and sink currents up to 24 mA GtDio6xSetSenseLoadLoadCurrent function.
Maintain high impedance over a wide voltage.
Separate high and low commutating voltages – GtDio6xSetSenseLoadCommutatingVoltage function.
Channels’ Input Resistive load options - GtDio6xSetSenseLoadResistance function.
With independent high and low commutating voltages, the source and sink currents each have their own threshold voltage. If the voltage on the input, when the load is activated, is between the two commutating voltages, the load will remain in a high impedance state.
Channels input constant current commutating voltage can be read back and set dynamically at any time even while the DIO is running mode.
GX5961/GX5964:
Each channel has a split Load, with independent high and low commutating voltages, the source and sink currents each have their own threshold voltage.
If the voltage on the input when the load is activated is between the two commutating voltages, the load will remain in a high impedance state.
If the voltage on the input when the load is activated is below dVComLo, the load will source the previously programmed source current.
If the voltage on the input when the load is activated is above dVComHi, the load will sink the previously programmed source current.
GX5926:
Each channel current load will provide a constant current sink when the input voltage is above the specified commutating voltage (dVComHi), and will provide a constant current source when the input voltage is below the specified commutating voltage (dVComHi). The constant current source and sink values can be set from 0mA to 24mA with 0.3662 μA of resolution. The active load and the termination voltage mode are mutually exclusive, if the termination voltage mode was enabled (GtDio6xChannelSetTriStateTerminationVoltage API), 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.
The following example sets channels 0 and 2 sense load commutating voltages to +2.0V and -1.0V, and returns channel 0 2 sense load commutating voltages:
DOUBLE dVComHi, dVComlo;
SHORT nStatus;
LONG alChannelList[2];
// Fill channel array
alChannelList[0] = 0;
alChannelList[1] = 2;
GtDio6xChannelSetSenseLoadCommutatingVoltage(nHandle, 2, alChannelList, 2.0, -1.0, &nStatus);
GtDio6xChannelGetSenseLoadCommutatingVoltage(nHandle, 0, &dVComHi, &dVComlo, &nStatus);
GtDio6xChannelSetSenseLevels, GtDio6xChannelSetPmuForcedCurrentCommutatingVoltage, GtDio6xChannelSetPmuForcedCurrent, GtDio6xChannelSetSenseLoadResistance, GtDio6xChannelSetSenseLoadState, GtDio6xGetErrorString