User manual

Toolbox 32 User Manual 1.47d www.cse-semaphore.com/mykingfisher
Page
70
Ladder Logic - Copy
Single Copy
Copies a Source bit or register (eg. #R2) to a Destination bit or register (eg. #R1).
Source: Constant, bit, 16-bit register, float or long. Any addressable bit (eg. #R1.5, #DI14.1, #YLST2.1,
#NR2.1.5, #ND2.14.1) or register (eg. #R1, #F1, #DI14, #YLSUCC2, #YSEC) can be used. For more Source
options, please see the appendix - RTU Data.
Destination: Bit, 16-bit register, float or long.
Type Conversions
When copying between the 3 register types (16-bit, float and long), the copy block performs a data type
conversion. When a local register or a long is used as the source, it is treated as a signed number (bit 16 is
the sign bit of a local register). When converting floats to 16-bit or to Long, the decimal places are truncated.
Caution! If the range of the destination register is exceeded, the result will be undefined.
Block Copy
Copies one block of registers to another block of registers or copies a constant into a block of registers.
Destination: (16-bit register, float or long) The first destination register to copy to.
Source: (Constant, 16-bit register, float or long) The first source register or constant to copy from. If the
source is a constant, the constant is copied into all the destination registers. If the source is a register, a
block of source registers is copied to a block of destination registers. Note: it is possible to copy the contents
of a single register into a block of registers by using a source register that is one less that the destination.
Please see the example below.
Count: The number of consecutive registers to copy. Note: network registers are stored in blocks of 64
registers in RTU memory. When sourcing from or copying to network registers, it is not possible to cross a
network register block boundary (eg. #NR1.64, #NR1.128, #NR1.192 etc). Therefore, the maximum number
of network registers (#NA, #ND, or #NR) that can be block copied is 64. If the starting point is midway in a
network block, then only the number of registers to the next boundary can be copied.
Examples:
Destination: #R1, Source: 100, Count: 50
Fills #R1 to #R50 with the value 100.
Destination: #R2, Source: #R1, Count: 50
Fills #R2 to #R51with contents of #R1.