Using the move instruction
The move instruction moves a value from a source to a destination. There are various move operations in TIA Portal. In this book, we will learn how to use MOVE
(the move value), which is the common move instruction.
Perform the following steps to write a simple program to move the value 20
to a register, MW0
, when a push button connected to I0.0 is pressed:
- On a new network, add a normally open instruction and specify an address,
I0.0
. - On the right-hand side of the programming environment, click Instructions | Move operation, and drag the
MOVE
(move value) instruction to the rung/network. - Double-click ??? for IN and specify a value, for example,
20
. - Double-click ??? for OUT1 and specify the destination address, for example,
MW0
, as shown in the following screenshot:
Figure 9.46 – Using the move instruction
When the push button connected to I0.0 is pressed, the normally open contact I0.0 in the...