We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
st := modbus.NewSerialTransporter("COM3") st.Mode = serial.Mode{BaudRate: 19200} defer func() { _ = st.Close() }() // slave1 c1 := modbus.NewClient(modbus.NewRtuPackager(1), st) _, results1, err1 := c1.ReadHoldingRegisters(1, 10) // change slave ID c1.Packager.SlaveId = 2 // slave2 _, results2, err2 := c1.ReadHoldingRegisters(1, 10) // change slave ID c1.Packager.SlaveId = 3 // slave3 _, results3, err3 := c1.ReadHoldingRegisters(1, 10)
client.Packager Can modify SlaveId externally with uppercase first letter. Communicate with different slave stations
The text was updated successfully, but these errors were encountered:
change slave ID c2 := modbus.NewClient(modbus.NewRtuPackager(2), st)
Sorry, something went wrong.
I have modified my usage code according to your method, and everything seems to be working well now, thank you
No branches or pull requests
client.Packager Can modify SlaveId externally with uppercase first letter. Communicate with different slave stations
The text was updated successfully, but these errors were encountered: