I don't have an answer but I was wondering if you have found out more about using wildcards in Codesys?
Util library has the following: BYTE_TO_HEXinASCII (FUN) (byte to corresponding word) HEXinASCII_TO_BYTE (FUN) (corresponding word to byte) WORD_AS_STRING (FUN) (corresponding word to string) https://product-help.schneider-electric.com/Machine%20Expert/V1.1/en/Util/index.htm?#t=topics%2Ffld-hexascii-functions.htm