Skip to content

Silent period not working for multiple devices #100

@thalesmaoa

Description

@thalesmaoa

I'm using minimalmodbus to read multiple drivers in a roll.
When there is only one device, I have no problem.
When I use two units, I start to get unresponsiveness. After debugging, I noticed that this arise due to silent period not being respected. Same problem as stated here.

To fix it, I just added a time.sleep(.0031) before each minimalmodbus call.

Now comes the issue. I'm using async to improve the code performance and avoid blocking it. During those 3,1ms that I'm blocking my code, I could be doing something else. Is there a way to put this silent period inside the minimalmodbus function?

When I call self.instrument.read_registers(49, 1), it should block it self for another writing. I'm kind lost how to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions