Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How synchronize 3 channels with USB 6251

Solved!
Go to solution

Hi all,

I have one NI USB 6251, Labview8.5.

My system includes: + One output channel for stimulating square waveform (I use Dev1/AO1 or Dev1/ AO0)

                                  + Two input channels for acquisition signal (I use Dev1/ai0 and Dev1/ai1).

I modified example "Multi-Function-Synch AI-AO" in  Find example\Hardware Input and Output\DAQmx\Synchronization\Multi-fuction.

I added one channel to this example and I want 3 channels work simultaneously, but during process occurs  "Error -50103 occurred at DAQmx Start Task.vi:1" Possible reason(s):The specified resource is reserved. The operation could not be completed as specified".

I've taken along time but can not solve this problem.

Can you give me advices.

Thank you in advance for any help!

MC

 

0 Kudos
Message 1 of 10
(5,596 Views)
You cannot create two analog input channels seperately since you are then re-using a resource that has already been reserved. All you have to do is to combine both channels together to create a task. Have a look at the attached screenshot.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 2 of 10
(5,588 Views)

Hi Adnan Zafar!

Thank for your advice. I have questions:

1) I worry if two input channels work simultaneously (start at the same time)? This is important for my task. If answer is Not, how to solve this problem? (using counter, external trigger...). In my project, I have to configure six channels (of USB 6251), which acquire signals simultaneously . It seems difficult for me because I have no experience with synchronization.

2) What difference between two following configuration: 

                     a) Configuration like the way you show in the picture.

                     b) Configuration by writing directly on Physical Channel Control: Dev1/aiX:Y.

Thank so much.

MC

0 Kudos
Message 3 of 10
(5,571 Views)
Solution
Accepted by nguyenmanhcuong
As the specs clearly state, your board does not support simultaneous sampling. There is a single A/D and all channels are muxed to it. When you select multiple channels, the first channel in the list will be sampled, then the second, etc. There will be a delay that you can determine and it is very small but it will always be there. If you need true simultaneous sampling, you should buy a DAQ board that supports it.
Message 4 of 10
(5,568 Views)

I am working on a project same az this one and I need to have a multi channel inout for a 6251 device.

The problem that I have is how to make a VI to sample different inputs simultansly. Although there is a delay, it will be acceptable for my project.

0 Kudos
Message 5 of 10
(5,100 Views)
What have you tried? The DAQ Assistant makes it pretty simple to acquire multiple channels and the lower level DAQmx examples can accquire multiple channels with very little effort. With the DAQmx Examples, click on the physical channel's arrow and select 'Browse'. Just like the DAQ Assistant tells you, you use Ctl-Click or Shift-Click.
0 Kudos
Message 6 of 10
(5,098 Views)

I am going to use the device as a meter for a Biomedical system, so I need 4 channels. I went throught the hints and designed that by using DAQ assistant. Then I took 4 channels from the out put. The problem that I have is that when I connect only one channel on 60 Hz, I can see the signal on other channels too ! I have 4 signals on all channels instead of only one of those. 

0 Kudos
Message 7 of 10
(5,078 Views)

That is normal when you have unconnected channels. Search for the topic 'ghosting'. Connect unused channels to gnd.

0 Kudos
Message 8 of 10
(5,063 Views)

Dear all,

 

I want to used 2 analog outputs with different signals (e.g. one channel sinewave with 50 Hz and the 2nd AO with frequency e.g.15 Hz). I want then sample these signals on two A/D inputs (AO0 on AI0 and AO1 on AI1, respectively). I use USB M 6215 device and modified until now sample from LABVIEW as mentioned earlier.

 

Thank you for any help.

Tomaz.

 

0 Kudos
Message 9 of 10
(4,546 Views)

Hi Tomaz,

 

I usually start with this example when using multiple channels of AO at different frequencies.  This way you don't need to worry about writing an integer number of periods to your buffer.

 

 

If you don't want to have to write data continuously in your loop, you can regenerate the same data that is pre-written to the DAQmx buffer before the task is started (like in this example).  In your case, with one channel at 50 Hz and one channel at 15 Hz, the resulting signal will be periodic every 0.2 seconds (3 periods of the 15 Hz waveform, 10 periods of the 50 Hz waveform).  If you were updating at 250 kHz, you would need to write 50000 points to ensure that both channels are periodic.

 

 

Best Regards,

John Passiak
0 Kudos
Message 10 of 10
(4,528 Views)