From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-03-2017 02:00 PM
Dear all,
I am getting the data from different analog and digital channel and continuously storing it in the array.
I want to segregate channel wise data. Please refer attached image.
First three are analog then rest two are boolean then repeat.
can I separate the yellow data in some register, where next value can overwrite the previous one.. and so on for rest of the data.
Please find attachment
Thanks in advance 🙂
Solved! Go to Solution.
12-03-2017 09:38 PM
Use Reshape Array to turn it into a 2D array so that each row contains a set of readings. Then you can just use Index Array to get the column(s) you care about.
12-04-2017 02:11 AM
Decimate array, extended to a total of 5 elements, will have the yellow data in the first output and the red data in the second output.
I don't know if this is faster than reshape followed by index. Do a benchmark and let us know!
12-04-2017 03:44 AM
Hi suyash,
after going through some basic LabVIEW lessons you should be able to get to the very basic "index array elements in a loop approach":
(ReshapeArray and DecimateArray will also solve your problem, probably in a more optimized way. But still then you should understand the code you are writing…)
12-04-2017 06:31 AM
@MaxJoseph wrote:
Decimate array, extended to a total of 5 elements, will have the yellow data in the first output and the red data in the second output.
I don't know if this is faster than reshape followed by index. Do a benchmark and let us know!
From a scalability perspective, the reshape is better. The Decimate 1D Array forces you to a set number of channels at compile time. The Reshape Array allows me to define how many channels at runtime (more scalable).
However, if I had to guess I would say the Decimate 1D Array would likely be faster. Need benchmarks to prove it. I may be surprised.
12-12-2017 12:46 AM
Hello Every one,
Thank you very much for providing me the solution.
All the options are working but decimate array worked for me. I do not have waste knowledge of LabVIEW but in may case i have seen that option of reshaping array is faster than decimate array, but still we need some experts review on it.
Have a great day