andresarmento / modbus-arduino

A library that allows your Arduino to communicate via Modbus protocol, acting as a slave (master in development). Supports serial (RS-232, RS-485) and IP via Ethernet (Modbus IP).
BSD 3-Clause "New" or "Revised" License
455 stars 267 forks source link

ReadHoldingRegisters #14

Open pedrofelipest opened 8 years ago

pedrofelipest commented 8 years ago

So I hope that somebody has gone though the same issue as me; I'm trying to obtain the content of a holding register through the serial port. I can see the content but it's not understandable. What I'm getting It's not ASCII or any other variable type. resute = node.readHoldingRegisters(25, 6);

AlexPuts commented 7 years ago

If your ModbusIP object is called mb: int16_t value = mb.Hreg(offset);