Rockwell Automation Publication 5069-UM003B-EN-P - January 2020
35
Compact 5000 I/O Serial Module Features
Chapter 3
Generic ASCII Receive Functions
Table 8 - Generic ASCII Receive Functions
Swap Mode
Swapping is done before the module sends output data to the Serial Port
or after the module receives input data from the Serial Port.
• No Change (default)
• Word Swap - After executing a word swap on 32-bit hex value
11112222, the result is 22221111.
• Byte Swap - After executing a byte swap on 32-bit hex value
11223344, the result is 22114433.
• Word and Byte Swap - After executing a word and byte swap on 32-bit
hex value 11223344 the result is 44332211.
Handshake Mode
Determines how the serial module passes the received data from the
serial port to the controller.
• Master/Slave (default) - User logic must increment the ASCII.RxID
output tag to receive the next packet of data into the ASCII.RxData
input tag.
• Immediate - ASCII.RxID input tag increments automatically indicating
that the next packet of received data is available in the ASCII.RxData
input tag.
Message Timeout
The timer resets every time that the module receives a new byte from the
Serial Port.
If a Timeout occurs, the Non-Delimited Flag is set, and Received Data is
regarded as a new record to produce.
• 0 = Disabled (default)
• 1…32,767 ms
Pad Character
Character that is used to fill the remainder of the ASCII.RxData array after
the end of the received packet characters. Padding range is
I.RxData[RxDataLength] to I.RxData[Read Buffer Size].
• 7 bit $00…$7F
• 8 bit $00…$FF
Start Mode/ Delimiter
Select the usage of the Start Delimiter in the communication frame.
Choose to ignore, exclude, or include the delimiter.
• Ignore Start Delimiter (default) - Start of received packet not based on
the Start Delimiter.
• Exclude - Start of packet is determined based on the Start Delimiter
character, but this byte is not included in the ASCII.RxData input tag.
• Include - Start Delimiter is always the first byte in the ASCII.RxData
input tag.
Start Delimiter
Beginning of the message.
• 7 bit $00…$7F
– Recommendation: When Delete Mode is enabled, do not configure
Start Delimiter to DEL character.
• 8 bit $00…$FF
Termination Mode/
Delimiter
Selecting the termination mode of each channel. Choose to ignore or
include the delimiter.
• Ignore End Delimiter (default) - Receives packet based on number of
bytes specified only.
• Exclude Delimiter - Determines end of data when it finds the
Termination Delimiter characters, but these bytes are not included in
the ASCII.RxData input Tag.
• Include Delimiter - Termination Delimiters bytes are included in the
ASCII.RxData input tag.
Termination Delimiter 1
Configure the channel's termination delimiter.
• 7 bit $00…$7F
– Recommendation: When Delete Mode is enabled, do not configure
Termination Delimiter to DEL character.
• 8 bit $00…$FF
Termination Delimiter 2
Configure the channel's termination delimiter.
• 7 bit $00…$7F
• 8 bit $00…$FF ($FF = disabled)
XON/XOFF
Selecting the flow control of each channel.
Enables software handshaking.
• 0 = Disable (default)
• 1 = Enable
Echo Mode
The module sends all bytes received from Serial Port immediately to the
serial port by 1 byte, and sends produced data to the controller.
Enables retransmission of all received characters.
• 0 = Disable (default)
• 1 = Enable
Delete Mode
If the mode is ignored, it is handled as regular ASCII data. Choosing CRT
means that the module does not send previous data and is replaced by
three characters. Choosing printer means that the module does not send
previous data and is replaced by one character.
• 0 = Ignore (default) - echoes DEL character same as any other
character
• 1 = CRT - receives DEL character, echoes backspace, space, backspace
• 2 = Printer - receives DEL character, echoes ‘/’ followed by previous
character
Read Buffer Size
Max buffer length supported.
• 1…256 (default = 256)