Search code examples
encryptionhexdecimalplcst

ST(structure text) transfer data from hex to decimal


I need to transfer data from hex to decimal. Data I get as a string. Can someone help with this? Is it possible with ST make it?

Thanks.


Solution

  •     Dec_data:= 'ABCD';
        pVar := &iIntVar;
        usiRes:= STR_TO_BIN(Dec_data, pVar, 'X');
        strResult := BIN_TO_STR(pVar,'d');
    

    As result is STRING '43981'