Author Topic: modbusTCPCom and dataSubscriber2 optimization  (Read 1804 times)

robkwan

  • Newbie
  • *
  • Posts: 44
    • View Profile
modbusTCPCom and dataSubscriber2 optimization
« on: January 06, 2016, 12:03:23 PM »
For large number of tags and readability reasons, I used two dataSubscriber2 connected to one modbusTCPCom. The application is extreme slow and not usable, all Windows controls appear to frozen. Problem went away with one dataSubscriber2.

Is it allow to have multiple modbusTCPCom on the application, all have identical setting for the IPAddress & TcpipPort properties?

I tried on a simple application with sliders driving gauges, it seems to work. Then I can have one dataSubscriber2 for each modbusTCPCom which will have different PollRateOverride based on tag groups.

Can someone confirm multiple modbusTCPCom on the application is ok before I start update the application.

Any tip to manage large tag size.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: modbusTCPCom and dataSubscriber2 optimization
« Reply #1 on: January 06, 2016, 04:37:02 PM »
The drivers do allow multiple instances. As you mentioned, this is how you set different poll rates.

The one thing to keep in mind is that each driver instance optimizes only its own subscriptions. Let's say you have 1 driver instances with subscriptions to 40001, 40002, 40050, and 40051. The driver will perform this in 2 read packets.

Now let's say you have 2 driver instances. The first one has subscriptions to 40001 and 40050. The second instance has subscriptions to 40002 and 40051. This configuration will require 4 packets to read all of the data, therefore no optimization occurs. Ideally you want 40001 and 40002 on one driver instance then 40050 and 40051 on the other.

In other words try to keep addresses that are close together on the same driver instance.

mariley2250

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: modbusTCPCom and dataSubscriber2 optimization
« Reply #2 on: January 06, 2016, 05:34:41 PM »
I am totally confused as to how to use a datasubscriber to get more than one modbusTCP value.. Is there Tutorial or explaination somewhere??


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: modbusTCPCom and dataSubscriber2 optimization
« Reply #3 on: January 06, 2016, 09:17:09 PM »
I created this topic to explain the DataSubscriber2:

http://advancedhmi.com/forum/index.php?topic=1119.0

mariley2250

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: modbusTCPCom and dataSubscriber2 optimization
« Reply #4 on: January 10, 2016, 04:01:13 PM »
Hi Archie,

Thanks for your help it is greatly appreciated. I have a further problem but will post as a new thread

Marcus