The Guidance Controller EtherNet/IP server supports remote client (PLC or PAC) requests to read or write data in various formats. The remote client reads data from the Guidance Controller by using CIP Data Table Read requests (service code &H4C) and sends data to the Guidance Controller by using CIP Data Table Write requests (service code &H4D). The GPL EtherNet/IP server receives these requests in “explicit” message packets.
The Guidance Controller allows up to 4 different clients to make explicit connections. At most 8 connections are allowed at any one time.
Before configuring or attempting to connect a remote client, you should first configure the Guidance Controller. This configuration is accomplished by setting the "EtherNet/IP Data map" (DataID 593) strings.
| Parameter Database ID | Parameter Name | Description |
|---|---|---|
|
593 |
EtherNet/IP Data map: type, index, dir, length |
An array of up to 8 strings allowing configuration of up to 8 data mappings. |
Each string contains 4 comma-delimited fields.
"type, index, dir, length"
where
|
type |
This is a keyword that describes the type of the data that is to be exchanged. The possible types are defined in the following table.
The "Keywords" must be entered into the configuration strings. The hex code values are returned in response to any client read requests. Not all clients support all these data types. The most common types are SINT, INT, DINT, REAL, and STRING. |
||||||||||||||||||||||||||||||
|
index |
This is the register index value, from 1 to 8, that specifies which of 8 possible groups of values are read or written. Within GPL, the values are stored within one of two possible Parameter Database elements, DataID 594 “EtherNet/IP numeric register” for numeric values and DataID 595 “EtherNet/IP string register “ for string values. The index determines the Unit number when accessing these database elements. On the PLC or PAC, the index determines the name of the data tag used to read or write a group of values from a remote client. The PLC or PAC data tag name is "REGISTER_n" where n is one of these index values, from 1 to 8. |
||||||||||||||||||||||||||||||
|
dir |
This is a keyword indicating the direction of data transfer: |
||||||||||||||||||||||||||||||
|
length |
For numeric values, length is the number maximum number of array elements that can be transmitted as a group during a single transaction. The maximum value for length is determined by the size of the data type. The overall size (length * data size) must not exceed 512 bytes. For string values, this value is the length of the string (number of bytes in the string), and cannot be greater than 84 bytes. |
Once the Guidance Controller is configured, enable the server operation by setting database parameter 590 (EtherNet/IP Enable) to 1, which causes the server to begin responding to client requests.
The detailed instructions for configuring a remote client (PLC or PAC) will vary depending on the particular client being used, but the general steps are as follows:
Once an explicit message connection has been configured, a GPL procedure or web page can utilize the Parameter Database to set or read the values of the data being transferred. Two new parameters provide access to these values as shown in the table below. The number and types of data available in these parameters is determined by the values of the "EtherNet/IP Data map" (DataID 593) configuration strings.
| Parameter Database ID | Parameter Name | Description |
|---|---|---|
|
594 |
EtherNet/IP numeric register |
Contains up to 8 arrays (accessed by setting the unit from 1 to 8) of numeric data that are read or written by a remote EtherNet/IP client. The unit number for these arrays matches the index field of the corresponding “EtherNet/IP Data map” (DataID 593). The type field of the data map determines the data type of these numeric values. The number of elements in the arrays (from 1 to 512) is determined by the length field in the data map. |
|
595 |
EtherNet/IP string register |
Contains up to 8 strings (accessed by setting the unit from 1 to 8) that are read or written by a remote EtherNet/IP client. The unit number for these arrays matches the index field of the corresponding “EtherNet/IP Data map” (DataID 593). The data map type field always specifies STRING. The length of each string is determined by the length field in the data map. |
When you change the "EtherNet/IP Data map" (DataID 593) communication specification, the data available in DataID 594 and 595 dynamically changes.
If a data map specifies the direction at "O2T," the value is written by the remote client and cannot be written by the local GPL system.
Consider the following sample data map definition:
593, 1, 1, 0, "EtherNet/IP Data map: type, index, dir, length" =
"DINT, 1, O2T, 16",
"REAL, 2, T2O, 8",
"STRING, 3, O2T, 64",
"STRING, 4, T2O, 32"
The 1st configuration string specifies that an array of 16, 32-bit signed integers can be transferred from the PLC to the Guidance Controller and will be available via index #1. These values are written by the remote client to tag "REGISTER_1" with data type "DINT". These data values may be read in GPL using the Controller.PdbNum method. For example, the 3rd array value is read by:
value = Controller.PdbNum (594, 1, , 3)
The 2nd configuration string specifies that an array of 8, 32-bit floating point values can be transferred from the Guidance Controller to the PLC and will be available via index #2. These values are read by the remote client from tag "REGISTER_2" with data type "REAL". These data values may be read or written in GPL using the Controller.PdbNum method. For example, the 8th element of this array is written by:
Controller.PdbNum (594, 2, , 8) = value
The 3rd configuration string specifies that a string with a maximum length of 64 characters can be transferred from the PLC to the Guidance Controller and will be available via index #3. This value can be written by the remote client using tag "REGISTER_3" with data type "STRING". The string value may be read in GPL using the Controller.Pdb method. Note that DataID 595 is used to access the string value, rather then DataID 594. For example, the strings value may be read by:
str = Controller.Pdb (595, 3)
The last configuration string specifies that a string with a maximum length of 32 characters can be transferred from the Guidance Controller to the PLC and will be available via index #4. This value can be read by the remote client using tag "REGISTER_4" with data type "STRING". The string value may be written or read in GPL using the Controller.Pdb method. Note that DataID 595 is used to access the string value, rather then DataID 594. For example, the value of the string may be written by:
Controller.Pdb (595, 4) = "My string value"