Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to do DAQmx synchronization with multiple devices

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 19
(10,477 Views)

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)?

National Instruments
0 Kudos
Message 2 of 19
(10,439 Views)
Hi,

I am using three NI PCI 6251 cards. A previous student configured one of the card. How can I configure the other two cards? In the Labview program I am using, where can I modify to separate different Daq devices (like it was shown in the example you sent me, it separates dev 1 and dev 2)?
Thanks a lot for your help.

Sincerely,
Jie
0 Kudos
Message 3 of 19
(10,434 Views)

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!

National Instruments
0 Kudos
Message 4 of 19
(10,420 Views)
Hi,

Yes, I can see all three cards in NI Max. But I can't run the current program with the second and the third devices. I need parallele the 2nd and 3rd devices' input channels to the 1st device input channels, right? Is there any example program that includes both multi-device and multi-function? I don't really know how to creat physical input channels for the other two devices.

Thanks a lot.
Sincerely,
Jie
0 Kudos
Message 5 of 19
(10,416 Views)

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.

National Instruments
0 Kudos
Message 6 of 19
(10,394 Views)
Hi,

I have 48 channels to record signals. I can select dev1, 2, 3 in the input drop down menu and dev1 in the output drop down menu. And I use the output signal file I attached. But when I run the program, there is an error 200558 says "One task cannot contain multiple independent devices. Create one task for each independent device." Only when I choose dev 1 in both input and output menus, the program can run.

Is there any written code I can try to record signals with three devicse and output with one device? I don't really know how to program in Labview.

Thanks a lot.
Sincerely,
Jie
0 Kudos
Message 7 of 19
(10,385 Views)
Solution
Accepted by topic author Jshen6

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.

 

http://sine.ni.com/nips/cds/view/p/lang/en/nid/12631

 

What are the exact synchronization requirements that you need for your tasks?

National Instruments
0 Kudos
Message 8 of 19
(10,370 Views)

Hi,

 

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.

Sincerely,

Jie

 

0 Kudos
Message 9 of 19
(10,368 Views)
Solution
Accepted by topic author Jshen6

Hello!

 

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:

 

http://www.ni.com/white-paper/4322/en/#toc9

 

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:

 

http://www.ni.com/white-paper/3615/en/#toc5

 

Both of those articles also contain zip files where you can download the code to use.

 

Thanks!

Stephanie S.
Application Engineer
National Instruments
0 Kudos
Message 10 of 19
(10,343 Views)