Configuring the Address Parameter
To configure the Address parameter, use the ADDM
function to convert the character string, described below, to an
address that is input into the ADR parameter of the DATA_EXCH block:
ADDM(‘rack.slot.channel{ip_address}message_type.protocol’), where:
This field... |
Represents... |
---|---|
rack |
the number assigned to the rack containing the communication module |
slot |
the position of the communication module in the rack |
channel |
the communication channel—set to a value of 0 |
ip_address |
the IP address of the remote device, for example 193.168.1.6 |
message_type |
the type of message, presented as a three character string—either:
|
protocol |
the protocol type—the three character string |
Configuring the Data_to_Send Parameter
The Data_to_Send
parameter varies in size. It
consists of contiguous registers that include—in sequence—both
the message type and the CIP request:
Offset (words) |
Length (bytes) |
Data Type |
Description |
---|---|---|---|
0 |
2 bytes |
Bytes |
Message type:
|
1 |
|
Bytes |
The CIP request1. NOTE: The structure and size of the CIP request depends
on the EtherNet/IP service.
|
1 Structure the CIP request in little endian order. |
Contents of the Received_Data Parameter
The Received_Data
parameter contains
only the CIP response. The length of the CIP response varies, and
is reported by Management_Param[3]
after the response
is received. The format of the CIP response is described, below:
Offset (words) |
Length (bytes) |
Data Type |
Description |
---|---|---|---|
0 |
2 |
Byte |
|
1 |
2 |
Byte |
|
2 |
length of additional status |
Byte array |
Additional Status1 |
... |
|
Byte array |
Response data |
1. Refer to The CIP Networks Library, Volume 1, Common Industrial Protocol at section 3-5.6 Connection Manager Object Instance Error Codes. |
Checking the Received_Data Response for System and CIP Status
Use the contents of the Received_Data parameter to check both the system status and the CIP status of the Ethernet communication module when handling the explicit message.
First: | Check the value of the high byte (MSB) of the first response word, positioned at offset 0. If the value of this byte is:
|
Next: | If the system properly handled the explicit message, and the high byte of the first response word equals 0, check the value of the second response word, positioned at offset 1. If the value of this word is:
|