LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Channel Data Acquisition using PXI-6143

 

I can acquire one channel data and am trying multi channel data acquisition using PXI-6143.

 

In data sheet, there is the expression "National Instruments 6143 devices combine the latest in PC technologies to deliver simultaneous sampling for high-channel-count applications at a low cost." 

So I think it's possible to acquire multi channel data by attached code, but error codes "50103" and "200279" are occured.

 

How can I solve this error and multi channel data acquisition?

0 Kudos
Message 1 of 19
(3,422 Views)

Hi!

I think the two tasks are sharing the same SampleClock.

That's why Labview is complaining when starting the second task.

Try placing the acquisition of the two channels in the same task.

 

This implies that you cannot sample your channels at different rates.

Regards,

Marco

 

Message 2 of 19
(3,412 Views)

 

Hi MarcoMauri!

Thank you for your comment.

 

I can understand the reason for the error but don't know how I can place the acquisition of the two channels in the same task.

I can't connect two wires from two "AI voltage.vi" to "task in" at one "sample clock.vi".

 

Please teach me...

0 Kudos
Message 3 of 19
(3,402 Views)

Use CreateTask.vi to create a task, then wire the task out terminal to the first Create Channel.vi and then to the second one.

You'll need one while loop only, acquiring the data from both the channels simulaneusly.

 

Regards,

Marco

 

 

Message 4 of 19
(3,391 Views)

 

Thank you for the advice.

 

I improved the code as attached file and it came no errors.

But in this code, the signal in ch1 is acquired and in ch2 is not acquired. Why?

 

FrontPanel.pdf is the front panel of this code during operating.

AI1 and AI2 are input same signal 1Hz sine function.

 

I'm grad if you teach me the solution.

0 Kudos
Message 5 of 19
(3,368 Views)

Hi SHOTA,

since both the channels are in a single task you should use only one timing vi, only one start task and only one read vi.

From the read VI you will obtain samples for both your channels.

 

Regards,

Marco

 

p.s. if you think someone is helping you can give peanuts kudos

 

 

 

 

Message 6 of 19
(3,324 Views)

 

Thank you for your comment.

 

I varied the code to use one read VI such as attemped.

So no error is occured but only one channel is displayed.

By this code, data of two channel is acquired?

 

By the way, you mean I can use two read vi if two channels are in two tasks?

 

p.s. Sorry, I didn't know I can send kudos.

0 Kudos
Message 7 of 19
(3,298 Views)

Simplify your code and try it again. There is no need for two DAQmx Create Channel functions unless you are going to configure each channel differently. A multi-channel list is simply something like Dev1/ai0:1. Have your program just do a single read and eliminate that trigger function and file write. You are trying to debug too much at once. With continuous sample mode, you may be doing too much in the single loop. At some point, the file write should be moved to a consumer loop.

Message 8 of 19
(3,295 Views)

 

Thank yo for your comment.

 

I could understand the meaning of "Dev1/ai0:1" and simplified the code as attached.

This code displays only one channel.

I could input two physical channels to DAQmx read VI but don't know how separate sampling data into ai0's one and ai1's one.

 

I think I have to study about design pattern.

0 Kudos
Message 9 of 19
(3,280 Views)

Now you changed the DAQmx Read from NChan to 1Chan so of course you are only reading one channel.

Message 10 of 19
(3,262 Views)