05-10-2014 01:37 PM
Hi, I am new in Labview. I need help to:
1. modify a multi-function program in order to record data from three daq cards (devices 1-3) and output signal through one of the card (device 1). The current program was set up to record and output signal from one of the card (device). I tried to choose multiple devices when I run the program, but there is an error 200558 shows "One task cannot contain multiple independent devices. Create one task for each independent device."
2. change the recording time to a longer period, e.g. 0.1s. Currently, the recording time is 0.009971s.
I attached the multi-funtion.lld. The des_v2_Multi-Funtion_Synch AI-AO.vi is the program I need to modify. I also attached an input signal file for runing the program.
Thanks a lot.
Sincerely,
Jie
Solved! Go to Solution.
05-12-2014 03:46 PM
Hi,
The reason you are running into this error is that cannot have channels from two different DAQ devices configured in the same task. If you want to use tasks to acquire or generate samples on multiple DAQ boards, you must configure a separate task for each of the devices (DAQ boards) being used. I have included a Knowledgebase article that explains this further and includes some example code.
http://digital.ni.com/public.nsf/allkb/6A97D0F3CFE57EC28625734F0070DF4D
Below is another article that goes through basic DAQmx functions which may help if you are new to LabVIEW.
http://www.ni.com/white-paper/2835/en/
What hardware are you using? Have you configured the tasks in NI Measurement and Automation Explorer (NI MAX)?
05-12-2014 04:40 PM
05-13-2014 09:42 AM
Have you been able to see these two cards in the Measurement and Automation Explorer (NI MAX)? This should have installed when you downloaded the DAQmx driver. In the left panel, under Devices and Interfaces, you should be able to see your PCI cards. Once you have these configured, you can create a control and reference the device and channel in LabVIEW.
Let me know if you have any trouble opening NI MAX or finding your devices!
05-13-2014 10:01 AM
05-14-2014 05:18 PM
In the example program you sent me "Multi-Function-Synch AI-AO.vi" the channel is configured on the front panel within Channel Parameters. There are two drop down menus where you can select Dev1 or Dev2 and the channel i.e. Dev1/ai0 and Dev2/ao0 if you are doing an Analog Input task on one device (1), and an Analog Input task on another device (2), with each reading from channel 0. If you cannot find the channel in the drop down menu, click browse which will allow you to select a channel as long as the device has been detected in NI MAX.
You can use this example to synchronize two tasks. I have included some information about synchronization of M Series devices below, including multi-device synchronization.
http://www.ni.com/white-paper/3615/en/
Is there a reason that you need to synchronize across more than one device? The PCI 6251 has 16 analog inputs and 2 Analog Output Channels, which should be sufficient for your application.
05-14-2014 10:01 PM