get_config()

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().

Prototype

get_config(info_type, board_num, dev_num, config_item)

Parameters

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.

Returns

info_type parameter values

InfoTypeDescription
GLOBALINFOInformation about the configuration file.
BOARDINFOGeneral information about a board.
DIGITALINFOInformation about a digital device.
COUNTERINFOInformation about a counter device.
EXPANSIONINFOInformation about an expansion device.
MISCINFOOne of the miscellaneous options for the board.

config_item parameter values

info_type config_itemDescription
GlobalInfoVERSIONcb.cfg file format; used by the library to determine compatibility.

dev_num is ignored.
NUMBOARDSMaximum number of boards that can be installed.

dev_num is ignored.
NUMEXPBOARDSMaximum number of expansion boards that can be installed.

dev_num is ignored.
BOARDINFOADAIMODEAnalog input mode.

dev_num is ignored.
ADCHANAIMODEAnalog input mode.

dev_num indicates the channel number.
ADCHANTYPEAnalog input channel type. Use this setting with devices that have configurable input types.

dev_num indicates the channel number.
ADCSETTLETIMEADC settling time.

dev_num is ignored.
ADDATARATEA/D data rate.

dev_num indicates the channel number.
ADRESA/D resolution.

dev_num is ignored.
ADXFERMODEData transfer mode.

dev_num is ignored.
ADTIMINGMODETiming mode.

dev_num is ignored.
ADTRIGCOUNTNumber of analog input samples to acquire per trigger.

dev_num is ignored.
ADTRIGSRCA/D trigger source.

dev_num indicates the channel number.
BASEADRBase address of the device.

dev_num is ignored.
BOARDTYPEUnique number from 0 to 8000 Hex which describes the type of board installed.

dev_num is ignored.
CALTABLETYPEThe coefficients table used for calibration. 0 = Factory, 1 = Field.

dev_num is either ignored or specifies a base or expansion board.
CHANRTDTYPERTD sensor type.

dev_num indicates the channel number.
CHANTCTYPEThermocouple sensor type.

dev_num indicates the channel number.
CINUMDEVSNumber of counter devices.

dev_num is ignored.
CLOCKClock frequency in megahertz (MHz) (40, 10, 8, 6, 5, 4, 3, 2, 1) or 0 for not supported.

dev_num is ignored.
CTRTRIGCOUNTNumber of counter samples to acquire per trigger.

dev_num is ignored.
DACFORCESENSERemote sensing state of an analog output channel (ENABLED or DISABLED.)

dev_num indicates the channel number.
DACRANGEAnalog output voltage range.

dev_num is ignored.
DACRESD/A resolution.

dev_num is ignored.
DACSTARTUPConfiguration register STARTUP bit setting.

dev_num indicates the channel number.

Refer to the Notes section below for additional information.
DACTRIGCOUNTNumber of analog output samples to acquire per trigger.

dev_num is ignored.
DACUPDATEMODEUpdate mode for a digital-to-analog converter (DAC).

dev_num is ignored.

Refer to the Notes section below for additional information.
DETECTOPENTCOpen thermocouple detection setting. 0 = disabled, 1 = enabled.

dev_num is either ignored or specifies a base or expansion board; refer to device-specific information.
DINUMDEVSNumber of digital devices.

dev_num is ignored.
DISOFILTERAC filter setting. 0 = disabled, 1 = enabled.

dev_num is the bit number.
DITRIGCOUNTNumber of digital input samples to acquire per trigger.

dev_num is ignored.
DMACHANDMA channel — 0, 1, or 3.

dev_num is ignored.
DOTRIGCOUNTNumber of digital output samples to generate per trigger.

dev_num is ignored.
DTBOARDBoard number of the connected DT board.

dev_num is ignored.
EXTCLKTYPEExternal clock type.

dev_num is ignored.
EXTINPACEREDGEInput scan clock edge.

dev_num is ignored.
EXTOUTPACEREDGEOutput scan clock edge.

dev_num is ignored.
INPUTPACEROUTInput pacer clock state.

dev_num is ignored.
INTEDGEInterrupt edge. 0 = rising, 1 = falling.

dev_num is ignored.
INTLEVELInterrupt level. 0 for none, or 1 to 15.

dev_num is ignored.
NETCONNECTCODECode used to connect with a device over a network connection.

dev_num is ignored.
NETIOTIMEOUTAmount 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.
NUMADCHANSNumber of A/D channels

dev_num is ignored.
NUMDACHANSNumber of D/A channels.

dev_num is ignored.
NUMIOPORTSNumber of I/O ports used by the device.

dev_num is ignored.
NUMTEMPCHANSNumber of temperature channels.

dev_num is ignored.
PANIDPersonal Area Network (PAN) identifier for a USB device that supports wireless communication.

dev_num is ignored.
PATTERNTRIGPORTPattern trigger port.

dev_num is ignored.
RANGESelected 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.
RFCHANNELRF channel number used to transmit/receive data by a USB device that supports wireless communication.

dev_num is ignored.
RSSReceived signal strength in dBm of a remote device.

dev_num is ignored.
SERIALNUMCustom 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.
SYNCMODESimultaneous mode setting. 0 = master, 1 = slave.

dev_num is ignored.
TEMPAVGNumber of temperature samples per average.

dev_num is ignored.
TEMPSCALETemperature scale.

dev_num is ignored.
TEMPREJFREQTemperature rejection frequency.

dev_num is either ignored or specifies a base or expansion board.
TERMCOUNTSTATBITTerminal count output status for a specified bit.

dev_num indicates the bit number. 0 = enabled, 1 = disabled.
WAITSTATEWait State jumper setting. 0 = disabled, 1 = enabled.

dev_num is ignored.
USESEXPSExpansion board support. TRUE/FALSE value is returned.

dev_num is ignored.
USERDEVIDNUMUser-configured string that identifies a USB device.

dev_num is ignored.
DIGITALINFODEVTYPEDevice Type – AUXPORT, FIRSTPORTA, and so on.

dev_num indicates a zero-based index that specifies the device.
CONFIGCurrent configuration INPUT or OUTPUT.

dev_num indicates a zero-based index that specifies the device.
NUMBITSNumber of bits in the port.

dev_num indicates a zero-based index that specifies the device.
CURVALCurrent value of outputs.

dev_num indicates a zero-based index that specifies the device.
DISABLEDIRCHECKThe direction check setting for a specified port or bit when calling d_out(), d_bit_out(), and d_out_array(). 0 = enabled, 1 = disabled.
INMASKBit 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.
OUTMASKBit 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.
COUNTERINFOCTRNUMCounter number associated with the given dev_num.
CTRTYPECounter 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.
EXPANSIONINFOBOARDTYPEBoard type; refer to the Measurement Computing Device IDs topic.
MUXADCHAN1First A/D channel connected to the EXP board.
MUXADCHAN2Second A/D channel connected to the EXP board.
RANGE1Range (gain) of the low 16 channels.
RANGE2Range (gain) of the high 16 channels.
CJCCHANA/D channel connected to the CJC.
THERMTYPESensor 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
NUMEXPCHANSNumber of channels on the expansion board.

dev_num is ignored.
PARENTBOARDBoard number of the base A/D board.

dev_num is ignored.

Notes