LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I convert a string of hex values to a hex format string programatically?

Solved!
Go to solution
Thank you!
0 Kudos
Message 11 of 21
(1,268 Views)
Nice solution Darin.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 12 of 21
(1,266 Views)
OK, I had a thought this morning when I was one the road to work. I was impressed with Darin's suggestion and got to thinking about it. Now, for the teaching moment. One of the suggestions with a minor modification would be much more efficient if the input data was a large buffer. So, which one is more memory effiicient and why? Also, what would the modification be?


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 13 of 21
(1,238 Views)

Mark,

 

With your original VI it doesn't seem to work when the input string is 484 characters long. If I cut that in about half it works fine. Any idea why?

 

Thank you,

Chuck M.

0 Kudos
Message 14 of 21
(1,232 Views)

More specifically, after 256 characters, the output string, repeats itself.

0 Kudos
Message 15 of 21
(1,228 Views)
Post your code. It works fine with long strings. I just tested a 1024 byte string with no issues.
Message Edited by Mark Yedinak on 03-19-2010 12:05 PM


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 16 of 21
(1,219 Views)
My guess is that you have your index set to be a U8 integer rather than a U32 or I32 and it is rolling over when you increment it past 255.
Message 17 of 21
(1,213 Views)

Yes, exactly, I just discovered that a few minutes ago.

 

Thank you,

0 Kudos
Message 18 of 21
(1,211 Views)

I changed the initialization of the for loop from U8 to U16 and it works great

0 Kudos
Message 19 of 21
(1,209 Views)
Do you have LabVIEW 2009?  If so, Mark's screenshot was a VI snippet.  You could drag and drop that image from the browser to the block diagram, and you'd have the code.
Message 20 of 21
(1,207 Views)