Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 S7.net 与 S7-1500 PLC 进行通信。plc 中设置的值之一是 -90,当我使用下面的代码读取此值时,它在 winforms 中显示 65570 而不是 -90。
var data = (ushort)plc.Read("DB10.DBW100");
plc 程序中设置的类型是“ShortToSignedWord”。
如何获得 -90 并在 winforms 中显示?