I’m using Lumel’s SM2 module and getting result that I cannot translate it, because I never worked with modbus before. Documentation says that value is located in two successive 16-bite registers.
With this code:
var serialPort = new SerialPort("COM2", 9600, Parity.None, 8, StopBits.One); serialPort.Open(); var rtuInterface = new ModbusRtuInterface(serialPort); var master = new ModbusMaster(rtuInterface); ushort result = master.ReadHoldingRegisters(1, 7004, 2);
i’m getting results 17912 and 38912. When I translate in into binary form, It doesn’t match with possible values from documentation in any way. I’m using Spider and library from codeshare. Any advice would be appreciated