This driver serves for communication with Allen Bradley
PLCs manufactured by Rockwell Automation
company by the EtherNetIP/CIP
protocol. See also Communication with Allen Bradley PLC devices from the Rockwell Automation company
protocol (Common Industrial Protocol
) is a network protocol that allows to transmit values of data objects. Contrary to other protocols, that are usually oriented to support registers, inputs, outputs, etc., the CIP
protocol is oriented to support data objects. The data object is representing an user-defined data variable, array, structure, etc. that describes some part of the technology and its instances are located in the PLC memory.
The CIP protocol can be implemented on different physical layers (Ethernet, CAN/DeviceNet, FieldBus/ControlNet). The EtherNet/IP protocol implements (encapsulates) the CIP protocol for Ethernet. The PmABradleyCIP driver implements the CIP protocol into the EtherNet/IP protocol.
The PLCs that are based on data areas (DataFile, for example the Input, Output, Integer type ..) cannot communicate by the CIP protocol (e.g. PLC MicroLogix). For such devices the PmABradleyDF1 communication driver is designed.
protocol is supported by following families of Allen Bradley
PLCs manufactured by the Rockwell Automation
Before using this driver in the PROMOTIC application it is highly recommended to read the chapter: Communication using the PROMOTIC drivers
Basic properties of the driver
- Usage of this driver requires purchase of the PmABradley license
. With the freeware version PmFree
, or when developing the application (with development environment
for tersting purposes), this component is always functional.
- The communication is done for Ethernet (PROMOTIC application is client).
- The PROMOTIC application is the MASTER (i.e. it initiates the data transfer) from this communication point of view.
- The driver is incorporated into the PROMOTIC system by means of the PmaComm
The driver supports to usage of the PmaCommGroup object (for read and write of the variables in the PLC device). The PmaCommMsg object is used only for special auxiliary message that detects the variable names that can be read from the PLC device (see further).
For easy integration of this driver into the application it is handy to use: Preconfigurations in group "Allen Bradley - PLC device"
- The driver has been tested with PAC Allen-Bradley CompactLogix of the 5000 series with the 20 firmware. The driver may malfunction with devices using older versions of the firmware.
- While programming the PLC two types of variables can be used:
- Global variables (Controller Tags)
- Variables for specific program in the PLC device (Program Tags)
This communication driver can work only with Controller Tags (so far).
The driver supports the following data types:
: in the PLC: represented by 1 bit. In the PROMOTIC application represented by the data type: Boolean
: in the PLC: 8-bit signed integer. In the PROMOTIC application represented by the data type: Integer
: in the PLC: 16-bit signed integer. In the PROMOTIC application represented by the data type: Integer
: in the PLC: 32-bit signed integer. In the PROMOTIC application represented by the data type: Long
: in the PLC: 64-bit signed integer. In the PROMOTIC application represented by the data type: Double
: in the PLC: 32-bit real number (float
). In the PROMOTIC application represented by the data type: Single
: in the PLC: 32-bit array (usually a host are for variables of the BOOL
type). In the PROMOTIC application represented by the data type: Long
: in the PLC: a structure containing the length (DINT
type) and a character array (SINT
type). Represents text. In the PROMOTIC application represented by the data type: String
The variables (so-called tags) are created during the PLC programming. The creation of variables means defining their data type, array dimensions and definig the items of the structure, naming the variable and naming the structure. The designer of PROMOTIC application then works with the previously defined names. The variable names are usually called symbols (in this protocol) and the data structures are called templates. The templates can be user-defined, or can be taken from the libraries of the PLC programming tools that support the CIP
Recommended parameters values:
|TCP/UDP port number||44818|
|Ethernet transfer type||TCP|
|Not connect until first transfer||NOT checked (mandatory)|
|Close connection after every transfer||NOT checked (mandatory). After each connection, it is necessary to transfer several initialization messages and if the connection is closed repeatedly, the communication speed would be decreased significantly.|
Description and recommended values for the Protocol parameters:
|Port number in the PLC device||1 (set the linkup to documentation)|
|Slot number in the PLC device||0, position number in rack (set the linkup to documentation)|
|Ticks priority||5 (set the linkup to documentation)|
|Number of ticks to timeout||247 (set the linkup to documentation)|
The communication description by the PmaCommGroup objects
The variables in the PmaCommGroup
object (or even better the variables in the PmaData
object with ExtComm
data extension) can be of arbitrary number, type and order. The driver uses optimalised internal communication messages for reading the data from the device.
All variables are read (if the "Data refresh enabled" configurator is checked). When writing to the variable, only the single value is sent (if the "Auto send when writing to item" configurator is checked).
Description of the "ItemID" configurator:
ItemId is the text identifier of the item that is used for addressing the value in the device. The ItemID configurator tells the driver how to receive or send the item value.
The text can be written manually, or it can be assembled in the window opened by the button to the right of the configurator.
Macro expression can be used for input (it is evaluated after starting the application).
Entering the ItemId by the button to the right of the configurator is possible only if the file fith PLC variables description already exists. This file can be created by the PmaCommMsg message ("Reading names of all available variables from the PLC device") - see further.
The period (.) separator is used between the structure name and structure item. The array indexes (zero-based index) are written inside the brackets ([ ]). No additional spaces are allowed.
Examples of identifier syntax:
1) In the PLC device, there is an elementary item (e.g. of the INT
type) named "Temperature"
. If we want to read/write this item, then the ItemId
2) In the PLC device, there is a structure named "station"
and inside it there is an array named "data"
. If we want to read/write the 23rd item of this array, then the ItemId
3) In the PLC device, there is a "heating"
structure, containing "Boiler"
array. Each item of this array is a structure containing "Temperature"
item. We want to read/write from/into the 0. (i.e. the first position) item of the array:
4) In the PLC device, there is a 3-dimensional array named "warehouse"
and we want to read/write the value on the coordinate of [12,11,5]:
5) Reading and writing a string
: In the PLC device, there is a structure named "label"
containing an item of the DINT
type (text length) and an array of characters of the SINT
type. This structure may represent text and if we want to read/write such text, then the ItemId
This configurator is not used for given driver.
The communication description by the PmaCommMsg objects
object can be used for special communications, that cannot be executed by the PmaCommGroup
object. For this driver, there is only a singe special message implemented:
- Reading names of all available variables from the PLC device
In order to set the ItemId configurator correctly in the variables for the PmaCommGroup object it is necessary to know the names of user-defined variables, items and structures or array dimensions in the PLC device. This informaton can be read from the PLC device and this is exactly the sole purpose of this message:
The message reads the information and saves it into a text string on the "Data-received" page. If the text is saved into the file (default named "ABradleyVarCfg.txt"), then the button on the right side in the ItemId configurator can be used that reads the corresponding file and displays it in the form of a tree structure. The specific data items can be selected from this tree structure.
In order to create and configure the PmaCommMsg object correctly it is handy to use the preconfiguration: Preconfiguration "PmABradleyCIP - Communication set with data and panel by the EtherNetIP/CIP protocol (for ControlLogix, CompactLogix, ...)". If you check the "Create PmaCommMsg for reading the variables from the PLC device" configurator in this preconfiguration, then the correctly configured PmaCommMsg object is created together with a panel that can run the message and read the desired information from the PLC device. In the onEndOfTransfer event of this object, there is a script that saves the received text information into the file "ABradleyVarCfg.txt".
There are following variables on the "Data-received
InfoVars - This variable is used for saving text information regarding available variables in the PLC device.