Move Data - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

5.8.2

Move Data

When the input operand, EN, is set to ON, the MOVE instruction copies data as
bits from one location in PACSystems controller memory to another. Because the
data is copied as bits, the new location does not need to use the same type of
memory area as the source. For example, you can copy data from an analog
memory area into a discrete memory area, or vice versa.
MOV sets its output, ENO, whenever it receives data unless one of the following occurs:
When the input, EN, is set to OFF, then the output, ENO, is set to OFF.
When the input, EN is set to ON, and the input, IN, contains an indirect reference, and the
memory of IN is out of range, then the output, ENO, is set to OFF.
The value to store at the destination Q is acquired from the IN parameter. If IN is a variable, the value
to store in Q is the value stored at the IN address. If IN is a constant, the value to store in Q is that
constant
The result of the MOVE depends on whether the data type for the Q operand is a bit reference or a
non-bit reference:
If Q is a non-bit reference, LEN (the length) indicates the number of memory locations in which
the IN value should be repeated, starting at the location specified by Q.
If Q is a bit reference, IN is treated as an array of bits. LEN therefore indicates the number of bits
to acquire from the IN parameter to make up the stored value. If IN is a constant, bits are
counted from the least-significant bit. If IN is a variable, LEN indicates the number of bits to
acquire starting at the IN location. Regardless, only LEN bits are stored starting at address Q.
For example, if IN was the constant value 29 and LEN is 4, the results of a MOV operation are as
follows:
Q is a WORD reference: The value 29 is repeatedly stored in locations Q, Q+1, Q+2, and Q+3.
Q is a BOOL reference: The binary representation of 29 is 11101. Since LEN is 4, only the four
least-significant bits are used (1101). This value is stored at location Q in the same order, so 1 is
stored in Q, 1 is stored in Q+1, 0 is stored in Q+2, and 1 is stored in Q+3.
If data is moved from one location in discrete memory to another, such as from %I memory to %T
memory, the transition information associated with the discrete memory elements is updated to
indicate whether or not the MOVE operation caused any discrete memory elements to change state.
Note: If an array of BOOL-type data specified in the Q operand does not include all the bits in a
byte, the transition bits associated with that byte (which are not in the array) are cleared
when the Move instruction receives data.
Data at the IN operand does not change unless there is an overlap in the source and destination—a
situation that is to be avoided.
GFK-2950C
Chapter 5. Function Block Diagram (FBD)
February 2018
255

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents