McProtocol icon indicating copy to clipboard operation
McProtocol copied to clipboard

Address mismatch between READ and WRITE

Open locodust6 opened this issue 1 year ago • 1 comments

Now, READ and WRITE have to change the address specification.

For example, to control W20, you need to do the following:

//READ
PLCData<short> devices = new(PlcDeviceType.W, 0x20, 1);

//WRITE
PLCData<short> devices2 = new(PlcDeviceType.W, 20, 1);

This seems to be because READ uses the specified address itself, and WRITE regards the specified address as a hexadecimal number and converts it to a decimal number.

locodust6 avatar Aug 05 '22 16:08 locodust6