04-23-2007 03:09 PM
04-25-2007 06:26 AM
04-25-2007 08:38 AM
05-05-2007 12:05 PM
05-07-2007 02:11 PM
08-27-2009 03:36 AM
Hello, dawnw,
I am battling with exactly the same problem here... could you post your solution, please?
I am trying to concatenate a string of hex values (00 02 04 A0 ...) with an ASCII string of hex characters (0C0D...)
It seems like a rather straightforward thing to do, but no matter what I did, one of the sttrings is converted wrong.
Thanks!
08-28-2009 01:21 PM
Hello, could you post your code and tell us how the result is wrong? you can check out this thread as well, you just be displaying the wrong format?
http://forums.ni.com/ni/board/message?board.id=170&message.id=203490&requireLogin=False
Thanks,
08-30-2009 02:33 AM
Hello,
I think it's not just a display issue... because the ASCII string is the output of "Number to Hex String" vi, so if I change it's display to hex, I see the hex values of the characters themselves, which is not what I want. On the other hand, the result of the concatenation has to go to a "Serial Write" block, so it has to be in hex display.
Here's my vi, and an example: I need the hex equivalent of 2000, which is 000007D0, to be concatenated with a constant hex display string 0004 000D 15.
So it would look 0004 000D 1500 0007 D0
But it's not what I'm getting.
Anyhow, I thought it was a very long shot to post to this thread (now I see I was wrong...), so I opened another one... and got a solution suggestion that works:
http://forums.ni.com/ni/board/message?board.id=170&message.id=436312#M436312
But I 'd surely like to know if there is a faster way...
Thank you for you time 🙂
Michal
08-31-2009 11:19 AM
Hi Michal,
This is a classic problem of the difference between converting to Hexadecimal strings and flatteing data to a string.
The first method will create an ASCII string with Hex letters as each character. The second method will take any kind of data and without converting the actual bits, simply changing the data type to string. Both are correct ways of doing things, but you cannot mix and match the two. Try one of the two methods:
Hopefully this helps