LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using DAQmxBase with several Multifunction I/O Instruments

Hello people,
 
last time my coworker and me are experiencing serious problems with NI DAQmxBase and several Multifunction I/Os. Here are the facts:
 
We use NI LabWindows/CVI 7.1 and have 2 x NI USB 6008 and 1 x NI USB 6009 instrument here.
 
Some weeks ago, my coworker made a program that could read from several analog inputs and this program worked for some weeks very fine. The program was made as like the example programs that come with the Multifunction I/O instruments.
 
The problem now is, since this week nothing works and we do not know why.
 
The last informations we get is that using CVI 7.1 and DAQmx 8.0 or higher is making serious problems. Now we gonna kill DAQmx 8.0 and reinstall DAQmx 7.1 and DAQmxBase driver 2.0.
 
So this is what we are gonna do now BUT I have some questions:
 
1.) Is it known that more than one USB Multifunction I/O is making problems using both at same time or having installed more than one on a target machine?
 
2.) When I have installed several Multifunction I/O instruments and use them at same time, how do CVI know what Device to use in the program? The first lines of the example code are:
DAQmxBaseCreateTask("", &taskHandle);
DAQmxBaseCreateAIVoltageChan(taskHandle,chan,"",DAQmx_Val_RSE,min,max,DAQmx_Val_Volts,NULL);
DAQmxBaseStartTask(taskHandle);
DAQmxBaseReadAnalogF64(taskHandle,pointsToRead,timeout,DAQmx_Val_GroupByChannel,&data,samplesPerChan,&pointsRead,NULL);
...and so on...
How do CVI know what Device it should use? Is it the "chan" (="Dev2/ai0") variable that tells CVI what device it should use? The information "Dev2"?
 
In advance thanks for help!
 
Best regards
Marek S.
____________________________________________________________
Operating System: Windows 2000 - Software I use: LabWindows/CVI 7.1
0 Kudos
Message 1 of 2
(2,869 Views)
Hi,

sorry, I just saw that this post still not has been answered.
DAQmxbase is very similar to DAQmx, so you specify the Device during channel creation

DAQmxBaseCreateTask("", &taskHandle);
DAQmxBaseCreateAIVoltageChan(taskHandle,chan,"",DAQmx_Val_RSE,min,max,DAQmx_Val_Volts,NULL);

here you create a channel, where "chan" must be a channel-String looking like "Dev1/ai0", where Dev1 specifies the Device and "ai0" channel 0.

DAQmxBaseStartTask(taskHandle);
DAQmxBaseReadAnalogF64(taskHandle,pointsToRead,timeout,DAQmx_Val_GroupByChannel,&data,samplesPerChan,&pointsRead,NULL);

best regards

Marco B NIG

0 Kudos
Message 2 of 2
(2,815 Views)