🔧 PLC数据转换工具

📥输入ushort数据

选择字节序模式:

📤转换结果

📚 转换原理说明

问题分析:

你写入了5个int值[1,1,1,1,1],但读取时得到了10个ushort值[256,0,256,0,256,0,256,0,256,0]。这是因为:

原始int: 1 (0x00000001) 内存布局: [01][00][00][00] (小端序) 按ushort读取: - 第1个ushort: [00][01] → 256 - 第2个ushort: [00][00] → 0

字节序说明: