LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reorder 2D array

Solved!
Go to solution

Hi all

 

I would like to know your opinion about this issue I am facing in Labview: 

I have 4 input signals in my FPGA which look like this:

 

pulses.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The signals are saved independently in arrays (size: 3600). The first signal is centered around 1800 and I would like to reorder the others to also be centered around 1800. There is a fix delay between the signals, so my first option was to created a "for" loop that  "point by point" reorders the array. The signals correspond to pressure traces from all cylinders of an internal combustion engine. Is there any other way to reorder the signals? Maybe using defined functions in labview...

 

Thanks

Regards, 

Pablo

0 Kudos
Message 1 of 6
(2,839 Views)

Use Index Array to break up your 2-D array into the individual channels.  Use Rotate 1-D array to rotate each 1-D array however many elements necessary to get the peaks to line up.  Use Build Array to put the individual 1-D arrays back together into a 2-D array.

0 Kudos
Message 2 of 6
(2,834 Views)

Thanks for your reply. Should I use a for loop for those operations? It would be really useful if someone could post a picture of the structure. 

 

Thanks in advance!

Pablo

0 Kudos
Message 3 of 6
(2,802 Views)

Hi Pablo,

 

when there is a fixed delay between those 4 channels you should store the measurement values into the correct elements right from the start!

 

No need to reorder big arrays afterwards on the FPGA…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,796 Views)

Thanks GerdW.

 

Actually they are not reordered on the FPGA. They are saved without reordering for its use with Matlab, but to check that all cylinders perform in the same way is good to plot them in one single plot and phased at 1800. 

 

Regards, 

Pablo

0 Kudos
Message 5 of 6
(2,791 Views)
Solution
Accepted by topic author pabgarva

Hi Pablo,

 

the use Raven's suggestions to rotate 3 of those 4 channels to the correct position…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(2,784 Views)