01-29-2007 01:43 PM
01-29-2007 01:46 PM - edited 01-29-2007 01:46 PM
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
01-29-2007 01:54 PM
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
01-29-2007 01:57 PM
01-29-2007 02:14 PM - edited 01-29-2007 02:14 PM
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
01-29-2007 02:15 PM - edited 01-29-2007 02:15 PM
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
01-29-2007 02:16 PM - edited 01-29-2007 02:16 PM
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
01-29-2007 02:33 PM
@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.
01-29-2007 02:39 PM
01-29-2007 03:37 PM
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.