LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change tunnel mode

Solved!
Go to solution

What about Jeff's solution?  Does that throw away 99 samples?  And how do you know when you're throwing away data?  I see 100 points when I execute the VI so where's the missing data?  I'm having a hard time conceptualizing this Smiley Sad

0 Kudos
Message 21 of 29
(1,204 Views)

@altenbach wrote:

@JÞB wrote:

Bill, You missed the Plot visability checkbox Smiley Wink


Also, what would happen if you would replace the array of 3 NaNs with a scalar NaN? 😄

 

(A scalar NaN would make the code much more maintainable. Currently, if he would add another signal, a seemingly unrelated change would need to be done in the lower left corner...)


Yeah, I started straghtening out the cases and noticed the to dbl whoops, never got back to optimizing the select.  There was a lot of BD clean-up and Bill had just postedSmiley Very Happy  For readability would probably put the NaN in the nested loop and let the optomizer move it for me (with comment that such was intended)


"Should be" isn't "Is" -Jay
0 Kudos
Message 22 of 29
(1,204 Views)

@rhupd wrote:

What about Jeff's solution?  Does that throw away 99 samples?  And how do you know when you're throwing away data?  I see 100 points when I execute the VI so where's the missing data?  I'm having a hard time conceptualizing this Smiley Sad


Jeff is not throwing away data.  Notice that he configured the From DDT to output an array?


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 23 of 29
(1,188 Views)

Ok, so the attached file is my final result.  I'm currently working on fixing the time and date but other than that, it does exactly what it's supposed to.  And I think I finally understand....the dynamic data is being converted to an array and everything in the array is displayed so there's no loss of data.  Is that right?  

0 Kudos
Message 24 of 29
(1,183 Views)

@rhupd wrote:

Ok, so the attached file is my final result.  


You don't need to transpose (explicit and in the chart indicator) and you only need a single FOR loop. See attached.


@rhupd wrote:

 I'm currently working on fixing the time and date but other than that, it does exactly what it's supposed to.   


Note that the time will be questionable, because you sent entire arrays to the chart, instead of single, equally spaced points. You need to match up the loop time, the number of points, and "dt" in the actual data correctly.


@rhupd wrote:

 and everything in the array is displayed so there's no loss of data.  Is that right?  


Sometime the array data is replaced with NaN, so ther original data IS lost.

Message 25 of 29
(1,174 Views)

Well, if we are going there..... (Timing) we need to get off the Express.vi teat (Nearly as evil as the DDT Data type but sometimes helpful) and use some real vis and a waveform data type

 

3 signals on one chartMODMOD.png

And I still like the plot visibility checkbox in this code

 

 

EDIT Obviously the loop timing shoud match the simulated signal time  (Its late- and the default is produce 1 second of data)


"Should be" isn't "Is" -Jay
0 Kudos
Message 26 of 29
(1,161 Views)

@altenbach: why don't I need to transpose?  What're the advantages of not doing that? 

 

Note that the time will be questionable, because you sent entire arrays to the chart, instead of single, equally spaced points. You need to match up the loop time, the number of points, and "dt" in the actual data correctly.

 

Can you please explain the above?  How would I send single, equally spaced points as opposed to an entire array?

 

I want to save the original data so is there a way to save it while using NaN?

 

 

@Jeff: Can you please explain your VI?  How is it different than what I've been working on?  

 

I'm really confused now!!!

 

 

 

0 Kudos
Message 27 of 29
(1,122 Views)

@rhupd wrote:

@altenbach: why don't I need to transpose?  What're the advantages of not doing that? 


Less code is simpler and easier to maintain.

 


@rhupd wrote:

Note that the time will be questionable, because you sent entire arrays to the chart, instead of single, equally spaced points. You need to match up the loop time, the number of points, and "dt" in the actual data correctly.

 

Can you please explain the above?  How would I send single, equally spaced points as opposed to an entire array?


You acquire a certain number of points at a certain rate, apendd all point to a chart at once, and then wait for the next iteration. During the wait, not data is being acquired. This will make the actual points on the chart nonlinear with time.

You probably shoud do continuous hardware timed acquisition and do the processing in parallel, reading the buffer at regular intervals.


rhupd wrote:

I want to save the original data so is there a way to save it while using NaN?


Yes, branch the acquired data and save it. only process the data for the chart further.

 

 

 

 

0 Kudos
Message 28 of 29
(1,108 Views)

@altenbach - thank you for your help.  The discussion is getting fairly complicated and I'm having a hard time keeping up.  I'm going to meet with my supervisor and go over what I've done so far and will probably be back for more help.

 

Thank you everyone!!

0 Kudos
Message 29 of 29
(1,073 Views)