EthernetIPforCLXCom
EthernetIPforCLXCom
This driver specifically targets the Allen Bradley line of ControlLogix and CompactLogix PLCs. It uses tag names directly to access data values in the PLC.
Properties | |
---|---|
IPAddress | The TCP/IP address of the PLC to communicate with |
Port | The TCP/IP port. In nearly all cases this will be 44818 |
CIPConnectionSize | The maximum number of bytes in a single packet. The larger the number, the more efficient the communications. A value of 508 works with all Allen Bradley PLCs tested. Some of the newer models will allow a higher value. |
DisableMultiServiceRequest | A multi-service request allows more than one request per packet. This can dramatically increase the speed of retrirving values. Not all PLCs support this, such as the Micro800 series. |
DisableSubscriptions | uses updating of subscriptions. This is useful in cases such as when hiding a form and there is no longer a need to refresh the values. Or when used with a Trend Chart, it can pause the charting. |
PollRateOverride | This set the target rate for refreshing all of the subscriptions. When there are a large number of subscriptions that have to be split amongst sever requests, this value is divided by the number of requests required to determine the delay between each packet. A value of 0 will make the driver update as fast as the PLC will respond, but be cautious because it can reach rates less than 5ms and start to use a lot of resources. |
INIFileName | An INI file can be created to store the properties for being set during application startup. See INI File Usage for more details |
INIFileSection | Specifies the section within the INI file to use for this driver instance settings |
RoutePath | Used to specify routing through ControlLogix chassis. Explained in more detail on the Routing Paths page |
Methods
For the methods common to all drivers see the section on the IComComponent
GetTagList() - Returns the list of controller scope and program scope tags. This is a synschronous method and can delay for a long time when reading a program with a very large tag list.
BeginReadMultiple(taglist() as string) - A very efficient way of reading multiple mixed tags.
Addressing
Controller scope tags are addressed by directly using the tag name. For example:
MyTag
Program scope tags require a prefix to indicate which program. For example:
PROGRAM:MainRoutine.MyTag
UDT elements are read by specifying the UDT variable. For example:
MyUDTTag.Element
Code Samples
'* Synchronous read of a single tag
'* This is the simplest way to read a tag, however it does block the UI thread until the data is returned
Dim MyDriver as New EthernetIPForCLXCom
MyDriver.IPAddress="192.168.0.10"
Dim MyValue as String
MyValue=MyDriver.Read("MyTag")