LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple channels acquisition and Number of samples per channel

Hi,

I'm a new labview user and I need some help in trasposing an old traditional NI-DAQ acquisition software in a NI-DAQ-mx one.

I followed the tutorial (#4342) but I found a problem with Analogue 2D DBL Multiple Channels Multiple Samples DAQmx Read Vi.

 

I'm trying to acquire 8 voltage signals from a NI-USB-6341 device. When the Number Of Samples Per Channel I set is below the number of channels (8), the software acquires only a number of channels equal to the number of samples per channel I set.

 

Is that a normal behaviour?

 

Thank you

Daniele

0 Kudos
Message 1 of 8
(4,002 Views)

Is it possible for you to post just your DAQmx code? You could try the whole thing by using the example Cont Acq&Graph Voltage-Int Clk.vi.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 8
(3,992 Views)

This is my code. The problem is the same with or without the code for the scan backlog indexing.

Tomorrow I will try with the code from the example.

 

Thank you

Daniele

0 Kudos
Message 3 of 8
(3,971 Views)

I have some new details: if I start the acquisition with a "Number of samples per channel" above 8 then I can slowly decrease it appearently without any trouble. If I decrease it fast (from 25 to 2 in one step) the bug appears again.

 

So I tried to modify my code, putting 8 instead of 0 as first value for the indexed scan backlog, but it works only for the first iteration of the while cycle (I see on my front panel the acquisition working correctly for the fraction of a second)

0 Kudos
Message 4 of 8
(3,938 Views)

Why don't you leave the "sample per channel" unwired?

If the task acquires samples continuously and you leave this input unwired, this VI reads all the samples currently available in the buffer.

In the meantime, have you tried "Cont Acq&Graph Voltage-Int Clk.vi"?

0 Kudos
Message 5 of 8
(3,916 Views)

I finally found the bug: in the transition from Traditional DAQ to NiDAQmx I didn't know that the data output of Traditional AI Read Vi and DAQmx Read Vi are different; in the first the channels were the coloumns, while now channels are the rows!

 

So I removed the Traspose 2d-array function, that with traditional daq was necessary, and now it seems to work correctly!

 

0 Kudos
Message 6 of 8
(3,908 Views)

Good job!

Have a nice day!

0 Kudos
Message 7 of 8
(3,905 Views)

Hey to everyone.

 

I´m quite new in using LabVIEW.

I want to get Data from a Ni9205. I want to use 3 different Input Signals. Two Signals will be recorded. The third Signal is to detect a triger Signal. If the thrid value is >5, the Output file shoud be divided and a new file should be created. 

 

At the current state the vi is looking like this:

vi1610.png

My question: How can i define which channel will be used for the trigger-subVi?

 

Thanks!

0 Kudos
Message 8 of 8
(3,239 Views)