How to display a Chinese variable in HMI (CPS is also OK)

Hello, dear colleges,

Recently I have encountered a difficult problem, now i need your helps! 

I need to display Chinese characters on the HMI, and these characters are stored in variables. The content of these variables is obtained from a service that sends Chinese text to TwinCAT. So I cannot define them in advance in CPS.

Are there any solutions for displaying a Chinese variable in HMI?

Thank you in advance! 

Best reply by Cheng96

Ok, if you really want to display a Chinese variable in HMI, following is my solutions about it.

        1. Check the options shown in the following figure

        2. You need add a  PLC variable and select the variable type - STRING
        3. Add a newview and add a Mod_VarOut toolbox
        4. Link the variable u added at the step1
        5. Export
        6. Add "{attribute 'TcEncoding' := 'UTF-8'}" before the variable u added

           

           

        7. Now, you can try to display Chinese on your HMI.

 

(additional:you also can use following method to change the format)

 

View original
2 replies
Resolved