Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 3 of 3

CDN066 DeviceNet Specifications, pages 19 to 25

Pages 19 to 25 of 25

The original document is the PDF (67 KB). 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 MKS CDN066

Page 19

CDN066 DEVICE (13) The Maximum Receive Size (Attribute 13) indicates the maximum number of data bytes to be returned when the receive FIFO is read (attribute 3) either using EXPLICIT messages or through the POLL connection. Setting this attribute will automatically reset the Produced Connection size as: Connection size = Max Rcv Size (Maximum size is 64) + 1 (if Status Byte enabled) + 1 (if String Format enabled) + 1 (if Receive Seq. Num. enabled) The maximum connection size is 67 bytes. This attribute affects the produce size, and is only settable when the the poll connection is in the non-established state.

(14)The Data Format (Attribute 14) control byte determines the type of data strings transferred over the DeviceNet channel which may be either an array of bytes or a DeviceNet defined SHORT_STRING, consisting of a length byte followed by the specified number of valid data bytes. Note that the data length byte does not appear on the serial channel. The Data format control byte also determines whether the parity information is retained in the receive FIFO. If the bit is cleared then the parity information is retained. If set, the parity information is overwritten with a 0, ensuring that only valid ASCII characters (0-7FH) appear in the FIFO. Bit 7 X

Bit 6 X

Bit 5 X

String Format 0 1

Strip Parity 0 1 PL/R 0 1 Revision 1.3

08/04/97

Bit 4 X

Bit 3 PADR

Bit 2 PL/R

Bit 1 Strip Parity

Bit 0 String Format

Interpretation Process FIFO packets as SHORT_STRING variables Process FIFO packets as an array of bytes. The array length implicitly defines the number of valid bytes. Interpretation Retain Parity information in receive FIFO Set MSB of receive FIFO data to 0 Interpretation Left justify received character string if PADR set Right justify received character string if PADR set 17

Page 20

CDN066 DEVICE PADR 0 1

Interpretation Do not attempt to PAD received characters Pad received characters strings with PADCHAR

If the PADR bit is set in block mode with the Strip Delimiter bit clear the Pad characters will be inserted between the last valid data bit and the end of the packet. This attribute affects the produce and consume size, and is only settable when the the poll connection is in the nonestablished state.

(15) The Block Mode (Attribute 15) control byte determines the whether the unit preparses the RS232 serial stream, whether block sequence numbers are pre-pended to the DeviceNet packets and whether received data is retransmitted on subsequent POLL requests. The control byte has the following format: Bit 7 X

Bit 6 Sync

Bit 5 ReSend

Pre/Post Delimiter 0 1

08/04/97

Bit 1 Strip Delimiter

Interpretation The delimiter character appears in the response packet. The delimiter character is removed from the response packet. Interpretation

Disable the delimit character function Enable the delimit character function

Enable Rcv.Seq.Num Interpretation 0 Disable the receive sequence number Revision 1.3

Bit 2 Delimiter Enable

Bit 0 Pre/Post Delimiter

Delimiter (if enabled) occurs at the end of the packet. Delimiter (if enabled) occurs at the start of the packet. The packet length is limited to the <Max Receive Size> length. Excess characters are discarded.

Delimiter Enable 0 1

Bit 3 Enable Rcv. Seq.Number

Interpretation

Strip Delimiter 0 1

Bit 4 Enable Xmit Seq. Number

18

Page 21

CDN066 DEVICE 1

Revision 1.3

08/04/97

Each response packet will have a sequential number pre-pended to allow the scanner to detect new response data.

19

Page 22

CDN066 DEVICE Enable Xmt.Seq.Num Interpretation 0 1

Disable the transmit sequence number The first byte of the poll request must contain a number different than the last request to allow the updating of the scanner data field without generating erroneous data on the RS232 data.

Resend 0 1

Interpretation Valid data is only sent once Valid data is resent during subsequent Poll requests until a new string of valid data is received on the RS232 serial channel.

Sync

Interpretation Do not apply synchronous Hand-shake protocol Apply synchronous Hand-shake protocol

0 1

When a CDN066 is configured with both <string> formatting and sequence numbers the sequence number is applied as the first byte and the string length information is contained in the second data byte. If the delimiter function is enabled the receive packet size may have an affect on the data responses. If the Post Delimiter field is zero the CDN066 will not transmit any response data until the delimiter character is detected or until <receive data size> bytes are available. If the receive data size is set less than the number of available characters the first poll response will contain the first <receive data size> bytes and the second poll response will receive the remaining characters up to delimiter. If the Post Delimiter field is 1 the CDN066 will not transmit any response data until a delimiter is detected AND: 1) 2)

more than <receive data size> bytes have been received, or another delimiter is detected

Characters in excess of the receive data size are discarded. If the Resend bit is set the device will resend data on subsequent Poll requests until another valid data packet has been received.

Revision 1.3

08/04/97

20

Page 23

