Concatenate the hex strings

In the attached example, VI is there a way to have the 1 b be represented as Hex instead of ASCii after the output string concatenation? Why function concatenate strings automatically converts the 1B in ASCII?


Rather than convert the number to a string of ASCII characters, you should change the representation of the byte in a string. If you always want only a single byte, use the U8 instead of I32 data type. Convert an array of U8. Convert to string. Concatenate. Lynn

Tags: NI Software

Similar Questions

  • When I concatenate the hexadecimal values of 2 different ways a get different results

    When I concatenate 2 strings in "hexadecimal view" the result is what I want.  When concatenate [a decimal number converted into a hexagon] with [a string in "Display Hex"] the results is very different.  Attached shows the code 2 cases.  In my code, why different 'LDD_Command 2' of 'LDD_Command '?  Thank you.

    The digital conversion to the hex string it gives normal representation (indicator LDD_input) chain. You display in the string with the representation of the hexagon (second part of the command LDD 2), they are not equal.

    If I understood you, you need display data (0CCD is hex for 3277 = u16(1/20*65535). If you need to have data with the representation of string - data should not change, expected just the way which display you them. This is done with the type cast.

  • How to convert the Ascii string containing hex to hex string info?

    Dear all,

    I am busy doing a control/reading program for pumps of ISCO.

    Right now I'm in trouble with to send orders for PUMPS in HEXADECIMAL. When I use a CONTROL to the STRING in HEX display, everything works fine (when I manually write down the command in the control of the chain).

    Exist it a couple of pieces order: string Destination, length, ordering, Checksum. I'm doing a sup - screw that automatically calculates the checksum (modulo 256) and adds it to the string. Everything is going well: first of all, I shared the ascii bytes command and I calculate the checksum and add as ASCII HEXADECIMAL value to the chain of command. Also a CR (= 0d) is added. Now the whole string must be converted to hex. The string contains the right nummers HEX, but they are in ASCII format. Here was I feel worth it, I don't know how to do it!

    So to summarize:

    I have an ascii string that contains the values HEX (for example 315230303652454D4F544531420D) and it must be converted to a HEX string (for instance 3152 3030 3652 454 4531 420 4F54) for the pump of the ISCO can understand the command.

    The VI is attached.

    Thank you in advance,



    This should do what you want.

  • concatenate the data in 2 tables in a third table as well as in CONCATENATE strings

    Hello. as the title says, I wish to only concatenate the data in 2 tables in a similar third table that concatenate strings don't. All tables should be 1 d. For example, suppose that there is 1 table with the following: 1. 2; 3; 4 and table 2 with:; b; c; d. I would like a table 3 either 1 a, 2 b, 3 c, 4 d. Now this could be done easily with above mentioned concatenate strings, then table construction. but table 1 and 2 have something like 150 items. Rather painful. Any ideas?

    Hold arrays of two strings in a loop for example, concatentate the strings inside the loop and run the result réécrirait array3.

    Autoindexing manages table manipulations.


  • How to concatenate the string with a digital command?


    How to concatenate the string with a digital command?

    Thank you.

    I think I forgot to add the semicolon, what you can do is, drag the CONCATENATE function and add semicolon.

  • concatenate the strings comand...


    I must repeat that channels below a large part of the time (ON SQL MORE);

    Now I do with comand of copying and pasting each string, but it is very unconfortable.

    How to concatenate the string in a string only, or max 2 strings?

    .. .so I need that I copy/past comand to do all operations of this...


    create user Patrick identified by loan;

    Grant connect, create session, imp_full_database to Patrick;

    GRANT to CREATE ANY WORK to Patrick;

    modify user quota unlimited Patrick on the SYSTEM;

    grant unlimited tablespace to mx;


    sqlplus command line allows you to paste together multiple orders (lines) and it then executes sequentially.

    Hemant K Collette

  • How do to convert the string (with the Hex data) in number?


    I use TestStand 3.5 to automate a few test cases associated with boot loader.

    The requirement is that I need to read the value in some places for specific address. The values of these addresses are stored in a hexadecimal format.

    We have a step customized in TestStand through which we can read these values by address, but she returns as the type "String".

    For example, the value to 0 x 0000008 is 000001 B 2, and he returned in Locals.Value_Read as "000001 B 2" in the string.

    Is it possible, I can convert the string "000001 B 2" to a number?

    I tried to use the function-> val (locals. Value_Read), but it is return 0 as TestStand figures that the input string is not representing the valid number.

    Please help me with this.

    Thank you and best regards,


    Try: Val ("0 x" + Locals.Value_Read)

  • concatenate a hexadecimal string

    I'm trying to communicate through a circulation bath series, but it requires that all orders as a hexadecimal string.  I generate a portion of the string as a constant, but I need to convert a decimal point and add it at the end of the string.  I can convert the decimal to hexadecimal very well, but when I concatenate the strings is not hex ASCII format.  I tried a number of different tracks but am not having success.  Any help out there?

    Too bad.  I have it.  Just need to convert in I16 then catalogued for hex.

  • Conversion number to a hex string


    I want to send a command string hex to a device via the serial port. The chain includes a fixed part (address, function, register) and editable part (setpoint). The fixed part is a string constant hexa (0106 0022) the editable part is a number (1000) converted to string hex (03E8). Finally, the two are coding pour get the final string. The problem is that instead get: 0106 0022 03E8, I get: 0106 0022 3033 4538.

    After concatenates two strings, it seems that the second part is turned into ASCI.

    I can't find the solution!

    Thanks for your help.

    Sorry, I saved the vi in a different version.

  • Question about reading the hex data

    Hello! I'm a Novice of Labview and have a problem with reading the hex data.

    Basically, I bytes from the serial port like this: "80100E0E0AB4F646F24A00911267087E032080057FFF."

    It is not encoded in ASCII. What I want to do is to convert a hexadecimal string ASCII of the hexagon.

    so that the chain would become of ASCII hexadecimal numbers.

    I think that the following might be a solution, but I have no idea what the Subvi is in the solution. Thanks in advance and I thank you for your kind help!

    coolmatthew wrote:

    What I want to do is actually this.

    You use too much a lot of code for all this. All you need is a concatenate strings, replace your entire and other loop. Same result.

    (See also)

  • integer to hex string

    Hello gentlemen,

    I'm having this problem try to send a 18 bytes in HEXADECIMAL string according to my device using the TCP request schema

    As you can see in the attachments, if I use the string concatenation function and hardcode the 18 bytes as constant as HEX display, the message is valid and the device responds correctly.

    The next step is to have F and 11 as user input bytes, so I replaced the two constants '14' and '15' with two digital inputs and using the hexadecimal string number I hooked up the output of the function F of Byte and byte 11.

    The output of the number of hexadecimal string is correct as I enter the value 20 and function converts to 14 (hex) if I have an indicator of the value to the normal display.

    If I change the indicator to display Hex then I get the ASCII representation of the value 20.

    The problem is that if I connect the output of the number of hexadecimal string to the string to concatenate instead of the constant value 20 is represented as "3134" as ASCII.

    How can I convert a value of 20, which is a hexagonal I32 14?

    I've attached a few screenshots of the code working with constants and does not not with I32 conversation Hex.

    As your values may go in a single byte, change your your two entries U8 or I8 data type.  After that, just use Type Cast to change these bytes to a string.

  • Concatenation of Hex and bites of ASCII to get a HEX string


    I'm trying to concatenate a MODBUS Application Protocol header with a function code and data that I send over TCP/IP to a motor controller.  I am running problems when I try to read my code function and data length.  I use "string length" to read the order data that I am seized, that convert a hexadecimal number, and then that the concatenation with some strings constant hexadecimal display and my function code and data which is also in the hexadecimal display. When I concatenate the lines, the end message is incorrect because (I think) the length of string, I have read and converted to hex in ASCII text?

    Does this sound as if that was the problem, and if this is the case, can someone help me to fix? If this isn't the problem can someone help me understand what is?

    Thank you


    Converting to hex it will show as ascii, it is what it is, a human readable number represented in hexadecimal. What if all you want to do is add the gross value, then convert this to tank and add it. For example, if you have more bytes data then 16 then you will add two additional bytes to the end instead of one.

    What if all you try to do is add a vale bytes that represents the amount of data you send simply converted in a single tank and add, as shown above. Of course, this means that the length of string cannot be greater then 256.

    Even if you have less then 16 bytes of data to the hexadecimal value added at the end is only 1 tank so unless the receiver is supposed to read a hexadecimal value, it will be always wrong. For example, 1 in hexadecimal read like 49 gross.

    Hope this helps,



  • Incorporate the binary string in the string spreadsheet file

    Hello LabVIEW wizards...

    So I use scripture to VI file spreadsheet to create a beautiful layout, tabs-delimited report of one of my programs for the acquisition of data file. In one of the cells in the resulting worksheet file that I want to put a binary string of all my control values so when you open the data file all the control parameters used for its manufacture are restored, but the string is hidden when the report is displayed in Excel.

    The problem is that the binary string flattened uses tabs and returns as part of its syntax the Spreadsheet File this VI to Write it's going in all directions. Worse yet, I can't unflatten chain when I open the file text because of "corrupt data or unexpected".

    If I concatenate the string flattened with quotes around it she is superb and is placed in a single cell in Excel, but when I open the file in LabVIEW that she is still several elements in the array. I've isolated the binary string using the file VI text reading and got a subset of the quoted string, but it still unflatten correctly.

    Essentially, I need to know how to get LabVIEW to pull a string literal full of special characters into a spreadsheet file and it unflatten. Any gurus what help you can provide is greatly appreciated.

    Thank you



    I suggest that you change the formatting of your chain shipped by replacing the tabs and returns with other characters that are not considered as commands by the spreadsheet functions. Without knowing how you represent your control binary values, I can't offer specific characters.

    If two non-printable characters exist which do not appear in the control data, it's easy: just find and replace tabs and returns with those characters.  If there is no character, then something more complex needs to be done for example to escape special characters.  Or create two subVIs - one to remove the tabs and returns before writing the string in the file and the other to restore after reading.





    Enum values are strings, you must first convert the hexadecimal value to a hexadecimal value chain represtation.

    Then that convert from the enum.

  • normal string to hex string

    Hi all

    This question has probably been asked before, but I can't seem to find a situation that quite matches the issue I am experiencing. I have a table that I flattened as a string of data, reverse order, take the first two elements, reverse the new order and feed the characters in a loop for. I want the string to hexadecimal, thus having FE0C (in hexadecimal) through the loop for, but when I select the execution I see that normal display characters cross instead. When I view my channel, I already have a right-click to display the hex that is correct. How to convert the normal string to a hexadecimal string?

    Thank you


    You can use Type Cast to change into a U16 (since it is supposed to be 2 bytes) or the Unflatten of the chain.

Maybe you are looking for

  • Tecra M5: The service Detection failed with the headset BT-HBH-IV835

    Dear friends! Somehow my previous topic disappeared without reason. There is no suitable answer to that in "feedback technical support forum" ( In accordance with the recom

  • Data dashboard

    Hello Can someone please give me detailed instructions on how to perform measurements of 9191 cDAQ chassis and see the results on smartphone using the dashboard of data.

  • A1, does not start after charging. LED remains lit, even when unplugged

    I started to load my A1 last night and today when I disconnected, the Green LED was still after unplugging it and I could not start, I tried immobilizes the power for 30 seconds button, nothing happens... Also tried with Volume - and power, nothing.

  • Upgrade ram HP dv7 3133el

    Hello, I have a dv7 3133el, I have replace the HDD with a ssd, and now I want to increase the ram of 4 GB to 8 GB, wich type of ram I buy? Thank you

  • Can someone tell me where I can buy a replacement for my Aspire S3-951 OEM battery?

    I bought one that was supposed to be compatible - and looked like exactly the same that the one came it with my Ultrabook - but my system comes the battery was "detected" and stop as soon as I pulled the power cable. Searched the web for help and fou