LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ separating waveform channels

Solved!
Go to solution

Hi,

 

i´m trying to read from a channel with two tasks.

Unfortunately i´m not able to get attributes correctly from waveforms.

Can me someone explain my failure?

 

 

0 Kudos
Message 1 of 4
(2,048 Views)

Hi Hulk,

 


@Hulk1978 wrote:

i´m trying to read from a channel with two tasks.

Unfortunately i´m not able to get attributes correctly from waveforms.


There is only one DAQmx task defined in your VI, containing two channels.

Which "attributes" are you missing?

Do you get any samples from your task?

Do you get any errors from DAQmxRead (or earlier)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,037 Views)
Solution
Accepted by topic author Hulk1978

@Hulk1978 wrote:

i´m trying to read from a channel with two tasks.


Your terms are backwards.  You have 2 channels inside of a task.  Your DAQmx Read performs a task read and gives you an array of waveforms, each element from a channel in your task.

 


@Hulk1978 wrote:

Unfortunately i´m not able to get attributes correctly from waveforms.


You have doing Continuous Samples with 1 sample per channel in the buffer.  That makes 0 sense.  Just delete the 1 and let the buffer be whatever defaults DAQmx uses.  Your next issue is your DAQmx Read.  You are telling it to read, by default, whatever samples are currently available.  If your loop is running fast enough (which it is), it will return 0 samples because there is no data in the buffer.  Since you are reading a sample every 100ms, I would change the DAQmx Read to use the N Channels, 1 Sample, 1D Waveform instance (use the polymorphic selector).  Then your DAQmx Read will wait for the 1 sample to come in.  Incidentally, this will also limit your loop rate to approximately match that of your sample rate.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(2,035 Views)

Yeah.

Thanks to all.

 

Now my array is filling with data.

It´s a little bit difficult to understand the differences at reading.

BTW...yes i have one task with two channels, not different tasks.

 

Have a nice weekend

0 Kudos
Message 4 of 4
(1,990 Views)