Universal Library for Windows®

Download Now Technical Support
Universal Library for Windows®
I/O Library for Measurement Computing Data Acquisition Products
  • Programming API for C®, C++®, C#®, Visual Basic®, and Visual Basic® .NET™ using Visual Studio® and other IDEs
  • Common set of function calls designed to work with most MCC hardware
  • Identical functions for each language
  • Includes 64-bit driver support for Windows® 11/10/8/7/XP (supports Ethernet, USB, WLS, WEB, and most PCI and PCIe boards)
  • Included with MCC DAQ Software
  • Supported Operating Systems: Windows® 11/10/8/7/XP, 32-bit or 64-bit

The Universal Library (UL) for Windows includes programming libraries and components for developing 32-bit and 64-bit applications using Visual Studio® and other programming languages. UL supports Ethernet, USB, WLS, WEB, and most PCI and PCIe data acquisition (DAQ) products from MCC, and simplifies their configuration and operation.


Additional Resources


Is there a license needed to download Universal Library?
Yerzley Oscillograph is requiring me to have DAQ Universal Library. Is the library free to use? Is there a license required?
The Universal Library is free to use and no license is required.
MccDaq.dll for .NET 5/6
A lot of companies are starting to migrate their .NET Framework applications to .NET 5/6. Do you plan to release a .NET 5/6 version of MccDaq.dll?
Measurement Computing is currently researching the demand for .NET 5/6 (CORE) support within our customer base. Based on our findings we will start investigating the process and changes needed to our Universal Library for .NET 5/6 (CORE) support. Please check back periodically for updates.
Does this support analog trigger in USB-1604HS-2AO
Does the library support using analog input trigger (CH1-CH4) with USB-1604HS-2AO?
Yes, the Universal Library supports analog input triggering when using the USB-1604HS-2AO.
Is there an example of software with the USB-PDISO8 card communicating with the C
Is there an example of software with the USB-PDISO8 card communicating with the C # programming language?
The 4 example programs that support the USB-PDISO8 model are named: ULDI04, ULDI05, ULDO04, ULDO05. When you installed the Universal Library, the C# examples were installed here: C:\Users\Public\Documents\Measurement Computing\DAQ\C
Does Universal Library support WebDAQ 316?
I am attempting to get the sample application DaqDevDiscovery02 to work on my PC, but the application is unable to communicate with my temperature logger (WebDAQ 316). To be more specific, the routine GetNetDeviceDescriptor() throws an exception when called with the appropriate parameters (in my case:, 54211, 5000). I am running on a Windows 7 64-bit platform and all services packs installed. Can anyone help me understand what is going on…? Thanks…
The WebDAQ logger Series does not work with the Universal Library. The WebDAQ does not have an API. All of its software is installed on the unit itself, and its configuration and data retrieval is performed via a web browser on your PC/device.
How to set different sample rate for each channel?
is it possible to set different sample rate for each channel. For our application E-1608 is selected and we need sampling rate of 200 KHz for channel 1 with analog input range of ±1 V, 6667 Hz for 2 - 7 channel with ±10 V and 100Hz for 8th channel with 0-10V. If yes how will it be implemented using c#.
The E-1608 hardware architecture allows only one sample rate during a scan, which applies to all channels. This is true of all of our devices.
How Can I create My Own Demo.dat
I would like to use slower waves (Square Waves) when testing software. For example a peak every 10 seconds. Is there way I can create that in demo1.dat?
Hello, The binary file format of Demo.dat is not published, though is available by contacting tech support. Note that you could collect some data using the UL example program named ULFI01, which saves data to this same legacy file format.
UL for .NET ReleaseDaqDevice() method incorrect help info.
In the help info it states the following: C# .NET public static ErrorInfo ReleaseDaqDevice(int boardNum) Whereas the DaqBoard is required as stated in the examples: MccDaq.DaqDeviceManager.ReleaseDaqDevice(daqBoard);
The example program is indeed the correct usage. Thank you for passing along this documentation error, which we will log for correction.
MccDaq.dll 10 64 bit
Does the MccDaq.dll (.net) run on windows 10 64 bit?
Hello - Universal Library & InstaCal version 6.51 and higher were fully tested with Win10-64. MCCDAQ.DLL is part of this package.
how to create a simple ramp output on the D to A
What code would I need to create a simple ramp on my D to A output?
Measurement Computing manufactures many products that can output waveforms. Writing a program to do so can be done but is not as simple as one might think. To assist our customers we have created a KnowledgeBase article outlining the steps on how to get this done here: http://kb.mccdaq.com/KnowledgebaseArticle50503.aspx?Keywords=Analog+output+scan My recommendation would be to use our TracerDAQ PRO Virtual Instrument application. One of the supported applications is a “Function Generator” that is all set to go out of the box and supports a “Sweep” function. http://mccdaq.com/daq-software/tracerdaq-pro.aspx
Using the TC-32 in VB
Hi, I'd like to use the TC-32 multi channel tempetrure monitor in VB. Is there a VB dll or something that would enable the TC-32?
All MCC products ship with our I/O library called the Universal Library. The Universal Library is a programming API for C®, C++®, C#®, Visual Basic®, and Visual Basic® .NET™ using Visual Studio® and other IDEs.
USB-3103FS GetStatus call, current index is reported bigger than buffer in continuous mode
I am using a pair of USB-3101FS units to simulate signals amd operating in Background AND Continuous mode. The documentation says a call to GetStatus to get the current index of the buffer, CurrentIndex should wrap at the buffer size . But I added a check for CurrentIndex > Buffersize and set a break point there and lo and behold, it does not appear to be wrapping. Am I doing something incorrectly? Current Count does not wrap as the documentation states
We tested this hardware model today using the current UL version (6.52), and curIndex does wrap as expected … at the buffer size. Perhaps you are outputting on multiple channels, and have added a multiplier to set the needed buffer size (since all of these numbers are not per-channel).
Analog sample rates?
I need to read and store 6 channels of analog data sampled at 30khz, will a USB-1608 handle this requirement and should I be able to read and store the data with a low power PC running Windows 8 or 10?
The USB-1608FS-Plus or the USB-1608G series are both cable of handling 6 channels at 30 kS/sec each. We have not had any problems to date regarding PCs having issues running our 1608 DAQ devices. With that said you should not have any issues running a continuous analog input scan on 6 channels using our Universal Library. Data storage is left up to the end user. Please refer to our knowledge base article which can be viewed here: http://kb.mccdaq.com/KnowledgebaseArticle50453.aspx?Keywords=USB-1608G This KB article demonstrates how to continuously collect data using the USB-1608G.
how to Use universal library API.
I am using usbDio32hs.And I am not able to call a universal library API's in my program(Javascript) .I have installed the MCCdaq software in my PC . How to create instance of it and how can I make use of API's .Please answer me.
MCC does not have support for JavaScript. The programming languages C++, C# and VB are supported for execution on Windows. The Java programming language is supported for execution on Android, but Java is not at all related to JavaScript.
Where is the source?
Apparently I need to make a library and didn't seen anything after download. Please point in some direction? “undefined reference to `cbDeclareRevision@4'”
The UL does include both 32-bit and 64-bit .LIB files for Microsoft C/C++, which you will find on your system at the following location: C:\Users\Public\Documents\Measurement Computing\DAQ\C. For other brand compilers, you likely need to use a utility from them to create a .LIB from either ourCBW32.DLL or CBW64.DLL.
Acquire calibration date
Is there a method to acquire the current calibration date in USB-TC
Currently, there is no method for extracting the current calibration date from your USB-TC. If you forward your serial number to [email protected] we can look up the last known calibration date for your USB-TC.
Is the universal library comatible with "Dev-C++"
I have an application developt in Dev C++, and i used a NI device but i want to use one of your devices because of the flexibility in software development.
Hello, Compatibility with DEV C++ and our Universal Library has never been confirmed by Measurement Computing. However, as long as you can call in to a Windows 32bit API, you should have no problem interfacing with our Universal Library.
Is it possible to read the cold junction compensation temperature for a particular channel using the UL Lib?
I have to use my own linearization as I am working with non-standard thermocouples. I have not found a method with UL to retrieve the temperature of the CJC sensor. I am shorting one channel to get the temperature of the connector block, which works fine, but is of Course not as precise as using the direct CJC sensor temperature value. Also I am loosing one channel. Your advice is very welcome.
Hello - Reading the CJC directly is possible through our Universal Library.
How to set analog inputs to single ended or differential mode using UL?
Historically this setting is made manually in InstaCal, since it affects the field wiring, and is unlikely to be changed often. Users of older versions of the UL would call the little known cbSetConfig function in CBW32.DLL. However, beginning with the recently released version UL 6.50, there is now more formal support via BoardConfig.SetNumAdChans in MCCDAQ.DLL. However, beginning with the recently released version UL 6.50, there is now formal support via the AInputMode method (or via the AChanInputMode method for models with per-channel configuration).
can I measure current with my USB-230 data logger?
I was wondering if I could write a code to convert the analog voltage input to current?I want to use this data logger to monitor the DC current of our biosensor.
Hello, The USB-230 series supports a fixed +- 10 volt input range. Because of this you cannot just simply develop software code to allow the USB-230 to measure a current signal. To read your biosensor you will need some type of external signal conditioning. Now assuming that your biosensor outputs a 4-20 mA signal you could use a simple 249 ohm current shunt resistor across one of the differential inputs. This will create a 1-5 volt voltage drop across the shunt resistor. Which can then easily be read by any one of the USB-230 series DAQ devices. You can then write some software code to scale the voltage signal back into engineering units.
When was the last software update? We have the USB 1608FS Plus
-boards and our asynchronous polling of these boards slows our real time programs (could be our poor programming choices). -We also want to add a few Digital Inputs with low software overhead. Any low cost suggestions.
6.35 is the current driver release, with 6.50 coming out later this month. The rate at which digital inputs can be sampled is hardware limited, so a new version of our driver will not help. The USB-1608FS-PLUS’s digital inputs can be read up to 200 times per second. A different model to consider is the USB-1608G, as its digital inputs can be read at up to 4000 times per second. Note that the USB-1608G’s analog inputs are multiplexed rather than simultaneous.
Will Universal Library work with the MinGW compilers?
Windows compiler support is not thrilling mostly. The Linux compilers have been excellent in my experience, so it would be great to access the Universal Library on Windows OS's using the MinGW software. Yes, the MS C code is good, but I need to use Fortran in a large way, and the Linux world makes that very easy. I suspect this would be true for MinGW. I could contact Warren Jasper, the Linux driver writer on this as well.
You can, I added a script to compile with MinGWs GCC to the sample folder: @echo off if (%1)==() goto syntax gcc -x c -g -L.. “%1” -lcbw64 -o “%~dpn1.exe” > err.log type err.log|more goto end :syntax echo - echo - Compiles a file with MinGWs gcc, linking Universal Library echo - echo - Syntax: echo - MakeGCC filename :end
Digital IO inputs raise events?
I was looking at some of the sample code in the Universal Library and noticed that all of them have a timer in a loop pulling the hardware for the data. Is there a way to connect to the hardware and listen to events (like when a port goes high?) then I can react to it? Instead of the loop an pull method? Maybe there is,and I missed it, but I'm looking for that in the 1024LS before I buy. Thanks!
MCC’s current offering of Digital I/O devices are software polled only. They cannot notify the PC of a certain data change or pattern match.
DInScan not working with FirstPortA
Hi, I'm using the function ULStat0 = DaqBoard.DInScan(DigitalPortType.FirstPortA, InBufferSize, ref rateIn, DataInBuf, scanOptIn); The Port A0 on the PCI 2517 Board works and i configured the Port with DConfigPort. But still, I can't read e.g. 5V with the DInScan Function.
First, try our non-scanning example (ULDI01) to make sure there is no electric issue (i.e. make sure you can predictably read the expected 0 and 1 values when you connect proper logic low and logic high voltages). Then move on to the higher speed scanning example (ULDI03). Note that the digital I/O on the PCI-2500 series are 3.3V logic. They can tolerate 5V logic but avoid using pull resistors up to 5V.
DLL library loads slow
I use the universal library in C++, Visual Studio 2010. The cbw32.dll library loads about 7.5 sec and it causes a delay to start my application. Is there any way to load the library faster or to load only the functions which are used? I need only few func
Hello Pavel - 7.5 seconds sounds much too long for simply loading CBW32.DLL. 1-2 seconds is more typical. Perhaps your program is trying to call a function in the DLL as the program is loading. The first time a function (that accesses DAQ hardware) in the DLL is called, there is hardware initialization that is performed, which takes about 4-5 seconds. In summary, there are probably 2 delays at work here. We can’t reduce either, but perhaps you can postpone the second one, by not calling a DLL function until your program is fully loaded.
Borland6 C++ supporting DAQ products
I will start a funded engine test project shortly. I am currently using Advantech PCI 1716 for DAQ. I designed and built my own IO interface. I want to purchase various products from MSC. I have my private software with visual interface on Borland6 C++ (X
Hello Demir - Unfortunately, our Universal Library no longer supports Borland compilers. A possible workaround would be to use the Implib.exe program within Borland to create an Import library file that would call into our C++ DLL that is provided with our Universal Library driver
PCI DIO24/S sample rate
I want to know what is the fastest sample rate of PCI DIO24/S and how to achieve it with Universal library, because the timer of PC has low resolution and accuracy ( 1ms i think ). When i see though TracerDAQ Strip Chart, the timebase is up to 1us.
Hello -The PCI-DIO series does not support clocked pacing/reads. So software paced reads must be used. Calling the Universal Library’s DIn function in a tight loop, one 8-bit port can be polled every 20-25 uS (40 KHz – 50 KHz).
DBitOut Function only work with FirstPortA
The Function DBitOut not working for FirstPortB or C. But the Function Dout working for all 3 port. I'm using SSR-RACK24 board and PCI-DIO24/S card, programming by visual studio ( C#).
The function cbDBitOut() can be a bit confusing but it does works for all three ports. Please refer to our knowledgebase article below for help in clarifying how the cbDBit() functions works. http://kb.mccdaq.com/KnowledgebaseArticle50121.aspx?Keywords=dbitout. You first need to configure the direction for all three ports, i.e. input or output. After the ports have been configured you can then run the cbDBitOut() function. To access FirstportB and C all you have to do is to offset the Bitnum + n. FirstportA = 0-7. FirstportB = 8-15 and FirstportC would = 16-23. Please contact technical support if you have any additional questions.
Is the Universal Library ThreadSafe?
I want use a 1208 USB modulus with different channel to mesure a lot of physical parameters as motor speed, temperature, flowmeter, each of measurement is made in a specific Thread. Second question, if I use two different modulus
Hello GGEE - Yes, the Universal Library is thread safe. Multiple different DAQ devices can be accessed from one program, and separate threads in the program can be used. Also separate threads can access the same DAQ device. Note that one specific scenario is not supported: Multiple programs running on the PC, that each access the Universal Library … not even if each program accesses a different DAQ device.
Example code will not run
Using Visual Studio Express 2012. I have tried compiling and running C#.net and vb.net versions of ULDO0x examples but after compiling and attempting to execute, I get an unhandled exception error the description of which is almost unintelligible.
Hello Fintest - All of the UL examples installed as part of MCCDAQ CD should work OK with C# Express 2012. Be sure to re-boot after installing the UL. Also, if the error string contains the word “null”, it's a sign of duplicate DLLs (CBW32.DLL) per a FAQ on our knowledgebase. If you’re still having difficulty, please contact MCC Technical Support.
Get the installed modules out of the library
What is the correct way to determine the already plugged modules? -reading the CB.CFG (must not be actual) -getting from hardware-manager and compare to cb.cfg? Running Instacal and then start my program is not very user-friendly…
Hello Chris - To achieve your goal, the following is recommended: It Is assumed that InstaCal was run prior by the user, such that all boards had been recognized and that InstaCal has already added them to its board list (stored in CB.CFG). First use BoardName, with each possible board #. If no board entry is in CB.CFG for that board #, you will receive an empty string. Keep track of which board #s return a populated string. Note that being listed in CB.CFG does not mean that the board is physically present in the system (for example, a USB board may have been unplugged by the user). In order to verify the board is truly present, you must perform a function that the model supports, such as AIn or DIn, and if the function returns an error code of 0, then the board is physically present.
please tell me how to create dll file from dasylab software with mathematical operation
Thank you for your inquiry. DASYLab is not capable of creating a DLL file or an executable. In order to deploy your DASYLab program you will need to use a DASYLab Run Time license which installs the necessary files and allows for the execution of your DASYLab applications on target systems.
Universal library and Visual Studio 2012 / C++
Does this product work with VS2012 (v110) and/or VS2013? Are there libraries for x86 and x64 arch?
Yes, our Universal Library C examples can be used in any version of Visual Studio (certainly versions 6.0 thru 2013). We provide both 32-bit and 64-bit DLLs, as well as supporting files.
What is the future for the PC104 products
We are in process of a major design review and use PC104 for our embedded products. As part of the review, we are considering moving to Win7 from Win XP Your site indicates that the PC104 products are not supported under Win7. Are there plans for support?
Hello Spinner - We will not support Windows 7 or Windows 8 for PC-104. We do, however, offer 2 USB products with the same form factor as PC-104 that are supported in Windows 7 and Windows 8. Please take a look at the USB-7202 and the USB-7204.
WinXP and PCIe devices
We have a number of legacy instruments that require WinXP. We are updating the computers on these, and wonder if your PCIe boards have WinXP drivers available.
Hi Spinner - Thank you for your inquiry. The current software that ships with our PCIe products supports both Windows XP and Windows 7/8.
Universal library and Embarcadero C++ builder XE3 compatibility
Can we use latest universal library with Embarcadero C++ builder XE3 under Windows 32 and 64 bit?
Hello Nivram - MCC does not provide or test LIB files for Embarcadero C++. You should be able to create your own LIB file, using a tool/utility provided by Embarcadero that creates a LIB file based on a particular DLL. The DLL to reference is either CBW32.DLL or CBW64.DLL, depending on whether you want to make a 32-bit or 64-bit application (both should run on 64-bit Windows). Both DLLs are installed as part of InstaCal/UL. The header file (cbw.h) is also installed by the UL.
Delphi Support
This version of the library does not have universal support Delphi?
Our apologies, but the last version of the UL that supported Delphi was Version 6.1. You may still download this archived version