converting Ascii

Spring
2020-05-22
3 days ago
  • Spring

    Spring - 2020-05-22

    Hello all,
    Is it possible to convert ascii code to a real or integer?
    How is it possible to store the ascii in a value using Binary Coded Decimal?
    BR,

     

    Last edit: Spring 2020-05-22
  • m.prestel

    m.prestel - 6 days ago

    Hello,

    VAR
        sText : STRING := 'a';
        uiValue : UDINT;
    END_VAR
    uiValue := sText[0];
    

    Best regards,
    Marcel

     
    • Spring

      Spring - 3 days ago

      Thanks Marcel.

       

Log in to post a comment.