06-26-2013 11:02 PM
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.
Solved! Go to Solution.
06-26-2013 11:58 PM
below attached is the part of my program, if anyone can guide how to match the sequence order of input and output buffer.
06-27-2013 12:51 AM - edited 06-27-2013 12:55 AM
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?
06-27-2013 02:18 AM
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.
06-27-2013 03:01 AM
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.