Specifications

26
toggle from 0 to 1. The output M-File mapping is similar to discrete inputs
mapping.
When the short-string data type is used in instance 1, the Receive Data
Size located in Input I:1.2 word bits 0~7. The Receive Data Size indicates the
number of ASCII data bytes received from the RS232 serial connection by the
CDN366. When RS232 serial data is received, the CDN366 counts the total
ASCII data characters (bytes) in the message packet and places the value in
starting at word I:1.2, bits 0~7. The ASCII characters (bytes) data received by the
CDN366 are mapped onto words I:1.2 ~ I:1.31 (depending on the data size.) Each
ASCII character is equivalent to one byte. Two bytes are equivalent to one word.
The orders of the characters are mapped from right (least significant byte) to left
(most significant byte) (see Input Memory and Input M-File Tables of Allen
Bradley 1747-SDN).
To use both the Receive Toggle & Receive Acknowledge bits to control
serial messages received by the CDN366 to the PLC input memory, the “Sync
Enable” (class=65, instance=1, attribute=17) attribute must be “On”. The “Sync
On” requires the PLC ladder logic to control the handshaking bits to acknowledge
newly received data before subsequent data can be received. The following
discusses the “Rx Instance 1” reception.
1)
Bit 0s are set to 0 at initial setting for Rx Instance 1 Receive Toggle and
Receive Acknowledge. When data is received on the RS232 serial, the
Receive Toggle bit 8 in input I:1.1 (Rx instance 1) is toggled from 0 to 1.
The first byte of the received data is the data size length, which is stored in
Input I:1.2 bits 0~7. The data is stored in Input I:1.2 bits 8~15 and so on
(see Input Memory Table of Allen Bradley)
2) To acknowledge that data was received by the PLC, the Receive
Acknowledge bit 8 on Output O:1:1 must toggle from 0 to 1. To do this,
the PLC must use ladder logic to copy Receive Toggle bit 8 to Receive
Acknowledge bit 8. As long as the Receive Toggle and Receive
Acknowledge bits are the same, the CDN366 can update with the next
serial message.
3) When the Receive Acknowledge bit 8 is not toggled to acknowledge that
new data is received, the CDN366 will continue to hold newer serial data
in the Rx FIFO until the buffer overflows.
When the “Sync Enable” is disabled, the Receive Acknowledge bits 8~15 serve no
purpose, even when they are toggled. The new data sent from RS232 serial to
PLC input memory cannot be controlled by Receive Acknowledge bits although a
value must be present. Receive Toggle bit 8 (Rx Instance 1) is toggled for every
new message it receives. The message data will be stored in the same PLC Input
memory location until the new message is received and the existing message is
replaced.
Example: The table below shows a short string data type with two receive
instances that are mapped into discrete/M-file Inputs I/O. Each instance is