Jump to content

Recommended Posts

Is there a system integer or bit that is set when a Modbus RTU SLAVE has received a command from a master?

I would like the make a watchdog on my slave device to to notify the operator if communications is lost and to pause the process as it is working with stale data.

Share this post


Link to post
Share on other sites

In crucial operations I have a deliberate time check on data being updated correctly.  Every nominated time period, I place a number well outside the normal range in a register, having the system ignore it for that small time, and then see if it gets changed.  If it doesn't get changed within a given delay, the alerts come up.

This is actually a very easy thing to implement as you only need to check one piece of data, not a full vector, and isn't based on any reads of system stuff that Alex has rightly suggested.  It is based on actual results.  You could do it to an entire vector if you felt it needed...I've never found it necessary.

I should mention that all my slaves are routinely called in a varying sequence, with a given maximum time between calls, which you definitely have to relate to the slave's checking time periods.

cheers, Aus

Share this post


Link to post
Share on other sites
12 hours ago, AlexUT said:

See SDW 37 description.

And SI 274, 275, 276.

 

SDW 37 was just what I wanted. I simply check if it hasn't changed and allow the watchdog to run, every change will reset the counter.

4 hours ago, Ausman said:

In crucial operations I have a deliberate time check on data being updated correctly.  Every nominated time period, I place a number well outside the normal range in a register, having the system ignore it for that small time, and then see if it gets changed.  If it doesn't get changed within a given delay, the alerts come up.

This is actually a very easy thing to implement as you only need to check one piece of data, not a full vector, and isn't based on any reads of system stuff that Alex has rightly suggested.  It is based on actual results.  You could do it to an entire vector if you felt it needed...I've never found it necessary.

I should mention that all my slaves are routinely called in a varying sequence, with a given maximum time between calls, which you definitely have to relate to the slave's checking time periods.

cheers, Aus

I do a similar thing on the master to guarantee sane data or generate errors. The slaves though I was using a "heartbeat bit" but SWD 37 is essentially that and simpler.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...