Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push based change notification #3

Closed
pietervp opened this issue Mar 13, 2013 · 5 comments
Closed

Push based change notification #3

pietervp opened this issue Mar 13, 2013 · 5 comments

Comments

@pietervp
Copy link

@pietervp pietervp commented Mar 13, 2013

Would it be possible (probably depends on hardware being used) to let the PLC send updates about register changes automatically to listeners?

As far as I know, if I want to monitor all the DB's in a PLC, we have to poll for the db values. So is there a way to turn this around? If so, could we implement such a 'listener'?

@killnine
Copy link
Member

@killnine killnine commented Mar 13, 2013

Modbus doesn't have any provision for event-based notification, unfortunately.

I have created my own event-based classes that sit on top of this driver but haven't rolled it into the PLC class. I go back and forth on whether this is the responsibility of the driver or not.

More or less what I have done in the past is set up a poll rate and a timer to request data from the PLC at that interval. If the data has changed from it's last state, fire the datachanged event. There are similar events for when a connection is established and when the PLC disconnects.

Underneath it's just dumb polling, but for services and applications sitting on top of the driver, it 'feels' event-driven.

@pietervp
Copy link
Author

@pietervp pietervp commented Mar 14, 2013

Yeah, that's what I've done too, I just don't like the polling stuff. From the top of my mind, I think I was getting a refreshrate of approx. 30-40 ms to read all the DB's. I have some code laying around, will see if I can get to something usefull for this library!

@killnine
Copy link
Member

@killnine killnine commented Mar 14, 2013

Sounds good. I usually have been using a rate of between 250-500ms because I just have some perpetual counters that I need to track for data collection purposes. Even that, I could probably get away with slower. We have hundreds of devices, though.

Thanks for your support!

@mesta1 mesta1 added the wontfix label Sep 27, 2015
@mycroes
Copy link
Member

@mycroes mycroes commented Jun 19, 2018

I agree that s7netplus shouldn't be dealing with the polling. It can perfectly be done using extension methods or as a separate consumer of the s7netplus API, so there's no reason to include it in the library. Can this issue be closed? (The more issues there are, the smaller the chance is someone will try to fix them all).

@mycroes
Copy link
Member

@mycroes mycroes commented Jun 26, 2018

Closing as wontfix.

@mycroes mycroes closed this Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants