Showing results 1 to 2 of 2

Thread: Hexadecimal to ASCII Coversion

  1. #1
    Join Date
    14.09.2017
    Posts
    16

    Default Hexadecimal to ASCII Coversion

    Hello,

    Can we convert Hexadecimal input to ASCII output using standard block in Straton?

    e.g I need to convert '31 32 33 34' to ASCII as "1234" and likewise others.

    Thanks & Regards,
    Rahul.

  2. #2
    Join Date
    23.10.2018
    Posts
    12

    Default Re: Hexadecimal to ASCII Coversion

    Hello,

    The only way I know to convert the hexadecimal representation of a character to the character (Eg. 0x31 to '1') is to use two consecutive blocks:

    ATOH and then CHAR. ATOH will convert '31' (decimal) to 49 (hexa) and then CHAR will convert 49 to '1'

    But there is notghing ready to use for this usecase, you will have to create your own block (function or UDFB)

    All useful blocks you may need are all under the "Strings" folder, in the block's list (bottom-right of the straton/zenon-Logic Editor, while a program is open)

    Best regards,
    Anthony

Similar Threads

  1. Replies: 7
    Last Post: 30th May 2018, 09:36
  2. Dynamic limit texts with hexadecimal value
    By lew in forum zenon Supervisor
    Replies: 1
    Last Post: 9th January 2012, 00:41

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •