LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

one to one mapping in input and output array

Solved!
Go to solution

i am having one input buffer which contains some hex values, by doing some manipulations i am converting those hex values to digital, after that i want to display those values again in output buffer, all is happening well but what i want  is sequence of values in output buffer to be same, means if in input buffer the item that is present at first index, that item should be at first index in output buffer also, i know this could be easily done if sequence to input buffer is already known, but in the program it could be any sequence it changes every time we program. i am not getting any valid approach to do this.

0 Kudos
Message 1 of 5
(2,679 Views)

below attached is the part of my program, if anyone can guide how to match the sequence order of input and output buffer.

0 Kudos
Message 2 of 5
(2,670 Views)
Solution
Accepted by topic author RChoudhary

Well, the solution would be to simplify! Your code is incredibly convoluted (for example, the big FOR loop produces the same result N times in a row. You get the same result if you would remove the big for loop.)

 

Does the attached work as you expect?

Message 3 of 5
(2,659 Views)

yes that is exactly working the way i want, if i would have option i could have given 100 kudos, somehow i also got the solution to the problem but that solution was making my complex code more complex, but the solution you posted is excellent

 

but i am not getting one thing here , in this code that i posted i have considered only 3 channels and for all 3 channels 00 represents 50 digital value but in actual code i am having more no. of channels and for them 00 represents different digital value, you have wired match + rest of string output to case structure i am not getting how to work with all the channels 

do i need to use one more case struvtue or we need to check for every channel in the case structure you are using and then pass out the value but that will also make the code very complex. i am not getting how to proceed further.

0 Kudos
Message 4 of 5
(2,648 Views)

i got it how to proceed further, i am using 2 case structure now one will identify the channel and other one will pass the value.i dont know if there could be any more better approach for doing this.

 

below is the attached program.

0 Kudos
Message 5 of 5
(2,637 Views)