Measurement Computing … Using LabVIEW with several USB DAQ Modules
All MCC USB DAQ products can use this Software Tip.
Continuing on from last months discussion about using USB DAQ modules inside LabVIEW in Background Tasks.
Just in case you don’t know the difference between fore and back ground tasks.
In background the DAQ unit can collect data without the computer (CPU) having to sit and wait for data, the data collection goes on in background time using a double buffer in RAM and the program can read this at will and usually at slow rates by loading large buffer loads at a time into a foreground task for processing. This method allows the computer system to collect DAQ data and do computation, watch the operator interface, service other types of I/O all at the same time. It is multi tasking but the DAQ tasks are in background.
Note :- In LabVIEW — any foreground DAQ VIs will wait until the Data Collection is complete, locking the computer to that one VI or task, it the CPU sits, waiting for data and possibly for a long time, if the data collection is long. Background DAQ gets around all of this.
Now with USB there is no DMA, direct memory access, as there is with PCI or ISA slot DAQ cards. So this means that with USB DAQ the CPU does have to shovel the data across the cable so it is not entirely CPU free DAQ, but the main point is the background VIs allow the CPU to free itself from the background VIs or tasks and do other work and it is this feature we are using for this example.
So why are we interested. Well we have a project coming up shortly that requires many USB modules to be connected to a PC, possibly 6 to 8 modules, total I/O count is about 80+, and is mix of analog, digital and counters.
The analog inputs are in groups that are going to run at different sampling rates, some in KHZ, some hundreds HZ and others very slow just HZ, the digital in and out have to be real time live and in the foreground and all of this happening at the same time.
So we did some background investigation work to see how far you can push USB with Multiple MCC DAQ modules.
We started by using the same LabVIEW program discussed in the last month’s Newsletter and with some additional code, a multi module USB background DAQ VI was built.