Topic: DMD0008

Help File Version: 2.10.0.636

MOVE - Move Value


The Move Value (MOVE) instruction is used to copy the contents of a single source value to a single destination location. The Move Value instruction can be used copy individual fields of a structure but it CANNOT be used to copy a complete structure; MEMCOPY - Copy Memory Range must be used to copy a complete structure.

 

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

 

If the size of the Destination element are smaller than the Source element, the values will be truncated during the copy operation. For example, if the source is D0 and the Destination is V0, the low Word of D0 (32-bit) will be moved to V0 (16-bit). For those familiar with DirectLOGIC PLCs, a Move Value operation is analogous to a set of LD and OUT instructions.

 

 


Parameters:

Note: Use the F9 key or click the 'three dot box' at the right edge of the parameter field 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.

 

Source specifies the value to be copied. This can be any constant value or any readable numeric location.

 

Destination specifies the numeric memory location where the value will be copied to. This can be any writable numeric location.

 


See Also:

INIT - Initialize Data

 

MAPIO - Map Inputs and Outputs

 

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 Example: