GX5055, GX5295, File
Returns the channel operating mode.
DioGetBoardType (nHandle, pnBoardType, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
DIO 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. Auxiliary channels number range is 0-3.If Master Board Handle was passed: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). |
pnMode |
PSHORT |
Channel operating mode are:0. DIO_CHANNEL_MODE_DYNAMIC_IO: default operating mode, channel is in dynamic I/O mode and output is enabled.1. DIO_CHANNEL_MODE_DISABLED: channel’s output is disabled (Tri-State).2. DIO_CHANNEL_MODE_OUTPUT_LOW: channel’s output is set to low; the output low voltage corresponds to the output low voltage settings.3. DIO_CHANNEL_MODE_OUTPUT_HIGH: channel’s output is set to high; the output high voltage corresponds to the output high voltage settings.4. DIO_CHANNEL_MODE_PMU_FORCE_CURRENT: channel’s output is set to PMU (Parametric Measurement Unit) forced current mode. The channel’s forced current is set to zero5. DIO_CHANNEL_MODE_PMU_FORCE_VOLTAGE: channel’s output is set to PMU (Parametric Measurement Unit) forced voltage mode. The channel’s forced voltage is set to zero volts. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
For detail regarding additional setting when set to PMU (Parametric Measurement Unit) forced current and forced voltage mode see DioPmuSetupForcedCurrent and DioPmuSetupForcedVoltage functions.
The following example returns channel 0 operation mode:
SHORT nMode, nStatus;
DioGetChannelMode (nHandle, 0, &nMode, &nStatus);
DioSetupChannelMode, DioPmuSetupForcedCurrent, DioPmuSetupForcedVoltage, DioGetErrorString