Agilent Technologies E4371A Video Gaming Accessories User Manual


 
6 - Language Dictionary
90
cfSetDigitalConfig
Syntax
int cfSetDigitalConfig(CF_HANDLE server, int bitnum, CF_EXT_SIGNAL
signal, CF_POLARITY polarity, CF_REFERENCE reference);
Description
NOTE: The Agilent MCCD Configuration screens (see chapter 3) control the availability of
cfSetDigitalConfig. If this menu item is set to lock out programmable access,
cfSetDigitalConfig will return the error CF_ACCESS_DENIED
Sets the operation of any of the 16 pins of the digital I/O port. Digital I/O bits can be configured
as independent chassis-referenced bits that can be used as inputs or outputs, or as isolated output
pairs. When configured as isolated output pairs, each even numbered bit and the odd numbered
bit that immediately follows it form a pair. For example, Bit 0 and bit 1 form a pair, bit 2 and bit
3 form a pair, etc., up to a maximum of 8 pairs.
The bitnum argument specifies the bit to be programmed and is a number between 0 and 15. 0
represents the least significant bit in the digital word that is set and read by cfSetDigitalPort and
cfGetDigitalPort. The reference argument sets the configuration of a bit to either
CF_GROUNDED or CF_ISOLATED. Values set by cfSetDigitalConfig are stored in non-
volatile memory and are not affected by the power off or by cfReset.
CF_GROUNDED Operation
In CF_GROUNDED operation, the bit designated by the bitnum argument is configured as an
independent, single-ended chassis-referenced bit that can be used as an input, output, or both
input and output. Each bit must be configured separately in CF_GROUNDED operation.
The polarity of a bit is set using the polarity argument. If the polarity is CF_HIGH_TRUE and
the bit is configured as an output, then a 1 sent to the bit set by cfSetDigitalPort will be output as
a high level at the connector. Likewise, if the bit is configured as an input, a high level at the
connector will be returned as a 1 by cfGetDigitalPort. If the polarity is set to CF_LOW_TRUE,
then the opposite polarity will be used for both output and input. The following table summarizes
the choices for the signal argument in CF_GROUNDED operation:
CF_EXT_FAULT_IN
External Fault input
CF_EXT_FAULT_OUT
External Fault output (has the same logical value as External Fault input)
CF_EXT_INTERLOCK
External Interlock input
CF_EXT_TRIGGER
External Trigger input
CF_DIG_IN
General purpose input
CF_DIG_OUT
General purpose output
CF_DIG_INOUT
General purpose input/output
CF_POWER_FAIL_IN
External Power Fail input
CF_POWER_FAIL_OUT
External Power Fail output. Goes true when a power-fail shutdown
state is saved. Goes false at power-on, cfInitiate(), or cfRestart().
CF_DIG_OUT_AND_NOT_
FAULT_IN
Combines a CF_DIG_OUT function with enabling logic from
CF_EXT_FAULT_IN. When an External Fault Input is true, the
OUTPUT_AND_NOT_FAULT_IN pin is held false.