The text of a manual · part 5 of 7
MS-Connect 210 User Manual, pages 41 to 50
Pages 41 to 50 of 65
The original document is the PDF (2.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Microscan MS-Connect 210
Page 41
Ethernet Port Custom Features
EtherNet/IP Customization Postamble Processing The Postamble is useful when a series of unknown bytes defines the end of a packet. Parameter Status Postamble String Send Postamble Default Setting N/A CR LF (0x0D 0x0A) N/A Optional Setting Disabled, One to four characters, with the Disabled, Enabled Enabled exception of NUL (0x00)
Status When enabled, all received serial data is buffered and is not transmitted to Ethernet until the Postamble sequence is detected. A maximum of 470 bytes can be buffered, including the Postamble.
Postamble String One to four ASCII characters, 0x01 to 0xFF. Do not use NUL (0x00).
Send Postamble When enabled, the Postamble string is sent to the Ethernet host. When disabled, the Postamble string is not sent to the Ethernet host.
Receive Timeout (Total Receive Timeout) Receive Timeout is the time the host is willing to wait for the total Receive Length. The module is guaranteed to respond at the end of the timeout whether or not any data has been received. This ensures a deterministic response time from the module, which helps the host sustain a consistent polling rate. This value is definable for a range of 0 to 1000 ms in 1 ms increments. A setting of 0 disables the timeout, causing the module to respond immediately. Parameter Timeout (in milliseconds) Default Setting Always specified Optional Setting 0 to 1000 0 = Immediate response
Receive Idle Timeout (Intercharacter Receive Timeout) Idle Timeout is the time the host is willing to wait once data is available. Idle Timeout is useful if a time gap between serial bytes defines the end of a packet. Idle Timeout is definable for a range of 0 to 255 ms in 1 ms increments. If 0, the Ethernet module responds immediately once data is available. To be effective, the Idle Timeout must be shorter than the Receive Timeout. If 255, the Idle Timeout is disabled and the Ethernet module will wait for the Receive Timeout before responding. Parameter Idle Timeout (in milliseconds) Default Setting Always specified Optional Setting 0 to 255 0 = Immediate response with any data 255 = Disabled (Wait until Receive Timeout) 2-12
MS-Connect 210 User’s Manual
Page 42
Using Ethernet
Receive Length Receive Length is useful for: • Defining a data packet as a known number of bytes. • Allowing the host to limit the amount of data transferred per communication cycle. Receive Length is configurable for 1 to 470 bytes in 1 byte increments. Parameter Idle Timeout (in bytes) Default Setting Always specified Optional Setting 0 to 470 0 = No receive
MS-Connect 210 User’s Manual
2-13
Page 43
Ethernet Port Operation
Ethernet Port Operation Serial Configuration To enter configuration via the Ethernet Port’s serial port, the Ethernet Port must be reset or power must be cycled. In the first 1.5 seconds after reset, the Ethernet Port will look for a series of three “x” characters using a default setting of 9600 baud, 8 data bits, no parity and 1 stop bit (9600,8,N,1). You will then be prompted to enter the configuration menu.
Telnet Configuration The configuration menu can also be entered using Telnet to port 9999. If a password has been configured, you must enter the password. You will then be prompted to enter the configuration menu. The Telnet entered from a Windows command prompt is shown below: C:\>telnet w.x.y.z 9999
2-14
MS-Connect 210 User’s Manual
Page 44
Using Ethernet
EtherNet/IP Serial Interface (Class 0x68) Data is sent and received on the serial port using explicit messaging. The host should send Get_Attribute_Single (0x0E), Set_Attribute_Single (0x10) or vendor-specific service Send_with_Response (0x45) to vendor-specific Object Class 104 (0x68), Instance 1, Attribute 106 (0x6A). The Set_Attribute_Single and Send_with_Response services include a 16 byte header that specifies parameters for control of the serial interface. However, the Set_Attribute_Single service cannot receive any data in the response so only the Send parameters are valid. Attribute ID (dec) 106
Access
Name
Data Type
Get/Set/ Serial SendResp Interface
Struct. of: UINT UINT UINT USINT USINT USINT USINT USINT USINT USINT [4] USINT [x]
Description
Send length (0-470) Receive length (0-470) Receive timeout [ms] Receive idle timeout (low byte) [ms] Reserved Send flags Receive flags Reserved Frame trailer (Postamble) flags Frame trailer (Postamble) (1-4 bytes) Data
The Get_Attribute_Single service does not supply any data, and so cannot specify any parameters, but will always provide the 16 byte header in the response, along with all the bytes available in the receive queue (maximum 470). The host should insure that adequate space is available for the maximum response data. The Send_with_Response service is the most flexible, and can supply data in both the command and response. This service is useful for sending a serial command and waiting for a serial response based on a defined protocol. All UINTs are little-endian, with the least significant byte or USINT sent first, followed by the most significant byte.
MS-Connect 210 User’s Manual
2-15
Page 45
EtherNet/IP Serial Interface (Class 0x68)
Send Length This parameter specifies the length of the send data. The maximum number of bytes that can be sent in one message is 470 bytes.
Receive Length This parameter specifies the largest amount of receive data the host can accept. It is only effective in the Send_with_Response service. In a Send_with_Response or Get_Attribute_Single reply it indicates the number of data bytes actually included in the message. The Get_Attribute_Single reply will contain all the bytes available in the receive queue up to the maximum. The maximum number of bytes that can be received in one message is 470 bytes.
Receive Idle Timeout This parameter specifies the longest amount of idle time in milliseconds (ms) the host is willing to wait once any data is available. It is only effective in the Send_with_Response service. For the Get_Attribute_Single service this value is assumed to be 0. A value of 0 is used for immediate idle timeout and the service will reply immediately after data is available. A value of 255 (FF in hex) disables the idle timeout. In a Send_with_Response reply it indicates the number of milliseconds of idle time the firmware actually waited for additional receive data.
Send Flags The Send Flags field gives the host some additional controls over the serial output. Bit (0 = LSB) 0 1-7
Status Flag Flush, Flushes the serial output queue before sending the data enclosed in the message. Reserved
Flushing the output queue allows the host to remove outgoing data and replace it with newer or higher-priority data.
Receive Flags The Receive Flags field gives the host some additional controls over the serial input. It is only effective in the Send_with_Response service. Bit (0 = LSB) 0 1-2 3 4-7
Status Flag Flush, Flushes the serial input queue before receiving new incoming data. Reserved Framing, Serial protocol framing is enabled (see Frame Trailer (Postamble) Flags). This bit can be checked in the response to see if the correct frame format was received. Reserved
Flushing the input queue allows the host to remove irrelevant data that was collected by the communication adapter. 2-16
MS-Connect 210 User’s Manual
Page 46
Using Ethernet
Frame Trailer (Postamble) Flags The Frame Trailer (Postamble) Flags field describes the trailer portion of the serial frame and the processing options. It is only effective in the Send_with_Response service when Framing is enabled in the Receive Flags. Bit (0 = LSB) 0-2 3 4 5-7
Status Flag Postamble length (1-4 bytes) Reserved Strip, Strip the trailer from the response Reserved
Note: The Receive Length field should be set to a value large enough for the data and trailer portions even if the Strip option is enabled.
Frame Trailer (Postamble) The Frame Trailer (Postamble) field contains the byte values expected at the end of a valid serial input frame. The number of significant bytes comes from the Frame Trailer (Postamble) Flags field.
Data Field The Data field contains the bytes that will be output on the serial port. The length of this field should equal at least the amount of data specified in Send Length, but can be longer to simplify programming. In a Get_Attribute_Single or Send_with_Response reply it contains the incoming serial data acquired.
MS-Connect 210 User’s Manual
2-17
Page 47
Input (T –>O) Assembly Object (Class 0x04, Instance 0x64)
Input (T –>O) Assembly Object (Class 0x04, Instance 0x64) The EtherNet/IP Assembly Object Instance 0x64 defines the Input data message that will be sent from the Ethernet Port to the EtherNet/IP connection originator via an I/O message. the input data buffer is 32 bytes (16 words) and is organized as follows: 16 bits Number of bytes in Serial Output Queue
16 bits Number of bytes in Serial Input Queue
16 bits Time since last byte received (ms)
...
The first word provides the number of bytes/characters stored in the serial output queue. This value is identical to Class 101, Instance 1, Attribute 100. It can be used to throttle the amount of data queued to the serial device so that the Ethernet Port’s 1K queue does not overflow. The second word provides the number of bytes/characters stored in the serial input queue. This value is identical to Class 101, Instance 1, Attribute 101. It can be examined to determine when serial data needs to be read from the Ethernet Port. The third word tells the amount of time in milliseconds (ms) since the last character was received from the serial port.
Output (O –>T) Assembly Object (Class 0x04, Instance 0x65) The EtherNet/IP Assembly Object Instance 0x65 defines the output data message that will be sent from the EtherNet/IP connection originator to the Ethernet Port via an I/O message. The output data is one 16-bit word (UINT) and is currently reserved for future use. It should be set to 0.
Configuration Assembly Object (Class 0x04, Instance 0x80) The Configuration Assembly Object is not implemented. However, some EtherNet/IP clients require one. If this is the case, use Instance ID 0x80 with a data length of 0.
Service-Object Summary Service Code
Class ID
Instance ID
0x0E / 0x10
101 (0x65)
1
0x0E / 0x10 / 0x45
104 (0x68)
0x0E
4
2-18
Attribute ID 100-115 (0x64 - 0x73)
Description Configuration (Future)
1
110 (0x6A)
Serial Interface
100 (0x64)
3
Input Assembly Object
MS-Connect 210 User’s Manual
Page 48
Using Ethernet
RSLogix Examples 1. Right-click the 1756-ENBT/A ENBT module under I/O Configuration. 2. Select New Module. 3. From the list of module types, select ETHERNET-MODULE, Generic Ethernet Module.
4. Enter the data as shown below, but with the appropriate IP address and a unique name of your choice. Be sure to select Data - INT in the Comm. Format selection box. This cannot be modified once the module is added.
MS-Connect 210 User’s Manual
2-19
Page 49
RSLogix Examples (cont.)
RSLogix Examples (cont.) 5. Fill in the Requested Packet Interval field. It is not recommended that you enter a value below 10 ms with the Ethernet Port of NET232/485.
An example of I/O data logic is shown below. Rung 6 checks if the number of received bytes is greater than 5 before sending a Get_Attribute explicit message.
2-20
MS-Connect 210 User’s Manual
Page 50
Using Ethernet
EIPScan Examples In the example below, an “h” is send, followed by a wait of 100 ms for up to 5 bytes of data with an idle timeout of 50 ms.
The following settings are for a Class 1 connection. Other screens can be left at default.
MS-Connect 210 User’s Manual
2-21