LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hex string

Hello ,

            I have a normal string 01 00 02 00 01 00 00 00 this has to go to already made function as hex value i.e 0100 0200 0100 0000  how to achieve this.

 

srini

0 Kudos
Message 1 of 11
(3,909 Views)
String pallette >>  String/Numer conversion  >> Hexadecimal string to Number function.
0 Kudos
Message 2 of 11
(3,904 Views)
sorry i didnt get you, u want me to convert string in number and then back number to Hexstring. if i do that i get only a single value
0 Kudos
Message 3 of 11
(3,901 Views)

Try this:

 

 

(Mak sure you use the correct datatypes. What is your LabVIEW version?)

Message Edited by altenbach on 12-08-2008 12:16 PM
0 Kudos
Message 4 of 11
(3,890 Views)

http://forums.ni.com/ni/board/message?board.id=170&thread.id=373185 may be of some help

 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 5 of 11
(3,888 Views)

srinivas wrote:
sorry i didnt get you, u want me to convert string in number and then back number to Hexstring. if i do that i get only a single value

Then you'll have to be a little clearer in what you want.  What do you expect the results to be?  You said you wanted a hex value.  Now you are saying you want a string?

Message Edited by Ravens Fan on 12-08-2008 03:36 PM
0 Kudos
Message 6 of 11
(3,876 Views)

Ravens Fan wrote:

Then you'll have to be a little clearer in what you want.  What do you expect the results to be?  You said you wanted a hex value.  Now you are saying you want a string?


The problem are the "spaces" in the input string, else we could just parse it as U64 (as you possibly proposed).

 

That's why we have to use "spreadsheet string to array" with space as delimiter. If we always have exactly 8 bytes, you can also typecast the resulting byte array to U64. Modify as needed.

0 Kudos
Message 7 of 11
(3,871 Views)

Hello altenbach.

                           i tried but i getting first byte only see the attached file, i am using labview 8.5

 

 

 

 

 

 

0 Kudos
Message 8 of 11
(3,838 Views)
That's because your string is not delimited by spaces, but tabs.  See the attached VI.
0 Kudos
Message 9 of 11
(3,829 Views)

Simply delete the "space" constant. Your delimiter between the values is "tab", not "space". 🙂

 

(tab is the default for this function, so you don't need to wire it)

Message Edited by altenbach on 12-08-2008 05:48 PM
0 Kudos
Message 10 of 11
(3,828 Views)