キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

DAQ separating waveform channels

解決済み
解決策を見る

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 件の賞賛
メッセージ1/4
2,762件の閲覧回数

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 件の賞賛
メッセージ2/4
2,751件の閲覧回数
解決策
トピック作成者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.



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 件の賞賛
メッセージ3/4
2,749件の閲覧回数

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 件の賞賛
メッセージ4/4
2,704件の閲覧回数