COP string array example
The following example shows a COP (copy) instruction copying a string array into Usint array. The COP instruction skips all the elements in the source array with Zero length.
For this example:
- Length is specified as 4 bytes.
- Number of Destination Elements to copy is 4 bytes.
- All the array elements with Zero length (blanks) are skipped.
- The COP instruction finds a non zero length element in the string array[1], which is copied into the designation Usint array[1] with 1. One is the length of the string in String array[1]) and Usint array[2] is 65, which is the ASCII code of "A".
- The COP instruction finds a non zero length element in String array[10] which is "a", which is copied into destination Usint array[3] with 1. One is the length of string in String array[10]) and Usint array[4] is 97 which is ASCII code of "a".
Ladder diagram

Array elements with values

Provide Feedback