Modnet Driver Preformance

Hello All

Please, someone can give me ideas to tuning better the Modnet Protocol.

we get some intermittent communication errors "I/O Device off-line, cannot talk".

We configured 55 IO Devices over Modnet Protocol reading about 200k Tags in the redundant system.

Thank you

  • Miguel,

    Is the error only occurring for a specific device? I seen this happen when a device does not support more then one master, even those it's Modbus Ethernet. If this is the case, I believe there is a .ini setting (I can't find it at the moment) that prevent the secondary I/O server from communicating until the primary I/O server is shut down.
  • Hi Miguel,
    It might be an idea to distribute this load across more IOServer instances. E.g. I'd recommend configuring about half the IO Devices to be on one IO Server, with the other half on a second IO Server. You can run several IO Servers on the same machine.
    You can also look at tuning [Modnet] Retry (default setting is 0) and Timeout (default setting 1000) to 1 and 2000 respectively.
  • That would be accomplished by setting the parameter [IOServer]WatchDog=0
  • Hi Olivier

    Using Retry = 1 and Timeout = 2000, the system performance improved a lot.
    We are reading about MaxPending / MaxOutstading. These parameters have the default setting.

    Thank you
  • Hi Patrick

    Sorry, can you explain better your suggestion. I can't associate this parameter to the Modnet performance.

    Thank you

  • Hi Miguel,
    My suggestion has no real connection with performance. I only mentioned the parameter in reply to Chris when he explained about preventing multiple masters, but you never got back to him if that was appropriate for your situation or not.
  • Hi Miguel,
    Check out some of these tech notes:
    https://softwaresupportsp.aveva.com/#/okmimarticle/docid/tn6191
    https://softwaresupportsp.aveva.com/#/okmimarticle/docid/tn8000

    Basically, the MaxPending is just how many requests the Modnet driver will buffer internally ready for transmission, while MaxOutstanding is how many concurrent messages can be sent. These settings really need to be tuned depending on the hardware you are communicating with. I have seen some devices that only accept 1 request at once (MaxOutstanding=1) while others can accept up to 32 parallel messages without issue. The more messages you can send in parallel, the better your throughput. Always respect the requirement that MaxPending is greater than MaxOutstanding.
  • On the topic of MODNET tuning, are the Retries and Timeout parameters able to be specified per device? The documentation seems to indicate no, but I wouldn't have thought the same values would apply to all configured devices.

     , you mentioned splitting IO devices across multiple IO servers on the same PC for better performance - are there any performance indicators, or configuration limits, you'd recommend to check to see whether this change would be recommended? E.g. IO server process CPU, late task time, number of configured IO devices, etc.

  • Hi  ,

    I think the limits are usually CPU that the process has available. The Citect32.exe is a single thread application, so it can only make use of one logical CPU. The only exception to that is the startup/shutdown code which touches more of the .NET codebase, and is able to use more than one logical core.

    There are other extremes, where you might have a large number of IO Devices on a single IOServer process (think about all the boards, ports, units that need to be managed). Where it might also make sense to split the load across multiple IOServer processes.

    My general rule is try to keep less than 100,000 variable tags per IOServer. But that isn't a hard and fast rule, and is dependent on complexity of the system, type of driver in use, number of IO Devices, etc.

    I don't think you can set retries and timeout parameters per device, but I could be wrong. But it does seem that way from the documentation.

  • I can't vouch for these parameters, but I have a bunch of INI files from site that have the following in them:

    [MODNET]
    MaxOutstanding = 8
    MaxPending = 16
    Timeout = 1000
    Retry = 0

    [MODNET.PORT102_BOARD1]
    MaxOutstanding = 1
    MaxPending = 2
    RegisterBitReverse = 1
    Timeout = 4000

    [MODNET.PORT402_BOARD1]
    MaxOutstanding = 1
    MaxPending = 2
    RegisterBitReverse = 1
    Timeout = 4000

    Seems to be a simple case of adding the port name...