Showing results 1 to 4 of 4

Thread: Modbus driver - detecting link or device failure

  1. #1
    Join Date
    05.03.2009
    Posts
    23

    Default Modbus driver - detecting link or device failure

    Hello!

    I have several devices connected via RS485 and Modbus RTU/TCP driver to Zenon EE.
    I would like to detect device failure or link failure. I went through all driver variables, but I could not find appopriate driver variable. Is there a driver variable which holds the information of satus of link or if the device is unresponsive?
    I know that such a driver variable (status of link) is available for for IEC 104 protocol.

    Gregor

  2. #2

    Default Re: Modbus driver - detecting link or device failure

    Hi,

    The modbus RTU driver is a polling driver. This means that every driver update cycle, an attempt is made to read the variables required by the runtime from the RTU. In case this fails, e.g. due to a broken cable, it will continue to attempt to read the variables from this RTU depending on the reconnect timeout.

    Meanwhile, when a connection error has been detected, all variables keept their last known value, but also have the status bit "INVALID" set to TRUE (1)

    This status bit "INVALID" can be monitored with e.g. a reaction matrix, and you can generate an alarm, or execute a function to perform further actions. (popup screen, SMS or e-mail message, ...) You would only need to link this reaction matrix to one variable of each RTU (each link / station), to monitor the connections.

    Unlike the IEC 104 driver, most polling drivers do not have a seperate variable to indicate the link status, and only use the INVALID bit.

  3. #3
    Join Date
    10.04.2020
    Posts
    2

    Default Re: Modbus driver - detecting link or device failure

    Quote Originally Posted by markclemens View Post
    Hi,



    The modbus RTU driver is a polling driver. This means that every driver update cycle, an attempt is made to read the variables required by the runtime from the RTU. In case this fails, e.g. due to a broken cable, it will continue to attempt to read the variables from this RTU depending on the reconnect timeout.



    Meanwhile, when a connection error has been detected, all variables keept their last known value, but also have the status bit "INVALID" set to TRUE (1)



    This status bit "INVALID" can be monitored with e.g. a reaction matrix, and you can generate an alarm, or execute a function to perform further actions. (popup screen, SMS or e-mail message, ...) You would only need to link this reaction matrix to one variable of each RTU (each link / station), to monitor the connections.



    Unlike the IEC 104 driver, most polling drivers do not have a seperate variable to indicate the link status, and only use the INVALID bit.


    Hi Markclemens,

    For "Invalid" attribute of Variable, How can we get it to monitor the status of the Communication link

    Thanks

  4. #4
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    924

    Default Re: Modbus driver - detecting link or device failure

    As mark has written you can evaluate the status bit INVALID in the Reaction Matrix.
    Steps:
    1. create an internal variable, data type INT, name e.g.: "MODBUS Connection State", property 'Calculation'="Network", 'Remanence'="Initial value", 'Initial value' = -1.
        possible values of this variable will be: -1 (idle...), 0 - communication error, 1 - connected OK.
    2. create 2 zenon functions 'write set value' for this internal variable, one function "set error" - to set value 0, second function "set OK" - with value 1, both function are configured with 'Direct to the Hardware'.
    3. create a multi-numeric reaction matrix with at least 2 conditions:
    - new condition to evaluate any value and variable status INVALID=1:
    and activate check-box 'treat each change of value as new limit violation';
    and link in this condition the function "set error" - created in step 2.
    - new condition to evaluate any value and variable status INVALID=0 and SPONT=1 -> calling function "set OK".
    4. link this reaction matrix with one of MODBUS process variables, e.g. one of registers available in the device.

     

    Attached Thumbnails Attached Thumbnails 2jb0h8yu5M.png  

Similar Threads

  1. How to use Variable tagname in link text element?
    By softart2 in forum zenon Supervisor
    Replies: 2
    Last Post: 17th June 2010, 08:11
  2. Prot. Relay-Power supply failure monitoring
    By janlyndon in forum zenon Supervisor
    Replies: 10
    Last Post: 18th May 2010, 22:57
  3. How to link zenOn and straton in zenon6.22?
    By nahala in forum straton / zenon Logic
    Replies: 2
    Last Post: 29th March 2009, 11:37
  4. CE Device won't comm. with PLC
    By scotttee in forum zenon Operator
    Replies: 5
    Last Post: 9th March 2009, 14:13
  5. Renaming scripts loses the link at the function
    By markclemens in forum zenon Supervisor
    Replies: 0
    Last Post: 3rd August 2007, 07:23

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •