Chapter 13 Data manipulation instructions
304 Rockwell Automation Publication 2080-RM001D-EN-E - February 2015
COP operation status values
The following table describes COP operation status values:
COP Status value Status description
0x00 No action taken (not enabled).
0x01 COP function block success.
0x02 Destination has spare bytes when copying from String.
0x03 Source data are truncated.
0x04 Copy length is invalid.
0x05 Data type mismatch when there is String Data type as either source or destination.
0x06 Source data size is too small for copy.
0x07 Destination data size is too small for copy.
0x08 Source Data offset is invalid.
0x09 Destination Data offset is invalid.
0x0A Data is invalid in either source or destination.
Copying to a different data type
When a copy to or from a String data type is performed, the ODVA short String format is used for data in the USINT array.
When COP is used between any other pair of data types, the copy operation is valid, even if the data type in the source is not
the same as the data type in the destination, and even when they are not in a valid format. The logic must be validated at
the application level.
From a USINT array to a String array
To copy a USINT array to a String array, the data in the USINT array must be in this format:
• Byte1: Length of first String
• Byte2: First Byte Character
• Byte3: Second Byte Character
• Byte n: Last Byte Character
• Byte (n+1): Length of second String
• Byte (n+2): First Byte Character for second String
• Etc.