Author Topic: Is 250 ethernetipfromclx devices too many?  (Read 1266 times)

ntommyb

  • Newbie
  • *
  • Posts: 2
    • View Profile
Is 250 ethernetipfromclx devices too many?
« on: May 15, 2014, 05:33:26 PM »
And that's just for one plant, I'd like to add all 4 of my plants.  I'm a Controls engineer Plc specialist in a car manufacturing plant but I'm not much of a vb.net programmer but So far I've been able to build a custom object that I linked to comm configured on the main form.it started failing when I got over 10 plcs configured in the main form

I feel like my best bet ( other than add a data consolidator Plc) is to add the comm device to my object and expose the properties to configure it at design time but the ethernetipfromclx dll keeps throwing an exception when I declare a new one.  I can't figure out what reference it's missing, is there something hidden I need to add or a better way to achieve what I want?

Thanks in advance!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5266
    • View Profile
    • AdvancedHMI
Re: Is 250 ethernetipfromclx devices too many?
« Reply #1 on: May 16, 2014, 08:53:10 AM »
There are no set limitations on the number of driver instances, but 250 will definitely take a lot of bandwidth and resources. I would definitely slow down the poll rate by setting the PollRateOverride to something like 1000 or 2000 (1-2 seconds).

What is the exception you are getting?

ntommyb

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Is 250 ethernetipfromclx devices too many?
« Reply #2 on: May 16, 2014, 04:25:52 PM »
 The network I'm on has a fiberoptic backbone and I have ethernet module diagnostics running all the time on every PLC so I'll know if they are hitting threasholds so I'm not too overly concerned about the bandwidth.   I'll put in a parameter to change all those pollrateoverrides at runtime just in case.

It turns out that I just had to increase the size of the array of DLL's in the EthernetIPforCLXcom routine from 10 to 25 and its fine. 

    Private Shared DLL(25) As MfgControl.AdvancedHMI.Drivers.CIP

It gets kind of messy having that many objects shown in the designer and it seems to bog down the designer so I'm still interested in canning the com driver into my custom control and just defining the details like IP and pollrate at design time in an parameter when the custom control is created, but Its giving me lots of problems, something to do with referencing the project vs referencing the file.  I'm getting mismatchs in the mainform from types that match in the custom control.

I'm wondering if you can add an ethernet comm pragmatically from a template?  Then I could just create a list of IPs and slot numbers and add the EthernetIPforCLXcom at designtime

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5266
    • View Profile
    • AdvancedHMI
Re: Is 250 ethernetipfromclx devices too many?
« Reply #3 on: May 16, 2014, 05:05:40 PM »
Anything can be done in code the same as it is done in the designer. In fact, the designer is simply generating code to create the instances and set the properties. You can see this code and use it as an example to manually write your own code to do the same thing. In Solution Explorer, there is an icon at the top for Show All Files. If you enable that, then drill down MainForm.vb, you will see a designer.vb file. Open that designer and you can see the code generated by Visual Studio and use it as an example on how to create your own driver instances in code.