
6 - Language Dictionary
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
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,
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 CF_EXT_FAULT_OUT CF_EXT_INTERLOCK CF_EXT_TRIGGER CF_DIG_IN CF_DIG_OUT CF_DIG_INOUT CF_POWER_FAIL_IN CF_POWER_FAIL_OUT
CF_DIG_OUT_AND_NOT_
FAULT_IN
External Fault input
External Fault output (has the same logical value as External Fault input) External Interlock input
External Trigger input General purpose input General purpose output General purpose input/output External Power Fail input
External Power Fail output. Goes true when a
90