LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MEAN returns NaN?


@alhabeeb wrote:

Thanks. But my question is how to keep timing and not have NaN?


If you stubbornly want to keep your existing timing (not recommended!), just place the upper code in a case structures and only execute it if the array size is nonzero.

0 Kudos
Message 11 of 18
(190 Views)

Please see if this helps
santo_13_0-1729180851563.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 12 of 18
(182 Views)

Hi, I put 100 sample per channel, and I have the same issue NaN!

alhabeeb_0-1729183323971.png

 

 

0 Kudos
Message 13 of 18
(165 Views)

Why not put an indicator on the received 2D array and see what it looks like.

 

We cannot really tell how things are connected from a picture, so please attach your VI.

 

(I have no idee why you now think it is a good idea to pollute your diagram with local variables. That stop button should be latch action and wired inside the loop. Writing a control to a local variable of itself is just plain silly! I think you need to start with some basic tutorials. And please (please!!!!) resize your index array to the required number of outputs).

0 Kudos
Message 14 of 18
(158 Views)

@alhabeeb wrote:

Hi, I put 100 sample per channel, and I have the same issue NaN!

alhabeeb_0-1729183323971.png

 

 


What everyone is saying is to wire a fixed number to the DAQmx read VI instead of default, ideally 1/10 th of the sample rate.

santo_13_0-1729184280693.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 15 of 18
(157 Views)

I got it Thanks all.

0 Kudos
Message 16 of 18
(98 Views)

@altenbach  a écrit :

Why not put an indicator on the received 2D array and see what it looks like.

 

We cannot really tell how things are connected from a picture, so please attach your VI.

 

(I have no idee why you now think it is a good idea to pollute your diagram with local variables. That stop button should be latch action and wired inside the loop. Writing a control to a local variable of itself is just plain silly! I think you need to start with some basic tutorials. And please (please!!!!) resize your index array to the required number of outputs).


Hi, I attached my VI. I have another two while loops not included yet, so I need one stop button to control all the three while loops.

Thx

0 Kudos
Message 17 of 18
(95 Views)

Reference this KB: Stopping Parallel While Loops in LabVIEW with One Stop Button

 

Generally, please start a new topic when you have a new question (after you have researched your new question).

Doug
NI Sound and Vibration
0 Kudos
Message 18 of 18
(73 Views)