modbus icon indicating copy to clipboard operation
modbus copied to clipboard

How to specified serial port in Windows

Open drohlicek opened this issue 1 year ago • 3 comments

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

drohlicek avatar Feb 15 '24 11:02 drohlicek

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:

frzifus avatar Apr 26 '24 16:04 frzifus

No clue, I've never worked with our tooling within Windows, only Linux and macOS 😓

dammarco avatar Apr 29 '24 05:04 dammarco

// 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

annlumia avatar Sep 26 '24 01:09 annlumia