modbus
modbus copied to clipboard
How to specified serial port in Windows
Hi, how I specify serial port in Windows?
I tryied: -address=rtu://COM3
COM3 is USB converter CH340
Unfortunately, this parameter does not work.
Thanks, Dave
Actually no clue. Maybe @tretmar, @Carelo or @guelfey can help?
In case its different it would be a smart move to document it on the Readme :smile:
No clue, I've never worked with our tooling within Windows, only Linux and macOS 😓
// Modbus RTU/ASCII
handler := modbus.NewRTUClientHandler("COM3")
handler.BaudRate = 115200
handler.DataBits = 8
handler.Parity = "N"
handler.StopBits = 1
handler.SlaveID = 1
handler.Timeout = 5 * time.Second