Jump to content

Punt Systems

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Punt Systems

  1. Although it seems a common belief that you cannot block Modbus write due to the way it’s engineered in the Unitronics PLC's, there certainly is a way to achieve this.  
     

    You have to look at SL11. where every Modbus command is processed. It looks like that the value in SL11 makes no sense at all, until you attach a “Vector fill” to it.
    Then each Modbus function becomes a specific value in MI 1240 (example). 
    After that, it’s very easy to specifically allow or block a command (both 'read' and 'write') or an entire function.

    In this specific case you can read everything, but as soon as you give a write command, it must be 1 of the 8 values, otherwise the Modbus connection is stopped immediately, to prevent anyone from being able to continue.
    After that you can decide to display or send out a warning (or whatever) 

    The only small downside to this solution is . . . .  although it will be detected (for sure) . . . . . you could still make 1 'write command' mistake (If you hit the jackpot).

    This is tested with Modbus TCP/IP only, if you have Modbus RTU, you probably will need to edit a couple of things (I did not test that yet)

    There is a timer TD 153 (example) present, because of a timing issue, when switching from one Modbus function to another, to prevent unwanted blocking of the Modbus scan.
    But if you don’t allow any Modbus write command, a timer is not needed and MB 1703 (example) can do the job for you.

    ModbusIP.thumb.png.aa1ceb3d9bf03748c852186407db1a31.png

     

    Another tip:

    For anyone who wants to use a Samba with an ethernet card and still wants to have the option of Modbus RTU or any other situation with only Modus TCP/IP supported, you can use a simple module TCP2RTU from papouch.com.

    Example ladder with TCP2RTU:

    ModbusIPTCP2RTU.thumb.png.0097dcb367cd86020678713634c7064e.png

     

×
×
  • Create New...

Important Information

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