CDN066 DEVICE The Sync bit enables the Synchronous Hand-shake protocol which provides further control over the sequence numbers during Poll Request/Response transactions to allow the Master to determine if a) a previous Poll Request packet has been accepted and b) the current Poll Response represents a new data string. When the Sync bit is set to 1 the Xmt.Seq.Num and Rcv.Seq.Num bits will be forced to 1. The Xmt.Seq.Num is received in the Poll Request and is interpreted as 2 four bit numbers: Bit Numbers 4-7 RcceiveAcknowledgeNumber

Bit Numbers 0-3 TransmitRequestNumber

The TransmitRequestNumber acts in the same way as the Xmt.Seq.Num described above. The CDN066 will ignore any data in the Poll Request until the TransmitRequestNumber is different than previously received TransmitRequestNumber. If a value of 0 is received the current data (if any) will be ignored. A 0 acts as a ‘reset’ function for the TransmitRequestNumber. The ReceiveAcknowledgeNumber is compared against the ReceiveRequestNumber (see below) and if equal it releases the current receive data buffer, allowing the CDN066 to send new information. A value of 0 will reset the ReceiveRequestNumber, acting as a reset function. The Rcv.Seq.Num is transmitted in the Poll Response and is interpreted as 2 four bit numbers: Bit Numbers 4-7 ReceiveRequestNumber

Bit Numbers 0-3 TransmitAcknowledgeNumber

The TransmitAcknowledgeNumber will be the same value as the most recently processed TransmitRequestNumber. When a poll request packet is received the TransmitRequestNumber is compared to the last TransmitAcknowledgeNumber and if different the data contained in the poll request is transmitted (see above). The TransmitRequestNumber is then transferred to the TransmitAcknowledgeNumber to notify the Master that the transaction has been processed. The ReceiveRequestNumber is used by the CDN066 to indicate to the Master that the poll response contains new data. The CDN066 will increment the most previous ReceiveAcknowledgeNumber (see above) and return it in the poll response if new data is available. Note that the CDN066 will generate numbers in the range 1..15, reserving 0 as the reset value.

Revision 1.3

08/04/97

21

Page 24

CDN066 DEVICE The Sync mode is typically used with a ‘Scanner’ that generates continuous poll requests. During the first poll request (possibly no valid data) the Xmt.Seq.Num should be set to a value of 00, resetting the receive handshaking logic on the CDN066. If no receive data is available the poll response will have the Rcv.Seq.Num set to ?0. If data is available the CDN066 will generate a poll response with the Rcv.Seq.Num set to ?1 with the associated data contained in the response packet. Further data will be buffered until the Scanner generates a poll request with a Xmt.Seq.Num with a value of ?1, acknowledging the receipt and processing of the previous poll. The Scanner should increment the ReceiveAcknowledgeNumber after processing each poll response, wrapping from 15 to 1. During transmission, the scanner application code may build the request message in memory and then increment the TransmitRequestNumber (1..15). This allows the background scanner function to send ‘partially complete’ poll requests without generating extraneous RS232 transmissions. When the scanner application code detects that the TransmitAcknowledgeNumber received as part of the poll response matches the previous TransmitRequestNumber it indicates that the scanner has successfully transmitted the previous poll data and the application may proceed to build new RS232 transmit data. This attribute adds 1 byte to the produce and consume size, and is only settable when the the poll connection is in the non-established state.

(16)The Delimiter character (Attribute 16) determines the start or end of packet character for the RS232 channel. It is only effective if the Delimiter Enable bit in the Block Control byte is set. (17) The Pad Char (Attribute 17) is used to pad string formatted receive data. It is typically set to ASCII <space> (020H) or an ASCII <null> (0). (18) The Maximum Transmit Size (Attribute 18) indicates the maximum number of data bytes to be transmitted across the RS232 channel. Setting this attribute will automatically reset the Poll Consumed Connection size as: Connection size = Max Xmt Size (Maximum value 64) + 1( if Status Clear enabled) + 1 (if String Format enabled) + 1 (if Transmit Seq. Num. enabled) The maximum connection size is 67 bytes. This attribute affects the consume size, and is only settable when the the poll connection is in the non-established state.

Revision 1.3

08/04/97

22

Page 25

CDN066 DEVICE (19) The Idle String (Attribute 19) will be transmitted on the RS232 serial channel if the device receives a ‘receive_idle’ (null Poll). If the string length by is set to 0 no data will be transmitted. (20) The Fault String (Attribute 20) will be transmitted on the RS232 serial channel if the device experiences a connection timeout. If the string length by is set to 0 no data will be transmitted. (21) The Status Enable (Attribute 21) inserts the serial status (Class 64 Instance 1 Attribute 5) as the first byte of the poll response when set to a non-zero value. This attribute adds 1 byte to the produce size, and is only settable when the the poll connection is in the nonestablished state. (22) The Status Clear Enable (Attribute 22) allows the first byte in the poll command to clear the status byte (when status clear byte, the first byte in the poll is not equal to 0) or not change the status (status clear byte, the first byte in the poll is =0 ). This attribute adds 1 byte to the consume size, and is only settable when the the poll connection is in the nonestablished state.

Revision 1.3

08/04/97

23