LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

split 2D array by Rows and Columns with condition

Solved!
Go to solution

Hi N.,

 

it's more or less the same, except it's keep shifting all the time.

You initialized your array to have 10 rows, but you try to replace 11 rows (remainder will go from 0 to 10)!

Either define your array with 11 rows - or replace just 10 rows!

Best regards,
GerdW


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

Ok - so to generate the video I used exactly the code I placed in the snippet above (actually, I added an Invoke Node to generate images, then PNG, then used Movie Maker... but the code was the same 😉 )

 

The key point to the moving is probably the empty line separating the blocks - this is the line break I suggested you remove from the Arduino code. You can (and should) keep the line breaks after each row.


GCentral
0 Kudos
Message 12 of 17
(1,709 Views)

i went with your advice by taking the zeros off, but eventually i should keep them in the end. 

 

that's one of my biggest problem. 

 

i'll try it again now and let you know. 

 

 

 

Cheers mate, 

0 Kudos
Message 13 of 17
(1,705 Views)
Solution
Accepted by topic author N.Ghrayeb

To be clear, I didn't remove zeros - the data that I processed looks like this as it's read by the main loop (I added a line break after each iteration to make it clear what I mean)

Capture.PNG

There are 16 values (and 16 commas) per row, but there are no 'empty' rows. If you didn't tell me they were in blocks of 10, this information wouldn't tell me. This makes processing much simpler.


GCentral
0 Kudos
Message 14 of 17
(1,701 Views)

cbutcher,

 

thanks for your help mate, 

 

i added a row of zeros in my code and reduced the speed of my shift register from 200 to 500ms. 

 

i have a good representation up to the minute. but i need to work more on it to make it looks more professional as (spatial resolution). 

 

 

 

 

cheers mate. 

 

 

much appreciated. 

0 Kudos
Message 15 of 17
(1,690 Views)
Solution
Accepted by topic author N.Ghrayeb

@N.Ghrayeb wrote:

 

i have a good representation up to the minute. but i need to work more on it to make it looks more professional as (spatial resolution). 

 

Wiring a larger value to the "ntimes" input to the Interpolate 2D node will 'increase resolution', except that it won't really - it just smooths points out. This might look good, but as we've already discussed elsewhere, you can't have more information that you already start with - the smoothing might look good but there's no real guarantee it's accurate if you're just upsampling wildly.

 

Example (fullsize😞

 

upsample.PNG


GCentral
Message 16 of 17
(1,686 Views)

I did it now. 

 

 Interpolate 2D node is what i'm looking for, i was using 1D node. 

 

 

 

 

thank you. 

 

you made my day

0 Kudos
Message 17 of 17
(1,673 Views)