Western Reserve Controls
W5-JDC4 User’s Manual
Revision 1.02
20
5.3.4 Setting Up and Using the Swap Bytes Mode
This option may be helpful if the W5-JDC4 is connected to a DeviceNet scanner that organizes the
data string characters into data type elements that are larger than 1 byte each. An example is
many Allen Bradley PLC’s, such as the SLC500. In such cases the bytes of the data in the
Master’s memory organization can be reversed from the order in which they are sent or received on
the DeviceNet and the serial link to the ASCII device. This may cause problems in some cases.
Thus, the message received or desired “ABCDEFGH” string may appear in memory as
“BADCFEHG” for 2-byte (16 bit) word organization, and “DCBAHGFE” for 4-byte (32 bit) word
organization.
5.3.4.1 Transmit Byte Swapping
If Class
113
, Instance
ch
, Attribute
9
is non-zero, the bytes from the Master will be swapped by the
W5-JDC4 before transmitting the string to the ASCII device.
5.3.4.2 Receive Byte Swapping
If Class
114
, Instance
ch
, Attribute
12
is non-zero, the W5-JDC4 will re-order the bytes received
from your ASCII device before sending the string to the Master.
5.3.4.3 Rules for Usage
1. This feature is set for both transmit and receive independently.
2. The Byte Swapping works better if the string length is an even multiple of the byte-swap
size.
3. If a delimiter is received, then
§
All characters up to and including the defined delimiter are sent to the DeviceNet
Master.
§
If Pad Mode = 1, then the W5-JDC4 will fill the Poll Response data with the Pad Char
up to the defined size.
§
If Pad Mode = 0, then the W5-JDC4 will send only the data up to and including the
delimiter
4. If no delimiter is received, then
§
The W5-JDC4 will receive up to Max_Number_of_Receive_Chars, and then send this
string to DeviceNet with an overflow error.
§
It will continue to receive and send strings of size Max_Number_of_Receive_Chars,
along with the overflow error, until a delimiter is received. This could continue
indefinitely if your I/O device does not transmit the specified delimiter.