Jump to content

MODBUS slave lost comm detection


Recommended Posts

Good evening ladies and gentlemen,

I have 4- V430-J-TA24's,  serial (RS232, 9600, 1, none) MODBUS, one as a master (MTU), and the other 3 as slaves (RTU). port 1 on each unit connects to it's respective radio modem. The MTU polls the 3 RTU's successfully and the cycle repeats. Here is my problem: how do I detect a comm failure on the slaves that will set a MB to clear my outputs and registers? The master reads a register from RTU1, here it can use the status message from the RHR #3 and use a compare if MI96 (rhr#3 status) = D#5 then ----[R] (MI100, the value displayed on MTU, fetched from RTU). Now on to RTU 3 and 4, they only have a MODBUS config FB follow by a SCAN_EX. How does the RTU know if updates cease? The registers and coils will just hold their last set values. My thought is having the master toggle a MB on/off in the slave, then somehow implementing logic in the slave to detect if MB being stuck in a 0 or 1 state for greater than a defined amount of time. this would trigger a bit that would zero out the coils in the slave. Please someone tell me there is an easier way. Also what is the reason that RS232 port 1 (RJ11) seems to be disabled while connected to a PC with the USB cable? Thanks!

 

 

Link to comment
Share on other sites

Problem #1 solved. In the MTU I side chained to the MODBUS function block (R/W mixed data in my case) a Memory Bit toggle bit (MB40 in my application). Each time the R/W function is called (periodically) the toggle MB changes states. I included this same toggle MB in my R/W mixed data exchange table (ie. Master: MB40 "RTU 4 toggle bit", Slave: MB40 "RTU 4 toggle bit", Length: 1, Direction: Write).  Now to the slave which was blind to com failure:

      MB40                            OFF Delay timer

-----[P]-------------------------(T0)------  "timer 0, TE, 90 seconds, Alias: Off Delay Timer"

                       |

    MB40     |

-----[N]----

 

      T0                                        MB42          "MB42 alias: Lost Com Flag"

----[/]--------------------------(   )------- 

 

a pulse from each MB40 transition keeps T0 from expiring thus holding T0 (XIC) inverted contact open.

If no MB40 transistion for greater than 90 seconds then T0 (XIC) inverted contact closes  and LOST COM is signaled on the SLAVE (RTU 4)

I saw the light, I saw the light.....

BEDTIME

 

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.