Coder Social home page Coder Social logo

Wait until timeout on error about modbus HOT 5 CLOSED

goburrow avatar goburrow commented on July 21, 2024
Wait until timeout on error

from modbus.

Comments (5)

nqv avatar nqv commented on July 21, 2024

I'll try again, would you please let me know your OS? @nemtsevp

from modbus.

pnemtsev avatar pnemtsev commented on July 21, 2024

I've tried this on Ubuntu-16.04 @nqv

from modbus.

adiclepcea avatar adiclepcea commented on July 21, 2024

If you mean that you are trying to request data from a slave that does not exist, then it would be ok to wait until the timeout has exceeded as no response will arrive back.
This implementation is not exactly following the minimum timeouts for package responses as defined by the modbus standard which is a minimum of 3.5 characters timeframe (depends on the speed).
Most master implementations use a timeout of ~100ms (see. here - answer 3 ) for example.
This implementation lets you decide how long to wait for a reply (hence the timeout).
This is a great feature in my opinion as there are loads of slaves that will not respect the 3.5 characters timing. You should have a timeout set however.

However, as in my PR, the implementation does not have to wait until the timeout has passed to see an error response.

Perhaps I misunderstood your question and consider it to be the same issue as I had. Sorry if that is the case.

from modbus.

pnemtsev avatar pnemtsev commented on July 21, 2024

I meant non-existing register address, device itself is visible, slave address is correct and correct register addresses are readable. Ok, i can set timeout and get a response, but even if timeout is set response is that timeout is reached, when it should be like "Invalid register address". So i can not ever get "Invalid register address" error. @adiclepcea Thanks for your participation! I think, your pull request is exactly what i need.

from modbus.

adiclepcea avatar adiclepcea commented on July 21, 2024

I see that the PR was accepted.
I am really glad to give a hand. Even more so since this project is a help for me too.

from modbus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.