This example program demonstrates device discovery, device property discovery, and saving the new configuration.
Device Discovery:
Device discovery means, to use your MCC device, you don't need to have a configuration file created by InstaCal or have edited a configuration file.Using the library function GetDaqDeviceInventory(), your program can detect any Universal Libary supported devices and use them without the need of InstaCal.You will still need to install the InstaCal software to load the drivers, calibrate, update firmware and perform diagnostics the device.
Device Property Discovery:
Since the device is now being used without being preconfigured in InstaCal, your program will need to be able to read the various settings of the device and change them as needed. Settings such as Single ended vs. Differential inputs for example.
The last step is to save the new configuration to the device so the next time you run your program, you don't have to reconfigure thethe device again. This is demonstrated in the btnSaveConfig button event. You will need to save the data using cbSaveConfig() which is not managedcode, and you will need to provide a file name though after saving the configuration you will not need it.
This program was written for the USB-2408 series and USB-2416 series. These devices have the following per channel settings:
- Voltage or Temperature,
- Differential or Single Ended,
- Data rate,
- Thermocouple type,
- Open TC detection.
There is also a global temperature scale setting or Celcius, Fahrenheit, and Kelvin. This configuration item cannot be saved, it must be saved in a file and loaded.
This program allows you to change the various settings and test the response.
It was created in Visual Basic.NET 2008.
The attached Code or Example is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments.You assume all risks for use of the Code or Example.