It is correct that the squares are because the memory area of the string has not been initialised.
I think it is not enough to merely fill all the bytes with zeroes.
A STRING is formatted so that the first byte contains the reserved length in characters/bytes, the second byte contains the length of the actually used characters/bytes, and from the third byte and to the end of the string you have the real charachters.
To initialise, create a an empty STRING in a DB (only contains the '', but has same reserved length as the STRING to store the barcode), then BLKMOV this empty string to the barcode STRING memory.
edit: That actually doesnt empty the memory of the characters, it just sets the actual length to zero. The STRING will correctly be displayed as empty on the HMI despite that the character memory is not cleared.
To fill the string with characters from the barcode scanner, you have to detect the number of actual characters, and store this value in the second byte.