Sie sind auf Seite 1von 3

Page 1 of 3

MOVE: Move value


Symbol

Parameter Data type Memory area Description


EN BOOL I, Q, M, D, L Enable input

ENO BOOL I, Q, M, D, L Enable output

IN All elementary I, Q, M, D, L Source value

data types, DTL, or constant

STRUCT,

ARRAY

OUT1 All elementary I, Q, M, D, L Destination

data types, DTL, address

STRUCT,

ARRAY

Description
You can use the "Move value" operation to transfer the content of the operand at the IN input to the operand at the

OUT1 output. The transfer is always made in the direction of the ascending address.

If IEC test is enabled the tags at IN input and OUT1 output must be of the same data type. If the IEC test is not enabled,

the operand width at the IN input and the OUT1 output of the operation must be the same.

Copying entire arrays is possible only when the array components of the tags at input IN and at output OUT1 are of the

same data type.

For the "Move value" operation, you can insert additional outputs. In this case, the content of the operand at the IN input

is transferred to all available outputs.

The operation is only executed if the signal state is "1" at the enable input EN. In this case, the ENO output also has

signal state "1".

If the signal state at the EN input is "0", the enable output ENO is reset to "0".

The "Move block" (MOVE_BLK) and "Move block uninterruptible" (UMOVE_BLK) operations can also be used to copy

tags of the ARRAY data type. You can copy tags of the STRING data type with the operation S_CONV.

Placement
The "Move value" operation can be placed at any position in the network.

Example

IN MW10 = 0011 1111 1010 1111

OUT1 MW20 = 0011 1111 1010 1111

about:blank 8-11-2011
Page 2 of 3

If input I 0.0 has signal state "1", the "Move value" operation is executed. The operation copies the contents of the input

operand (MW10) to the output operand (MW20) and sets the output Q 4.0 to the signal state "1".

MOVE_BLK: Move block


Symbol

Parameter Data type Memory area Description


EN BOOL I, Q, M, D, L Enable input

ENO BOOL I, Q, M, D, L Enable output

IN ARRAY D, L The first element

of the source

area to be

copied.

COUNT UINT I, Q, M, D, L or Number of

constant elements to be

copied from the

source area to

the destination

area.

OUT ARRAY D, L The first element

of the destination

area to which the

content of the

source area is

copied.

Description
You can use the "Move block" operation to copy the content of a memory area (source area) to another memory area

(destination area). The number of elements to be copied to the destination area is specified with the COUNT parameter.

The width of the elements to be copied is defined by the width of the element at input IN. The copy operation takes

place in the direction of ascending addresses.

The operation is only executed if the signal state is "1" at the enable input EN. If no errors occur during execution of the

operation, the ENO output also has signal state "1".

The enable output ENO returns signal state "0" if one of the following conditions applies:

 The EN input has signal state "0".

 More data is copied than is available in the memory area at output OUT.

Placement
The "Move block" operation can be placed at any position in the network.

Example

about:blank 8-11-2011
Page 3 of 3

IN The tag "a_array" is an ARRAY data

type and consists of 5 elements of the

INT data type.

COUNT IW2 = 3

OUT The tag "b_array" is an ARRAY data

type and consists of 6 elements of the

INT data type.

If the inputs I 0.0 AND I 0.1 have signal state "1", the "Move block" operation is executed. The operation selects three

INT elements from the "a_array" tag (a_array[2..4]) and copies the content to the output tag "b_array" (b_array[1..3]). If

no errors occur during execution of the operation, the ENO output has signal state "1" and output Q 4.0 is set.

about:blank 8-11-2011

Das könnte Ihnen auch gefallen