modbus icon indicating copy to clipboard operation
modbus copied to clipboard

Working with multiple serial devices

Open pbdqpbdq opened this issue 6 years ago • 6 comments

Hi

I've successfully used the library to interact with one RS485 device, however working with multiple devices seems less than ideal. Currently SlaveId is a property of the handler which needs to be adjusted every time. I think it'd make more sense to derive multiple Clients each with its own SlaveId from the handler and then be able to work with them without touching the handler. What do you think?

pbdqpbdq avatar Dec 26 '18 23:12 pbdqpbdq

I have the same issue. Seems like an incorrect assumption in the way the abstraction is modeled, i.e. one serial port can have multiple devices connected to it on a bus. Other than that this library is great.

That said, you'd still need to communicate to each device in mutual exclusion, so changing the SlaveID is less of a problem than one would assume.

ibrt avatar Sep 08 '19 00:09 ibrt

same issue +1, maybe I should make a fork.

houaq avatar Jan 13 '20 09:01 houaq

same issue +1, maybe I should make a fork.

Hello! Have that fork been done?

gaorongfu avatar Mar 16 '21 11:03 gaorongfu

same issue +1, maybe I should make a fork.

Hello! Have that fork been done?

I have migrated to simonvetter/modbus

maddie avatar Mar 16 '21 11:03 maddie

It's great! Thanks a lot !

gaorongfu avatar Mar 16 '21 11:03 gaorongfu

Yes, you can try it at houaq/modbus.

发自我的iPhone

------------------ Original ------------------ From: gaorongfu @.> Date: Tue,Mar 16,2021 7:28 PM To: goburrow/modbus @.> Cc: Atsing Hou @.>, Comment @.> Subject: Re: [goburrow/modbus] Working with multiple serial devices (#43)

same issue +1, maybe I should make a fork.

Hello! Have that fork been done?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

houaq avatar Mar 16 '21 13:03 houaq