LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I wire two identical vi programs and run simultaneously (8 channels)?

we are designing a microphone array that will have eight microphones. we need to
record eight mics simultaneously on a computer. I have written the program to collect data for 4 mics. I can duplicate this program but I don't know how to wire the two and make one vi file.
Further, I don't know how to synchronize the two boards.

thanks,
0 Kudos
Message 1 of 13
(4,408 Views)
Hi Ali,

What board are you using? Are you using DAQmx or Traditional DAQ? What LabVIEW version are you using?

Once I know what you are working with I can give you the best method to achieve what you want to do.

Thanks,
Sal
0 Kudos
Message 2 of 13
(4,379 Views)
Hi Salvador,

I'm using Labview 7 express, two NI-DAQ 7 PCI -MIO - 16E and windows xp.
I noticed that in the device manager software, it says NI-DAQ Traditional (device 1 and 2) and NI-DAQmx (dev1 and 2). There are only two boards but it shows both traditional and mx. I hope I answered your questions.

Thanks,
AD
0 Kudos
Message 3 of 13
(4,374 Views)
Hi Ali,

We currently have two drivers that run our DAQ devices. Traditional DAQ is the older (legacy) DAQ driver. DAQmx is the new driver. We are trying to get all of our customers to migrate to NI-DAQmx and phase out traditional DAQ. All new devices will be supported in DAQmx and traditional DAQ is no longer under development. Since your E-series devices is supported by both drivers, it shows up in both trees in MAX. Only one driver can control the board at a time; I would HIGHLY suggest using the DAQmx driver.

You can find DAQmx shipping examples in LabVIEW by going to Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage. From here I would suggest starting out with the ContAcq&Graph-IntClk.vi example. Using this VI you can take analog input measurements from all eight of your microphones. Since your board has 16 single ended (8 differential) inputs, you only need to use one of your boards to monitor the microphone array.

In the example you will see "Dev1/ai0" as the physical channel. Change it to "Dev1/ai0:7" to monitor channels 0 through 7 of your analog inputs. Make sure you set the min and max for your input range to get the best possible accuracy. Once you get it working, inspect the block diagram to see how the DAQmx driver works. Also you can see some of the other shipping examples to see what else yoru device can do. You might be interested in the finite acquisition and triggering examples.

Please let me know if you have any further questions.

-Sal
0 Kudos
Message 4 of 13
(4,354 Views)
Hi,

I forgot to mention that the sampling rate for each mic is 400k Hz. can a single board handle 8 of such mics?

Thanks,
AD
0 Kudos
Message 5 of 13
(4,317 Views)
Hi Ali,

I believe your board has a maximum sampling rate of 1.25 MS/s. This maximum sampling rate is divided among all channels that are acquiring data.

Since you need 8 mics at 400 kHz, the maximum number of mics you can monitor with one board is 3 (3 x 400 kHz = 1.2 MHz). For 8 mics you will need 3 boards.

When you have three boards you can synchronize them using one of our RTSI cables. When you connect your three boards inside your computer with the RTSI cable and configure the RTSI cable in MAX, you can route the same clock signal to all of your boards. This can be done with the DAQmxTiming VI. Set all three of the boards to use the same sample clock (i.e. set "Dev1/sampleclock" as the sample clock on devices 2 and 3). This will make them synchronized.

-Sal
Message 6 of 13
(4,297 Views)
Hi Sal,

I have finished writining the program for 8 mics sampling at 300kHz each. I'm using DAQ-Traditional and two boards. I have wired the two boards by RTS cabels in the computer. but I don't know how to synchronize them in the program.

I appreciate if you help me.

Thank You,
AD
0 Kudos
Message 7 of 13
(4,236 Views)
Hi Ali,

I really think that it would be best for you to use DAQmx for your application. You can find the DAQmx shipping examples in LabVIEW by going to: Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage

Also, we have several synchronization shipping examples under Hardware Input and Output >> DAQmx >> Synchronization.

Basically, for shynchronization use the DAQmxTiming VI on the task that is on the slave board. In the DAQmxTiming, set the sample clock of the slave device to be the sample clock of the master device. You can also do the same thing for triggering. Set the digital start trigger on the slave device to be the ai/startTrigger from the master device.

We have a great synchronization tutorial online:

http://zone.ni.com/devzone/conceptd.nsf/webmain/6DC991028566309886256F990080A720

Please check it out.

Thanks,
Sal
0 Kudos
Message 8 of 13
(4,214 Views)
Hi Sal,

how can I switch to Daqmx from traditional? I have written my program in traditional.

Thanks,
AD
0 Kudos
Message 9 of 13
(4,157 Views)
Hello Ali:

The switch from Traditional to DAQmx can be made using compatibility VIs. You can download these VIs from here: http://digital.ni.com/softlib.nsf/websearch/9D67F671BCC6850586256E630059308B?opendocument

I would also recommend you take a look at this tutorial before you make the move from Traditional DAQ to DAQmx: http://zone.ni.com/devzone/conceptd.nsf/webmain/82a34ea5258568d386256de10058912a?OpenDocument

I hope that helps.

Jaideep J
Applications Engineer
National Instruments Corp.
0 Kudos
Message 10 of 13
(4,133 Views)