Trevor J Posted June 23, 2020 Report Share Posted June 23, 2020 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. Quote Link to comment Share on other sites More sharing options...
AlexUT Posted June 23, 2020 Report Share Posted June 23, 2020 See SDW 37 description. And SI 274, 275, 276. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted June 24, 2020 MVP 2022 Report Share Posted June 24, 2020 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 Quote Link to comment Share on other sites More sharing options...
Trevor J Posted June 24, 2020 Author Report Share Posted June 24, 2020 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.