- HMI Model: cMT2058XH
- EasyBuilder Pro Version:V6.10.01.217
Have a datatype STRING in PLC (Codesys) that displays properly when set to UNICODE. However when using the on-screen keyboard to input data, only the first char is saved.
As a workaround, I’ve created a duplicate ASCII object with UTF-8 encoding and input enabled that sits behind another ASCII object with UNICODE encoding and input disabled. This allows entry while still displaying correctly for the user.
Is there anything I am missing to allow UNICODE entry? The workaround is functional, but probably not ideal long term.
A couple additional pieces to make that workaround viable.
To make the user experience better, seeing the string in the field is nice. Have to add an action before writing to set a bit high. Add another action to set the same bit low after writing. Use this bit as a security bit for the Unicode ASCII object to hide it when the user is entering a new value. If the user closes the keyboard without entering a value, the bit will remain high. In my case this was in a pop-up with a closing macro so I just force the bit low when closing pop-up, but may vary with use. Maybe there’s a system bit linked to the keyboard that would work also.
Hi @durallymax,
I believe this will occur when selecting “One char per word” within the IEC-61131 STRING type selector. Can you please re-import the tag file and select “Two char per word”?
Then, within your ASCII object, please change the encoding format to UTF-8:
When using the settings mentioned above the issue you’ve described should not occur!
That appears to have fixed it. Thanks!
1 Like