08-19-2016 01:12 PM - edited 08-19-2016 01:12 PM
As others pointed, unless you give proper inputs it's difficult to understand by simply giving one sentence.
-Take one string as sample and show what should be the output.
-Just for example if your string input is "AB" write down in paper atleast all the steps and show us final answer you are expecting.
-If you want ASCII value or decimal or hex value please check and write down the same.:
https://simple.wikipedia.org/wiki/ASCII
08-19-2016 01:59 PM
Hi algo,
my first 2 elements are 49, and 100, but when they get combined it becomes 12645...
By using JoinNumbers you basically do simple math like "a*256+b" (when joining bytes), which would result in 49*256+100=12644.
I really don't know how you get 12645 as result…
Have you been told to provide meaningful data and expected results for this data?
but I want it to be "49100" any ideas?
This looks like a using FormatIntoString with formatcode %d%d…
I repeat from my previous post: Or any other operation you would like to do, it's not quite clear from your question!
Have you been told to provide data and expected results for that data before?
08-20-2016 04:00 PM
OK, my colleagues are obviously not being clear when they ask you to "Post your VI". Here's what we want you to do:
The reason we want VIs (and not "static pictures" of parts of the VI) is that we can examine everything, execute the code to see what it does, and modify it without, ourselves, having to duplicate all of your wires (perish forbid we make a mistake!). You want us to help you -- we are telling us that you need to help us in order for us to help you. You can refuse, of course, but don't complain ...
Bob Schor
08-21-2016 01:05 PM
As bob already said, we are going in circles unless you attach actual code with typical default values.
@algoballer wrote:Hello,
Fairly simple question I'm just looking for an efficient way to do it..
So does your code work correctly, but is just inefficient? It seems your code does NOT work correctly, so first get it to produce the right output and let's worry about efficiency later.
@algoballer wrote:
I have a 1D array of HEX values and I would like to be able to combine 2 elements into 1 through out the whole array.
The term "Hex values" can mean many different things. Most often it designates a way to format binary values as a human readable string using the characters 0..9, A..F Where does the original string come from? Are there really tabs as delimiters? What sizes are the fields (fixed, variable, etc). What does the "20" stand for and why is it there? Are all field strings of the same lenght? The "reshape array" function seems to severly truncate the data, so why are you processing all of it in the first place?
@algoballer wrote:
Ex: elements[0] and element[1] become element[0]. element[2] and [3] become element[1] etc.
So, what is the desired datatype of the new element?
@algoballer wrote:
I have attached an image to show what I am doing. I take a string, convert to hex and then into a 1D array. But ultimately I need to convert 2 ascii character into 1 hex! As of right now I have 1 ascii gets converted into 1 hex.
ASCII defines a way to translate bit patterns into defined characters and control codes and seems unrelated to your problem. What is "1 hex"? Your entire description makes no sense. The image does NOT show what you are doing.