Changes board configuration options at runtime. 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().
set_config(info_type, board_num, dev_num, config_item, config_val)
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
Specifies which configuration item you wish to set. Set it in conjunction with the info_type parameter using the config_item parameter values table.
config_item (BoardInfo, DigitalInfo, CounterInfo, or ExpansionInfo)
The value to set the specified configuration item to.
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 | ADCHANTYPE | Analog input channel type. Use this setting with devices that have configurable input types. dev_num indicates the channel number. Set config_val to one of the AiChanType enum values. |
ADCSETTLETIME | ADC settling time. dev_num is ignored. Set config_val to one of the SettleTime enum values. | |
ADDATARATE | A/D data rate. dev_num indicates the channel number. | |
ADTIMINGMODE | ADC timing mode. dev_num is ignored. Set config_val to one of the AdTimingMode enum values. | |
ADTRIGCOUNT | ADC trigger count. dev_num is ignored. For use with the a_in_scan RETRIGMODE option to set up repetitive trigger events | |
ADXFERMODE | A/D trigger source. dev_num indicates the channel number. Set config_val to 0, 1, 2, or 3. | |
ADTRIGSRC | Sets the data transfer mode to either kernel mode (default) or user mode. dev_num is ignored. Set config_val to one of the XferMode enum values. | |
BASEADR | Base address of the device. dev_num is ignored. | |
CALTABLETYPE | Coefficients table used for calibration. dev_num is ignored. Set config_val to one of the CalTable enum values. | |
CALOUTPUT | Cal pin voltage on supported USB devices. dev_num is ignored. | |
CHANRTDTYPE | RTD sensor type. dev_num indicates the channel number. Set config_val to one of the PlatinumRTDType enum values. | |
CHANTCTYPE | Thermocouple sensor type. dev_num indicates the channel number. dev_num indicates the channel number. Set config_val to one of the TcType enum values. | |
CLOCK | Clock frequency in megahertz (MHz) (40, 10, 8, 6, 5, 4, 3, 2, 1) or 0 for not supported. dev_num indicates the channel number. Set config_val to one of the following values: 1, 4, 6 or 10. | |
CTRTRIGCOUNT | Number of counter samples to acquire per trigger. dev_num is ignored. For use with the c_in_scan() RETRIGMODE option to set up repetitive trigger events. | |
DACFORCESENSE | Enables or disables remote sensing of an analog output channel. dev_num indicates the channel number. Set config_val to one of the State enum values. | |
DACRANGE | D/A range code. dev_num indicates the channel number. Refer to board-specific information for a list of the supported ranges. | |
DACSETTLETIME | DAC settling time. dev_num is ignored. | |
DACSTARTUP | Configuration register STARTUP bit setting. dev_num is ignored. Set to 0 or 1 to enable/disable the storing of digital-to-analog converter (DAC) startup values. Current or last stored values are written to the DACs each time the board is powered up. | |
DACTRIGCOUNT | DAC trigger count. dev_num is ignored. For use with the a_out_scan()RETRIGMODE option to set up repetitive trigger events. | |
DACUPDATECMD | Update mode for a digital-to-analog converter (DAC). dev_num is ignored. | |
DACUPDATEMODE | Update mode for a digital-to-analog converter (DAC). dev_num is ignored. Set config_val to one of the DACUpdate enum values. | |
DETECTOPENTC | Open thermocouple detection setting. dev_num is either ignored or specifies a base or expansion board; refer to device-specific information. Set config_val to one of the State enum values. | |
DIDEBOUNCESTATE | State of the digital inputs when debounce timing is set. dev_num is ignored. | |
DIDEBOUNCESTATE | State of the digital inputs when debounce timing is set. dev_num is ignored. | |
DISOFILTER | AC filter setting. 0 = disable, 1 = enable. dev_num is the bit number. Set config_val to one of the State enum values. | |
DITRIGCOUNT | Number of digital input samples to acquire per trigger. dev_num is ignored. | |
DMACHAN | DMA channel. dev_num is ignored. | |
DOTRIGCOUNT | Number of digital output samples to generate per trigger. dev_num is ignored. | |
EXTCLKTYPE | External clock type. dev_num is ignored. Set config_val to one of the ExtClockType enum values. | |
EXTINPACEREDGE | The input pacer clock edge. dev_num is ignored. Set config_val to one of the ExtPacerEdgeType enum values. | |
EXTOUTPACEREDGE | The output pacer clock edge. dev_num is ignored. Set config_val to one of the ExtPacerEdgeType enum values. | |
INPUTPACEROUT | Input pacer clock state. dev_num is ignored. Set config_val to one of the State enum values. When enabled, the input clock is set for output. | |
INTEDGE | Interrupt edge. 0 = rising, 1 = falling. dev_num is ignored. | |
INTLEVEL | Interrupt level. dev_num is ignored. | |
HIDELOGINDLG | Enables or disables the Device Login dialog. dev_num is ignored. Set config_val to one of the State enum values. When disabled, the device_login() function must be used to log in to a device session. | |
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 then a timeout occurs. dev_num is ignored. | |
NUMADCHANS | Number of A/D channels dev_num is ignored. | |
OUTPUTPACEROUT | Enables or disables the output pacer clock signal. When enabled, the output clock is set for output. | |
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. Use this setting in conjunction with one of these config_val settings:
| |
RANGE | Selected voltage range. Refer to board-specific information for the ranges supported by a device. dev_num is ignored. | |
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 | User-configured identifier of a supported USB device. dev_num is ignored. | |
SYNCMODE | Simultaneous mode setting. dev_num is ignored. Set config_val to either 0 (master) or 1 (slave). | |
TEMPAVG | Number of temperature samples per average. Set config_val to one of the following values:
| |
TEMPSCALE | Temperature scale. dev_num is ignored. Set config_val to one of the following values:
| |
TEMPREJFREQ | Rejection frequency. Use this setting in conjunction with these settings:
dev_num:
| |
TERMCOUNTSTATBIT | Terminal count output status. dev_num indicates the bit number. Set config_val to one of the State enum values. | |
WAITSTATE | Wait State jumper setting. dev_num is ignored. Set config_val to one of the State enum values. | |
DIGITALINFO | DISABLEDIRCHECK | The direction check setting for a specified port or bit when calling d_out(), d_bit_out(), and d_out_array(). Set config_val to one of the following values:
|
EXPANSIONINFO | 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 | Thermocouple type. |