Structured Text: String conversion to UpperCase

Hi Martin,

Here’s a short example for changing ASCII strings to uppercase (see attached sample task):

  • check byte for byte of the whole string
  • if the value is between hex 61 and hex 7A, then substract hex 20 (which is the offset between A…Z and a…z in the ASCII table)
  • if not, leave it as it is

UpperCase.zip (1.5 KB)

5 Likes