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.
Solved! Go to Solution.
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.
Below is another article that goes through basic DAQmx functions which may help if you are new to LabVIEW.
What hardware are you using? Have you configured the tasks in NI Measurement and Automation Explorer (NI MAX)?
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!
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.
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.
Do you have a RTSI cable connecting the PCIe cards? In order for them to share timing and triggers, you need to install a RTSI Ribbon cable like the one below.
What are the exact synchronization requirements that you need for your tasks?
I didn't have a RTSI cable. I will get one. After I get the cable, do I still need to change the code to do multi-device synchronization?
I need to synchronize two slave cards with the master card to record voltage input for 0.1s. The three cards will start to record input when an output signal (from the file I attached before) is trigerred from the master card. In the program I attached, only the master can input and ouput signals. So I need to synchronize the other two slave cards to do the same input tasks as the master card.
Thanks a lot.
Section 9 of the following artcile discusses multi-device synchronization using a RTSI cable, as well as shows example code for synchronizing multiple devices in LabVIEW:
Additionally, this article also discusses Multidevice Synchronization for M-series devices, and breaks down each section of the code to describe how the code works:
Both of those articles also contain zip files where you can download the code to use.