Returns a configuration option currently set for a board. By default, the configuration settings are loaded from the cb.cfg file created by InstaCal. If ignore_instacal() is called first, the configuration settings will be the default values for the board in use. For either case, you can change the current configuration within a running program with set_config().
get_config(info_type, board_num, dev_num, config_item)
info_type (InfoType)
The configuration information for each board is grouped into different categories. This parameter specifies which category you want. Set it to one of the constants listed in the info_type parameter values below.
board_num (int)
The number associated with the board when it was installed with InstaCal or created with create_daq_device().
dev_num (int)
The purpose of the dev_num parameter depends on on the value of the config_item parameter. It can serve as a channel number, an index into the config_item, or it can be ignored. Refer to the config_item parameter values below.
config_item (GlobalInfo, BoardInfo, DigitalInfo, CounterInfo, or ExpansionInfo)
Specifies which configuration item you wish to retrieve. Set it in conjunction with the info_type parameter using one of the constants listed in the config_item parameter values below.
InfoType | Description |
GLOBALINFO | Information about the configuration file. |
BOARDINFO | General information about a board. |
DIGITALINFO | Information about a digital device. |
COUNTERINFO | Information about a counter device. |
EXPANSIONINFO | Information about an expansion device. |
MISCINFO | One of the miscellaneous options for the board. |
info_type | config_item | Description |
GlobalInfo | VERSION | cb.cfg file format; used by the library to determine compatibility. dev_num is ignored. |
NUMBOARDS | Maximum number of boards that can be installed. dev_num is ignored. | |
NUMEXPBOARDS | Maximum number of expansion boards that can be installed. dev_num is ignored. | |
BOARDINFO | ADAIMODE | Analog input mode. dev_num is ignored. |
ADCHANAIMODE | Analog input mode. dev_num indicates the channel number. | |
ADCHANTYPE | Analog input channel type. Use this setting with devices that have configurable input types. dev_num indicates the channel number. | |
ADCSETTLETIME | ADC settling time. dev_num is ignored. | |
ADDATARATE | A/D data rate. dev_num indicates the channel number. | |
ADRES | A/D resolution. dev_num is ignored. | |
ADXFERMODE | Data transfer mode. dev_num is ignored. | |
ADTIMINGMODE | Timing mode. dev_num is ignored. | |
ADTRIGCOUNT | Number of analog input samples to acquire per trigger. dev_num is ignored. | |
ADTRIGSRC | A/D trigger source. dev_num indicates the channel number. | |
BASEADR | Base address of the device. dev_num is ignored. | |
BOARDTYPE | Unique number from 0 to 8000 Hex which describes the type of board installed. dev_num is ignored. | |
CALTABLETYPE | The coefficients table used for calibration. 0 = Factory, 1 = Field. dev_num is either ignored or specifies a base or expansion board. | |
CHANRTDTYPE | RTD sensor type. dev_num indicates the channel number. | |
CHANTCTYPE | Thermocouple sensor type. dev_num indicates the channel number. | |
CINUMDEVS | Number of counter devices. dev_num is ignored. | |
CLOCK | Clock frequency in megahertz (MHz) (40, 10, 8, 6, 5, 4, 3, 2, 1) or 0 for not supported. dev_num is ignored. | |
CTRTRIGCOUNT | Number of counter samples to acquire per trigger. dev_num is ignored. | |
DACFORCESENSE | Remote sensing state of an analog output channel (ENABLED or DISABLED.) dev_num indicates the channel number. | |
DACRANGE | Analog output voltage range. dev_num is ignored. | |
DACRES | D/A resolution. dev_num is ignored. | |
DACSTARTUP | Configuration register STARTUP bit setting. dev_num indicates the channel number. Refer to the Notes section below for additional information. | |
DACTRIGCOUNT | Number of analog output samples to acquire per trigger. dev_num is ignored. | |
DACUPDATEMODE | Update mode for a digital-to-analog converter (DAC). dev_num is ignored. Refer to the Notes section below for additional information. | |
DETECTOPENTC | Open thermocouple detection setting. 0 = disabled, 1 = enabled. dev_num is either ignored or specifies a base or expansion board; refer to device-specific information. | |
DINUMDEVS | Number of digital devices. dev_num is ignored. | |
DISOFILTER | AC filter setting. 0 = disabled, 1 = enabled. dev_num is the bit number. | |
DITRIGCOUNT | Number of digital input samples to acquire per trigger. dev_num is ignored. | |
DMACHAN | DMA channel — 0, 1, or 3. dev_num is ignored. | |
DOTRIGCOUNT | Number of digital output samples to generate per trigger. dev_num is ignored. | |
DTBOARD | Board number of the connected DT board. dev_num is ignored. | |
EXTCLKTYPE | External clock type. dev_num is ignored. | |
EXTINPACEREDGE | Input scan clock edge. dev_num is ignored. | |
EXTOUTPACEREDGE | Output scan clock edge. dev_num is ignored. | |
INPUTPACEROUT | Input pacer clock state. dev_num is ignored. | |
INTEDGE | Interrupt edge. 0 = rising, 1 = falling. dev_num is ignored. | |
INTLEVEL | Interrupt level. 0 for none, or 1 to 15. dev_num is ignored. | |
NETCONNECTCODE | Code used to connect with a device over a network connection. dev_num is ignored. | |
NETIOTIMEOUT | Amount of time (in milliseconds) to wait for a WEB device to acknowledge a command or query sent to the device over a network connection. If no acknowledgement is received in this time a timeout occurs. dev_num is ignored. | |
NUMADCHANS | Number of A/D channels dev_num is ignored. | |
NUMDACHANS | Number of D/A channels. dev_num is ignored. | |
NUMIOPORTS | Number of I/O ports used by the device. dev_num is ignored. | |
NUMTEMPCHANS | Number of temperature channels. dev_num is ignored. | |
PANID | Personal Area Network (PAN) identifier for a USB device that supports wireless communication. dev_num is ignored. | |
PATTERNTRIGPORT | Pattern trigger port. dev_num is ignored. | |
RANGE | Selected voltage range. dev_num is ignored. For switch selectable gains only. If the selected A/D board does not have a programmable gain feature, this parameter returns the range as defined by the install settings. | |
RFCHANNEL | RF channel number used to transmit/receive data by a USB device that supports wireless communication. dev_num is ignored. | |
RSS | Received signal strength in dBm of a remote device. dev_num is ignored. | |
SERIALNUM | Custom serial number assigned by a user to a USB device. To retrieve the factory serial number, use get_config_string() with DEVUNIQUEID. dev_num is ignored. | |
SYNCMODE | Simultaneous mode setting. 0 = master, 1 = slave. dev_num is ignored. | |
TEMPAVG | Number of temperature samples per average. dev_num is ignored. | |
TEMPSCALE | Temperature scale. dev_num is ignored. | |
TEMPREJFREQ | Temperature rejection frequency. dev_num is either ignored or specifies a base or expansion board. | |
TERMCOUNTSTATBIT | Terminal count output status for a specified bit. dev_num indicates the bit number. 0 = enabled, 1 = disabled. | |
WAITSTATE | Wait State jumper setting. 0 = disabled, 1 = enabled. dev_num is ignored. | |
USESEXPS | Expansion board support. TRUE/FALSE value is returned. dev_num is ignored. | |
USERDEVIDNUM | User-configured string that identifies a USB device. dev_num is ignored. | |
DIGITALINFO | DEVTYPE | Device Type – AUXPORT, FIRSTPORTA, and so on. dev_num indicates a zero-based index that specifies the device. |
CONFIG | Current configuration INPUT or OUTPUT. dev_num indicates a zero-based index that specifies the device. | |
NUMBITS | Number of bits in the port. dev_num indicates a zero-based index that specifies the device. | |
CURVAL | Current value of outputs. dev_num indicates a zero-based index that specifies the device. | |
DISABLEDIRCHECK | The direction check setting for a specified port or bit when calling d_out(), d_bit_out(), and d_out_array(). 0 = enabled, 1 = disabled. | |
INMASK | Bit configuration of the specified port. Any bits that return a value of 1 are configured for input. Refer to the Notes section below for additional information about using the INMASK option. dev_num indicates a zero-based index that specifies the device. | |
OUTMASK | Bit configuration of the specified port. Any bits that return a value of 1 are configured for output. Refer to the Notes section below for additional information about using the OUTMASK option. dev_num indicates a zero-based index that specifies the device. | |
COUNTERINFO | CTRNUM | Counter number associated with the given dev_num. |
CTRTYPE | Counter type, where: 1 = 8254, 2 = 9513, 3 = 8536, 4 = 7266, 5 = event counter, 6 = scan counter, 7 = timer counter, 8 = quadrature counter, and 9 = pulse counter. dev_num indicates a zero-based index that specifies the device. | |
EXPANSIONINFO | BOARDTYPE | Board type; refer to the Measurement Computing Device IDs topic. |
MUXADCHAN1 | First A/D channel connected to the EXP board. | |
MUXADCHAN2 | Second A/D channel connected to the EXP board. | |
RANGE1 | Range (gain) of the low 16 channels. | |
RANGE2 | Range (gain) of the high 16 channels. | |
CJCCHAN | A/D channel connected to the CJC. | |
THERMTYPE | Sensor type. Use one of the sensor types listed below. 1 = J, 2 = K, 3 = T, 4 = E, 5 = R, 6 = S, 7 = B, 257 = Platinum .00392, 258 = Platinum .00391, 259 = Platinum .00385, 260 = Copper .00427, 261 = Nickel/Iron .00581, 262 = Nickel/Iron .00527 | |
NUMEXPCHANS | Number of channels on the expansion board. dev_num is ignored. | |
PARENTBOARD | Board number of the base A/D board. dev_num is ignored. |