LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array manipulation

This is a little difficult to explain but here I go. I want divide an array as measurements are taken and split the data up into columns at certain trigger points. I have an array of boolean buttons to trigger the saves. I only want the data above these points to go into the chosen column. This VI is what I'm currently trying to get to work. I'm sure I'm going about it the wrong way. Help!

 

0 Kudos
Message 1 of 10
(3,757 Views)

Sweet and simple.

 

Build Array.png



-Matt
Message 2 of 10
(3,725 Views)

That's pretty cool, thanks but it isn't all there. I need all the previous measuremnts between the the triggers and I want these to appear in different columns.

0 Kudos
Message 3 of 10
(3,721 Views)

When you say you only want the data above these triggers.  Do you mean you would like a set of columns for every trigger between the latest trigger and the previous trigger when descending the boolean array? or that you would like all the data above the last trigger?



-Matt
0 Kudos
Message 4 of 10
(3,693 Views)

between the latest trigger and the previous trigger.

0 Kudos
Message 5 of 10
(3,690 Views)

This should get you close.  It is using the Boolean Crossing PtByPt to detect when the threshold was triggered.  When triggered, it makes a subarray from the values between the index of the previous trigger and the index of the current trigger.

 

Note: 0s will be filled in for the shorter subarrays due to the fact that arrays have to be rectangular (all columns have to have the same number of rows).


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 6 of 10
(3,676 Views)

Doesn't look like I can use this with my current license.Capture.JPG

0 Kudos
Message 7 of 10
(3,670 Views)

@RHutchings wrote:

Doesn't look like I can use this with my current license.


Ok, then just use a Greater Than with a Feedback Node instead.


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 8 of 10
(3,662 Views)

I have no clue what the other one did so I don't know what to do with the greater than and feedback node.

0 Kudos
Message 9 of 10
(3,658 Views)

Think about what you think it would do.  You are looking for when something is going from True to False,  Or when something is going from False to True.  So you put the new value into a shift register.  Any iteration looks at the value coming out of the shift register (so the boolean value from the previous iteration) and compares that to the new boolean value.  Basic boolean logic allow you to know when something changes  (not equal) AND whether the new value is True or False.

 

(Greater than or Less than on boolean values is possible, but I myself don't like trying to think about whether a True or a False is logically greater than or less than the other.)

0 Kudos
Message 10 of 10
(3,644 Views)