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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inut Array to be Manipulated as Output Array

Solved!
Go to solution

Hi Users,

i need some reply from your end.

i want to manipulate Input Columnbox as Output column box

Here i am listing possible conditions for your reference

Conditions:
1)if Same Channel Repeated 'n' times, Last (recent ) result should be replaced with existing same channel result
2)Sort the manipulated array .

 

For details see the attached image

pls share possible ways to get above requirements

thanks in advance

0 Kudos
Message 1 of 7
(1,094 Views)
Hi gowthameie, please give it a try and share your code (.vi) and where you are getting stuck.
0 Kudos
Message 2 of 7
(1,079 Views)

I would use a Map to store the rows (array of strings) and use the channel as the key.  Use Insert Into Map to add/replace the values.  Then you can use a FOR loop and an Unbundle By Name to index out your updated rows.  This will even do the sorting for you.


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 3 of 7
(1,075 Views)

I am not sure what a "column box" is, but from your picture you are probably talking about tables.

 

Tables are basically 2D array of strings and contain whatever they get from the wire or user. Typically tables are not useful as controls, because they require significant sanity checks on user inputs (numeric? String? multiline?, etc.)

 

Are these controls or indicators? Where does the data actually come from? Where will it be used later?

 

Do you want to process the data currently in the "input" to get the result shown in "output"? Do you want to rewrite the input to look like the output?

 

Please attach your VI and be very specific! Thanks!

0 Kudos
Message 4 of 7
(1,054 Views)

Assume i am testing ADC Channel.
i am getting data's. based on the criteria result status (Pass/Fail)is updating.
Few ADC channel result is Fail, I want to repeat the test on the particular channel.
whether the Result Status PASS/FAIL, Recent Data and result status of particular channel to be replaced.
Input Array Size is (7 X 3), after checking, manipulating Output Array Size would be is (4X3)

till i couldnt get solution, pls do the needful

 

 

I tried with following method.
Deleting Last row and taking 1st element (Channel no) and comparing any of input array has same channel result.
if yes, replacing that row with deleted row.
similarly i want to check any channel result is repeating. if so, do the same as mentioned above.

I attached VI snipet for your reference

0 Kudos
Message 5 of 7
(1,033 Views)
Solution
Accepted by topic author gowthameie

I AM ATTACHING SOLUTION FOR THIS THREAD

0 Kudos
Message 6 of 7
(961 Views)
Solution
Accepted by topic author gowthameie

Couple alternatives (as crossrulz suggested)

Mostly so I can get some experience using maps 🤓

Data Sorting MAP Example.png

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
Message 7 of 7
(945 Views)