simonvetter / modbus

Go modbus stack (client and server)
MIT License
253 stars 81 forks source link

how to set up URL on windows OS? #42

Closed crazy-cpu closed 4 months ago

crazy-cpu commented 4 months ago

image

thanks!

crazy-cpu commented 4 months ago

image

munnik commented 4 months ago

I can't test this on Windows, but I think this Stack Overflow post can help: https://stackoverflow.com/questions/27909666/createfile-serial-communication-issue.

client, err := modbus.NewClient(&modbus.ClientConfiguration{
    URL:  "rtu://\\\\.\\COM6",
    ...
})
crazy-cpu commented 4 months ago

today,I try to fill "rtu://COM7" to URL field, it works. I can''t explain this situation,but anyway, this problem is solved.thank you.