Closed easyboot closed 2 years ago
plc = new Plc(CpuType.S71500, PLCIP, 0, 1); object Ob = new object(); Ob = plc.Read(“DB53.DBW16.0”);
I get Ob value is 16639. I Use PLC Tools get value is 1.6
how can i get correct value is 1.6
You should read a DWORD instead: DB53.DBD16 (WORD has only 2 bytes of data, LREAL is 4 bytes) and then you can use S7.Net.Types.Single.FromDWord((uint) value).
DB53.DBD16
S7.Net.Types.Single.FromDWord((uint) value)
plc = new Plc(CpuType.S71500, PLCIP, 0, 1); object Ob = new object(); Ob = plc.Read(“DB53.DBW16.0”);
I get Ob value is 16639. I Use PLC Tools get value is 1.6
how can i get correct value is 1.6