You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
modbus: exception '1' (illegal function), function '131'
Always inform there is a error.
I only used very simple modbus/Tcp example like that.
What's wrong with that? I also used modbus slave and choose 03 holding register.
Did you test the device with modpoll? first test the device and be sure that data is coming from tools. then check that the addresses and quantity are right. some time, this error happened when you give wrong address. mot of devics are working with slave 1. and also check the port, maybe our port is 1000 or 1001, you can check it with telnet.
modbus: exception '1' (illegal function), function '131'
Always inform there is a error.
I only used very simple modbus/Tcp example like that.
What's wrong with that? I also used modbus slave and choose 03 holding register.
package main
import (
"fmt"
"github.com/goburrow/modbus"
)
func main() {
cli := modbus.TCPClient("127.0.0.1:502")
res, err := cli.ReadHoldingRegisters(0, 3)
fmt.Println(res)
fmt.Println(err)
}
The text was updated successfully, but these errors were encountered: