Showing results 1 to 2 of 2

Thread: Hexadecimal to ASCII Coversion

  1. #1
    Join Date

    Default Hexadecimal to ASCII Coversion


    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,

  2. #2
    Join Date

    Default Re: Hexadecimal to ASCII Coversion


    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,

Similar Threads

  1. how to convert the content of a variable in decimal into an hexadecimal value
    By mos89 in forum Engineering Studio Logic & Logic Service (former zenon Logic Workbench & Runtime)
    Replies: 12
    Last Post: 15th March 2021, 11:08
  2. Dynamic limit texts with hexadecimal value
    By lew in forum zenon Service Engine 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