From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting ASCII Hex into raw hex bit level code

YES, I UNDERSTAND IT IS ASCIII>  PLEASE READ MY PREVIOUS POSTINGS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
THIS IS GIVING ME A MAJOR HEADACHE!!!!!
 
HOW DO I CONVERT MY 2 BYTE HEX INTO NON PRINTABLE ASCII??????????????????????????????????????????????????????????????????????????????????
BTW- I appreciate your examples, but they are not the solutions I'm looking for.   This is a very simple problem, with a very simple answer, but you folks are making it too complicated.
 
 
 
Rick H
0 Kudos
Message 11 of 32
(15,426 Views)

I can't look at your code either but tst's method or the type cast I showed will work when you start with a U8 number. If you are starting with something else, post back with that information.

And calm down a bit. What exactly is the format of your '2 byte hex'. I asked that before. Is it a string value or a numeric value? Since we've given you the procedure to convert a number to it's hex string, you might want to look at the code below. If you have an input (in normal display) such as FF, then this will output FF in hex display.

Message Edited by Dennis Knutson on 01-29-2007 12:52 PM

0 Kudos
Message 12 of 32
(15,429 Views)

Dennis,

 

Attached is another example.  This is my VI that makes my calculations and convert them into a two byte hex.  I NEED TO KNOW HOW TO CONVERT THIS INTO NON_PRINTABLE ASCII.

 

Thanks,

Rick H 

0 Kudos
Message 13 of 32
(15,421 Views)
I guess you didn't read the part about my not being able to open your VIs. Post an image of the block diagram.
0 Kudos
Message 14 of 32
(15,415 Views)

I can't open up LV 8 but are you tring to do something like this?

Message Edited by paulmw on 01-29-2007 02:14 PM

0 Kudos
Message 15 of 32
(15,402 Views)

Please see if the attached will work for you. This will take a string of two bytes HEX values and convert them to the corresponding U16 values and string of non-ASCII characters.

 

Message Edited by Christian L on 01-29-2007 02:15 PM

Message Edited by Christian L on 01-29-2007 02:17 PM

Message Edited by Christian L on 01-29-2007 02:17 PM

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
Download All
Message 16 of 32
(15,412 Views)

I have to say, you aren't describing what you want to do very well, and you're snapping at people that are just trying to help you.

However, this is what I believe you want to do. This will take a normal string, convert every 2 characters to an ascii value based on the hex it represents (FF = 255), then build a string with those characters.

Edit: there, you got 3 answers. One of these has to be what you want. Although Christian and I have the same basic idea.

Message Edited by Marc A on 01-29-2007 03:18 PM

0 Kudos
Message 17 of 32
(15,402 Views)


@marc A wrote:

...Although Christian and I have the same basic idea.


Which I have already suggested twice, so either that's not the goal or that it is Rick who is not really paying attention. I would vote for the latter.

Rick, you should note that you did refer to two distinct types - the "intelligent standard ASCII characters" and those which are not printable and my point was simply that there is no difference at all between them other than the fact that you can not generate the second type with a single keystroke.


___________________
Try to take over the world!
0 Kudos
Message 18 of 32
(15,371 Views)
Indeed you did tst. Maybe now that there are 2 example pictures, he'll see that it's what he needs to do. Somehow I think we might see some more caps lock abuse, though 🙂
0 Kudos
Message 19 of 32
(15,367 Views)

Marc,

I'm not lashing out, I'm simply frustrated that I can't explain something so obvious and simple.  below is an ASCII chart.  Please note that the lower value HEX values equate to non-printable ASCII.  I am simply requesting a method of converting an ASCII Hex value into a non-printable ASCII hex value.  Referring to the table below- I have HEX 4E, this equates to a simple N ASCII charater that so happens to be a printable character.   Now let's say I want 0D, well that would be a non printable ASCII character representing a Carriage Return.  I'm sure I could eventually build myself up a look up table, but I would think there would be a SIMPLE CONVERSION VI that could do this.

If my posting appear brash or offensive I sincerely apologize, but I can't explain this in anymore detail and it's driving me nuts!!!  This forum has been extremely helpful in solving some of my more technical questions, and for that I am truly grateful.  However, this is a no-brainer type of question that at first I was embarrased to ask and expected the tell-tale ,"DUH!" response in return.

As for a solution to this problem, I think you may have an example I can use.

 

Thanks to all,

 

Rick H. 

 

 

 

 

 

0 Kudos
Message 20 of 32
(15,351 Views)