Topic: DMD0009

Help File Version: 2.9.4.37

MOVER - Move Range of Values


The Move Range of Values (MOVER) instruction is used to move the values from one range of memory locations to a second range of memory locations.

 

If the Source range and Destination range are different block types, any data conversion that is required will automatically be performed during the copy operation. For example, if the source range is D0 to D9 and the Destination range is R0 to R9, each value will be converted to a floating point number as it is copied.

 

If the size of the elements in the Destination range are smaller than the elements in the Source range, the values will be truncated during the copy operation. For example, if the source range is D0 to D7 and the Destination Range is V0 to V7, only the low Word of each D (32-bit) location will be moved to the corresponding V (16-bit) location.

 

The source and destination ranges can overlap which allows implementation of things like value shifting and LIFO / FIFO queues or stacks; see the FIFO example below of using MOVER to implement a shift register that shifts entire DWords.

 

 

The Move Range of Values instruction cannot move structures - the Copy Memory Range (MEMCOPY) instruction is the proper instruction to do this work.

 


Parameters:

Note: Use the F9 key to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.

 

Start of Source specifies the first numeric memory location of the data to copy. This can be any readable, non-structure numeric location.

 

Range specifies the extent of the range of values to copy, this can be specified in one of the following two ways:
 

  • End of Source specifies the last memory location in the source range of values to copy. This memory location must be in the same block as the Start of Source, and the ID (offset) of the end memory location must be greater than the ID (offset) of the source memory location.
     

  • Number of Elements specifies the number of elements in the range. This can be any constant value up to the maximum number of memory locations in the block, or any readable numeric location.

 

Start of Destination specifies the first memory location of the where the data is to be copied. This can be any readable, non-structure numeric location.

 


See Also:

INIT - Initialize Data

 

MEMCLEAR - Clear Memory Range

 

MEMCOPY - Copy Memory Range

 

MOVE - Move Value

 

MOVEBIT - Move Single Bit

 

MOVER - Move Range of Values

 

REFWRITE - Write Value Indirectly

 

RSTR - Reset Range

 

SETNUMR - Set Numeric Range

 

SETR - Set Range

 

STRCOPY - Copy String

 

STRCOPYR - Copy a Range of Strings

 


Rung Examples:

 


 


 

 


FIFO Example Shifting DWord Values