使用HOST_TO_BE16功能
VAR
in1 : WORD:=16#8941;
out1 : WORD;
END_VAR
out1:=HOST_TO_BE16(in1);
https://infosys.beckhoff.com/content/1033/tcplclib_tc2_utilities/9007199290054411.html?id=3817909134594575822