LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hex string and normal string concatenate issue

Hello,

what i have is a hex string and a normal string which i want to concatenate into one string.  the problem is that in the output concatenated string you need to select either "normal display" or  "hex display" in the properties.  the problem is if you select hex display then the normal string is converted into hex and if you select normal display then the hex value is not correct.  is there a way to display the hex value in normal display mode?

attached is a vi showing the problem
0 Kudos
Message 1 of 8
(4,019 Views)
You are mixing ASCII and Hex.  Chose one or the other, make all hex, then convert when done.  Your progam is working but it is a display issue.  Turn teh display to hex and you will see 0x69 & 0x66 AKA ASCII "if"
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 8
(4,013 Views)
What Matt is saying is true..
 
In your code, it's actually a display issue.
 
What are you trying to do? 
 
For instance, are you reading a binary file (which contains HEXadecimal values) and you are trying to encapsulate this as part of a command (for example) and send it as string to (let's say) a serial port...??...
 
What I'm getting at is:  do you need to preserve the hex representation and concatenate it with a string?
 
Let's look at this example..:
 
HEX value:  0xBA 0xAD 0xF0 0x0D
 
String:  CMD
 
You want to send / create a concatenated string which would look like:  CMD BAAD F00D
But you get :  CMD º­ð
 
Is this the problem? 
 
RayR
0 Kudos
Message 3 of 8
(4,005 Views)
it is a display problem.  i am creating a state machine and then translating it into string representation.  what i want the string to look like is

If group = "hex value"
then "do this" 

so i do need strings and hex in the same representation.
0 Kudos
Message 4 of 8
(3,999 Views)
actually i don't need to have string and hex in the same display.  i just can't figure out how to do the conversions to display the correct output.
0 Kudos
Message 5 of 8
(3,992 Views)

Do you mean how to change the indicator display from hex to normal view (ASCII)?

Simply right click on the string indicator and select "Normal View".

0 Kudos
Message 6 of 8
(3,985 Views)

lfoitek wrote: ...  i am creating a state machine and then translating it into string representation ... i just can't figure out how to do the conversions to display the correct output.

If by "correct output", you mean you want something like 4bytes (0xBADDF00D) converted to 8bytes ("BADDF00D" in normal display), then there are several ways ...

Message Edited by Donald on 08-31-2006 04:17 PM

=====================================================
Fading out. " ... J. Arthur Rank on gong."
Message 7 of 8
(3,982 Views)
thanks Donald, that is what i needed, i used the first example
0 Kudos
Message 8 of 8
(3,966 Views)