04-12-2011 11:49 AM
Hi, I am trying to go from ascii characters to Hex. It works fine. but I need my hex numbers to show in 4 columns ( as show on this text file, how can I do that?
04-12-2011 12:33 PM
Four columns on your front panel string display? Then just resize your string indicator so it is only wide enough to show 4 bytes across.
Or do you want this to show in a text file? Then convert the string to a byte array. Resphape the array from a 1-D to a 2-D. Convert to hexadecimal characters. Then use the 2-D input for strings for Write to Spreadsheet file to output to a text file.
04-12-2011 01:03 PM
Ravens Fan beat me to it. But here it is in code.
04-12-2011 01:06 PM
Thanks, but it looks like I cannot get the all thing.
04-12-2011 01:07 PM
Oh! Thanks, I didn't see this last reply yet.
04-12-2011 01:10 PM
@agyna wrote:
Thanks, but it looks like I cannot get the all thing.
You misunderstood what Ravens Fan said. He told you to simply resize the front panel string indicator, not to chop up the string in code.
To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
04-12-2011 01:10 PM
For the non-Regex-impaired and those who dislike padding with zeros.
04-12-2011 01:21 PM
@Darin.K wrote:
For the non-Regex-impaired and those who dislike padding with zeros.
Regular expressions are much more clear after they have been compiled to machine code.
04-13-2011 10:38 AM
Thanks a lot, both are giving me what I needed.