cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Converting hexidecimal string to ASCII string help?

Highlighted

Converting hexidecimal string to ASCII string help?

Not sure what to wire to these two functions or if I have wired this wrong. Would just like to know what to wire to each and a short explanation. Specifically in Scan Value: the format string and default inputs, and which output to connect which which input of the Type Cast function. And in the Type Cast function: what to put in for type input, and just to verify I've connected the x input to the correct output of the Scan Value. Thanks.

0 Kudos
Message 1 of 8
(116 Views)

Re: Converting hexadecimal string to ASCII string help?

Can you attach a simple VI?  In your VI, put a control and indicator with saved data s to what the input looks like and what the output is supposed to look like.

 

The picture  (why a GIF?) is hard to follow because you have wires running behind functions.

0 Kudos
Message 2 of 8
(115 Views)

Re: Converting hexidecimal string to ASCII string help?

What specifically are you trying to do? As mentioned in the post above you should provide example of your input data and what the expected output should be. Ours answers will depend on that information.



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 3 of 8
(113 Views)

Re: Converting hexadecimal string to ASCII string help?

here is a simple VI. 

0 Kudos
Message 4 of 8
(58 Views)

Re: Converting hexidecimal string to ASCII string help?

Trying to convert a hexadecimal string to an ASCII string. For example 44 50 21 into DP!.

0 Kudos
Message 5 of 8
(55 Views)

Re: Converting hexidecimal string to ASCII string help?


@mshask wrote:

Trying to convert a hexadecimal string to an ASCII string. For example 44 50 21 into DP!.


Is the input string literally the ASCII string "445021" or is it the representation of the binary data? How exactly is your input string represented? Here is some code that will convert a sting of hex data, represented in ASCII for to the actual ASCII characters.

 

Hex Replacement.pngI'm not sure if this is what you are trying to accomplish since it is unclear exactly how your input data is represented.



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 6 of 8
(50 Views)

Re: Converting hexidecimal string to ASCII string help?

it's base 16 input string

0 Kudos
Message 7 of 8
(38 Views)

Re: Converting hexidecimal string to ASCII string help?

I know what hexadecimal is. In that little VI you posted set the input string to an example of your actual data and save that as the default value and then repost the VI. In order to help we need to know exactly what your input looks like. I have asked several times and all you say is that it is a hex string. If it truly is the binary representation of the string then there is no need to convert the data. A string such as "123" can be viewed as ASCII or hex in a string indicator. Simply select the representation. Normal is ASCII and hex will show the hex values of the characters. If your input is something else, we actually need to see an example, in a string control, in order to assist you.



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 8 of 8
(27 Views)