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,

Bio

Bio,.

This should do what you want.

Tags: NI Software

Similar Questions

  • How to convert int to String

    How to convert int to String. I get the error 'cannot convert integer to int.

    Dim str As String = "abc";

    int NB = Integer.valueOf (str);

    Use Integar.parseInt (). But make sure your str contains the integer value (like str = '123') otherwise you will get the exception.

    String str = "123"; int num = Integer.parseInt(str);
    

    Concerning

    Bika

  • How to convert the following code in as3?

    As the title says... How to convert the following code to as3?... Thanks in advance.

    import flash.display.BitmapData;

    linkageId = "landscape";
    myBitmapData = BitmapData.loadBitmap (linkageId);


    MC = this.createEmptyMovieClip ("mc", 1);
    mc.attachBitmap (myBitmapData, 1);

    onMouseMove = function() {}
    myNewColor = "0 x" + myBitmapData.getPixel(_xmouse,_ymouse).toString (16);
    newColor.setRGB (myNewColor);
    selectedColor.colorValue.text = myNewColor;
    }
    selectedColor.swapDepths (_root.getNextHighestDepth ());
    newColor = new Color (selectedColor.sample);

    :

    var myBitmapData:landscape = new landscape (0,0);

    var bmp:Bitmap = new Bitmap (myBitmapData);
    addChild (bmp);

    stage.addEventListener (MouseEvent.MOUSE_MOVE, f);

    function f(e:MouseEvent):void {}
    var myNewColor:String = "0 x" + myBitmapData.getPixel(mouseX,mouseY).toString (16);
    newColorTransform.color = uint (myNewColor);
    selectedColor.sample.transform.colorTransform = newColorTransform;
    selectedColor.colorValue.text = myNewColor;
    }
    addChild (selectedColor);
    var newColorTransform:ColorTransform = selectedColor.sample.transform.colorTransform;

  • How to convert the precision extended float to float in C++

    Hello

    Could someone me please how to convert the extended precision (floatExt) float normal float in C++?

    What is the difference in the float between Labview and C++ data type?

    When I tried to receive a range of float of a function of the DLL generated by Labview in C++, data are bad.

    Thank you

    Victor King

    You can search for numeric data types in LabVIEW help for more information on the different types of data. Before sending the data to the C++ application, you can use the function of Double precision on digital / range of Conversion to convert number to Double precision.

  • How to convert the date in milliseconds?

    Hi all

    Can I know how to convert the date in milliseconds?

    My current datetime like this Formate

    QDateTime::currentDateTime (m:System.NET.SocketAddress.ToString ("MMMM dd, yyyy HH"))

    Seconds since January 1, 1970

    http://Qt-project.org/doc/Qt-4.8/QDateTime.html#toTime_t

    Sinds milliseconds January 1, 1970

    http://Qt-project.org/doc/Qt-4.8/QDateTime.html#toMSecsSinceEpoch

  • SQL: how to display the second string of the function in the Jobs table only if the function has more than one string.

    SQL: how to display the second string of the function in the Jobs table only if the function has more than one string.

    Hello

    You can use REGEXP_SUBSTR Oracle/PLSQL: REGEXP_SUBSTR function

    Select the function double REGEXP_SUBSTR('PUBLIC RELATION REPRESENTATIVE ','[^]+',1,2);

    Do you have any value of the column as no 2nd string?

  • Please how to convert the photo to the second

    2012-Kia-Rio-SX-side1.jpg11707850_10153403835594354_514303523436587694_n-1.jpg

    Please guys how to convert the kia rio pictures the second perfect like this, and with any program, I know that all steps in details please its very important

    That looks just like you would use the tool pen to redraw on the image and create shape layers (black areas). It could be done in Photoshop or Illustrator.

    Using Photoshop | Draw with the pen tools

  • How to change the ascii mode in dreamweaver?

    How to change the ascii mode in dreamweaver?

    Dreamweaver should automatically switch to ASCII as you can see from the following FTPExtensionMap.txt content

    In case you want to check your FTPExtensionMap.txt file, it can be found in the Configuration file according to the Dreamweaver crashes at startup

  • Hello, I have a full desktop in Adobe Muse, site and I want to convert it into a version Tablet & phone, then, how would convert the site Office to Tablet & phone to copy the entire office content and site structure? Thanks for any help.

    Hello, I have a full desktop in Adobe Muse, site and I want to convert it into a version Tablet & phone, then, how would convert the site Office to Tablet & phone to copy the entire office content and site structure? Thanks for any help.

    You can not automatically convert. Click on the "tablet" or "Phone" at the top of your plan view to create these versions.

    You can then copy and paste on any content you want has more of your office.

  • How to convert the hierarchical query of SQL Server (CTE) to Oracle?

    How to convert the hierarchical query of SQL Server (CTE) to Oracle?

    WITH cte (col1, col2) AS
    (
    SELECT col1, col2
    FROM dbo. [tb1]
    WHERE col1 = 12
    UNION ALL
    SELECT c.col1, c.col2
    FROM dbo. [tb1] AS c INNER JOIN cte AS p ON c.col2 = p.col1
    )
    DELETE one
    FROM dbo. [tb1] AS an INNER JOIN b cte
    ON a.col1 = b.col1

    Hello
    Something like this maybe:

    DELETE FROM dbo.tb1 a
     WHERE EXISTS (
      SELECT 1
        FROM dbo.tb1 b
      WHERE a.co11 = b.col1
          AND a.col2 = b.col2
       START WITH b.col1 = 12
      CONNECT BY b.col2 = PRIOR b.col1)
    

    Although you need to do here is to check that CONNECT it BY SELECT, returns records you wait first, then the DELETION should work too.

  • How to convert the string with numbers in U8 with ascii

    Hello

    I have a string with only numbers 0. 9 paper.

    Now, I want to convert to table-U8.

    He works here, but now the problem: How can I change each character to its ascii value?

    Example:

    entry: 123 (string)

    output: x 31, x 32, x 33 (U8-array)

    Thanks for the help

    It's very easy

    String to Byte Array Function
    Have the Palette: string/array/path Conversion functions

    Converts a string to an array of unsigned bytes. Each byte in the array has the ASCII value of the character corresponding to the string.

  • How to convert the array of integer to string

    Hi, I'm trying to convert the table of 32-bit integers to a string. For ex: If the array contains {1234, 4567, 8, 9} I need string like {00.00, 34,12, 00, 00, 45, 67,...}

    How to do this one.

    Help, please

    Thank you best regards &,.

    Harish. G.

    Hi Haris,

    use the above solution as it seems you really want figures BCD...

    Or this slightly improved version:

  • How to convert the binary value to a binary string in labview?

    Hi all

    I need to convert the binary value to a binary string. We have decimal or hexadecimal or octal number to decimal string, hexadecimal and octal string

    Hi pgm, use the function 'Format to a string. See the attached example. "%b" is the binary number in number in string format specifier.

  • How to convert an ASCII integer?

    Here I am trying to send the number 1000000 microcontroller by UART and I get the ASCII in labview. But I would get 1000000 exact in labview also. So I try to convert ASCII in full, but I'm unable to do so.

    danil33 wrote:

    Hello Marsu,

    Please don't feel bad. Smercurio and all the other experts try to make us do things on our own. This will make us experts in labview. This is why he told you to go through the tutorials. I've heard this type of advice (sometimes they scold us) so many times. Still Iam hearingit's our fault if we won't go through the tutorials properly. Don't get excited.

    In addition, the question is relatively clear formulated and almost makes me assume that the OP did not bother to look a solution himself. As the OP receives a string, it would be logical to look at the range of string for a function to do what he wants. And inside this palette, there are magically a range of Conversion/string number, that sounds almost like it could contain at least a function that could do the right thing. (In fact, it contains 3 that might work, but I don't know that the OP may find makes the most sense for his races).

  • Send the ASCII string as command to device Modbus Ethernet

    Hello precious developers,.

    How send us the next command in the chain from a PC to a Modbus Ethernet device to start using LVDSC 411000 address:

    "H""$0D""$0A"

    (Function code 16 - write several operating records)

    Pointers / suggestions / code example should be deeply appreciated.

    Do you know how many records it will take?  (I'm guessing 1 registry for all 2 characters).

    String to byte array to obtain a table of ascii characters that make up the message string.  I would use decimate the table to get 2 tables 1 d of each other byte U8.  Can use numbers to join to get a table 1 d of U16.  Then, you can send this U16 table using the LVDSC module to the correct registry address for however much it records needs.

Maybe you are looking for

  • Unable to connect to my old account

    I wiped my Mac to install Yosemite. I checked my firefox login information before I did to make sure that I could recover my favorites. It was related to my email, [email protected]. But now when I try to recover my account name or password us

  • Web site shows me the ugly or illegible fonts after installation of Helvetica neue. (Firefox)

    Some sites like Yahoo and Facebook show me ugly fontn and its very disturbing. I tried to uninstall the neue Helvetica and the problem has been resolved, BUT I really need the police for the work.PS: I use the last version of Firefox. No problem seen

  • Two devices in Vista on Satellite M100-222

    Under Windows XP, a playback device has been recognized for the laptop. Sound can be heard through the computer speakers portable or you could plug in headphones and hear the sound of their share. Under Windows VISTA, two reading devices or "High def

  • Representatives of Apple

    Hello. When apple come to iran? We are looking forward to it

  • adding channels to daqmx after conversion Express

    Hi all I am updating a VI I created a couple of years.  This is my first.  I used the VI Express DAQ.  I have received complaints about the computer hang up once in a while and thought it might be due to the Express.  So I used the LabView function t