Device Discovery with the UL
Detecting and creating devices
The API provides functions for detecting and creating USB, Bluetooth, and/or Ethernet devices within the Universal Library without running InstaCal.
- cbGetDaqDeviceInventory() – Detects USB, Bluetooth and/or Ethernet DAQ devices, and returns device descriptors of the detected devices.
- cbGetNetDeviceDescriptor() – Returns the DAQ device descriptor of the ethernet device at the specified IP address or host name.
- cbCreateDaqDevice() – Creates a device object within the Universal Library for the DAQ device specified by the descriptor, and assigns the specified board number to the DAQ device.
- cbGetBoardNumber() – Returns the board number of the specified DAQ device.
- cbIgnoreInstaCal() – Prevents the Universal Library from automatically adding a DAQ device has been stored in the cb.cfg file by InstaCal. This function must be the first Universal Library function invoked in the application.
- cbReleaseDaqDevice() – Removes the specified DAQ device from the Universal Library, and releases all resources associated with that device.
Retrieving and setting device configuration options
The UL API provides functions for retrieving and setting board-level configuration options. If the default configuration is not adequate for your application, and you aren't using InstaCal for board configuration, then you'll need to use these features to change the configuration.
Call cbGetConfig()/cbGetConfigString() to retrieve configuration options. Call cbSetConfig() /cbSetConfigString() to set configuration options.
The following example programs demonstrate how to detect USB, Bluetooth or Ethernet devices:
- DaqDevDiscovery01 – discovers DAQ devices, and assigns board numbers to the detected devices.
- DaqDevDiscovery02 – discovers network DAQ devices, and assigns board numbers to the detected devices. This example allows specification of parameters to allow detection on a different subnet than the host.
Universal Library example programs are installed by default when you install the UL software.