LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build An Array From An Array

Solved!
Go to solution

Hi Gerd,

 

I've just ran the vi that you uploaded and got 8 again, I don't know what cause the difference, but it's working with 15.

Download All
0 Kudos
Message 11 of 17
(1,056 Views)

Hi simply_me,

 

your "diff counter" still runs with dynamic datatype - as long as it is in this state I will not look into any details of this beast...

(DynamicDatatype is used by ExpressVIs, which I don't use for data manipulation - they hide too much information!)

 

Are you sure your "diff counter" works properly? And why do you get 9 "over limit"-events using a limit of 15 for blocks of 15 elements, when you only get 8 events with a limit of 10 for blocks of 20 elements???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 17
(1,047 Views)

Hi Gerd,

 

I've modified the vi to be w/o dynamic data type. Now I'm getting 10 and 8 for the differential and sub array, respectively.

I'm curious as to why they never agree. The only reason that I can think of is that somewhere in those 20 elements sub arrays there are two peaks greater than 10 and it only picks one of them as Min & Max, but it doesn't look like there are any close proximity peaks....

0 Kudos
Message 13 of 17
(1,038 Views)

Hi simply_me,

 

you have an uninitialized shift register in your second counting loop - this can and will affect your results...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 17
(1,027 Views)

Actually, it did make a difference of 1 count.

I'm trying to implement this algorithm inside a while loop, and instead of reading from a file to read a signal in real time. How would the vi change? I imagine that the for loop isn't necessary. So far I've having trouble limiting the array size to 20.

 

Thank you,

Download All
0 Kudos
Message 15 of 17
(1,003 Views)
Solution
Accepted by topic author simply_me

Hi simply_me,

 

the change in the attached VI will force the array size to less than 20... Don't know if you want to throw away all that data...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 17
(991 Views)

Hi Gerd,

 

Thanks for the help.

I'm going to collect all the data in another array, but that'll be going to the initial problem of building a sub array in a while loop....

 

0 Kudos
Message 17 of 17
(987 Views)