The user is not forced to enter the data type during the screen drawing. The proper data type is fetched during the data reading from the PLC. There might be some limitations, as only certain data types are supported. The following paragraph specifies all supported data types for a given PLC type.
The EtherNet/IP driver supports all numeric data types:
Tag Data Type |
Description |
DINT |
An atomic data type consisting of a DWORD used for storing a 32-bit signed integer value (-2,147,483,648 to +2,147,483,647). |
SINT |
An atomic data type that stores an 8-bit signed integer value (-128 to +127). |
INT |
An atomic data type consisting of a word used for storing a 16-bit signed integer value (-32,768 to +32,767). |
REAL |
An atomic data type that stores a 32-bit IEEE floating-point value. |
BOOL |
The BOOL data type is an atomic data type consisting of a single bit. |
The access to user-defined data types, like structures or arrays, is supported. To read or write the elements inside the structured tags, you should use the “dot” notation, e.g.
tank[1].volume is proper syntax to read the volume of the 1st tank.
Reading Controller Tags:
To read a controller tag, just specify the tag name.
Reading Program Tags:
To read a program tag, you have to specify the program name before the tag name. You must use the following syntax:
Program: name.tag
name – program name
tag – tag name
So if you want to communicate with tag named valve from a program named control, you will have the following syntax: Program:control.valve
Limitation of the BOOL arrays in ControLogix
The different syntax to access the elements in the BOOL arrays is used in the myDESIGNER, compared to the programs stored in the controller. In myDESIGNER, you have to address the word and bit position separately. The word consists of the 32 bits – BOOL elements and the range of the BOOL array is split into multiple words.
Example:
If you have a BOOL array TestBool with 54 elements, you can access its elements using the following address:
3rd element (bit) TestBool[0].3
34th element (bit) TestBool[1].2
54th element (bit) TestBool[1].22
Out of range, bad address TestBool[2].0
Out of range, bad address TestBool[50]
Recommendation on improvement of communication speed
The communication with the ControLogix controller has been designed in such way that reading arrays together is faster than reading each element separately. This means that if you use the tags that can be arranged into the arrays, you will notice a significant increase of speed.
For example, to read the status of levels in all 10 tanks, you should design your data types so that all levels are stored in an array with 10 elements. Below you will see an example of how to implement the faster method:
Level[1]
Level[2] FAST
Level[3]
If you prefer structures, you can use the following way; however, addressing of this type will slow down the communication. Therefore, we do not recommend the use of this type of data addressing.
BigTank[1].Level
BigTank[2].Level SLOW
BigTank[3].Level
Omron CJ2M Ethernet IP PLC
When creating connection to Omron CJ2M Ethernet IP PLC, please set the type to “CompactLogix”