Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: MOVE Instruction in PLC – What You Need to Know?
Share
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > MOVE Instruction in PLC – What You Need to Know?

MOVE Instruction in PLC – What You Need to Know?

Let's learn MOVE Instruction in PLC to understand how the Move block works to avoid some of the common troubles associated with it.

Last updated: February 7, 2023 11:48 am
Mahmoud Salama
PLC Tutorials
No Comments
Share
10 Min Read
SHARE

A Move block is one of the very important instructions you can use when coding your PLC, it is also one of the most commonly used instructions.

Contents
MOVE Instruction in PLCMove block is Not Edge TriggeredMove Instruction Works on the BIT levelWhy does it matter?If IN and OUT1 are of the Same Data TypeIf IN and OUT1 are of Different Data Types (IN smaller area)If IN and OUT1 are of Different Data Types (IN larger area)How to Avoid this Problem in Move Instruction?Conclusion

MOVE Instruction in PLC

You can hardly find a PLC logic where you don’t need to use a Move block somewhere in the logic.

And that is why it is important to understand how the Move block works to avoid some of the common troubles associated with it.

In this article, we will highlight some of these points.

Move block is Not Edge Triggered

When using a Move you should know that a move block is not edge triggered, which means as long as the enable input “EN” has the signal state 1 the move instruction will be executed.

So if you need to only move the value one time at a certain event you need to make sure the EN is only triggered at that event.

The following video shows that concept.

Move block is Not Edge Triggered - PLC Programming Tips

As you see from the video, as long as the enable signal is 1 the IN will constantly be moved to OUT1.

That is not a mistake in itself, you just need to pay attention if whether is the logic you’re aiming for or not. Because if you need to move the information one time only you need to set a trigger for only that needed event.

Move Instruction Works on the BIT level

The Move block only works on the bit level, meaning it moves the Bits representation of the IN memory area to the OUT1 memory area, only the representation not the value inside.

For example: if IN is 01010101 it will be moved to OUT1 with the same representation of BITs regardless of how will it be interpreted in the OUT1 memory.

Why does it matter?

It matters because if the IN and OUT1 are of different data types, that might cause some trouble if you’re not careful.

Data Types in PLC Programming - Bit, Integer, Real, Word, Timer, Counter

The following will explain this point.

If IN and OUT1 are of the Same Data Type

This is the best-case scenario because the same data type means the same data interpretation, so no chance of any mix-up.

Also, no memory area is wasted or no lost information.

If IN and OUT1 are of Different Data Types (IN smaller area)

Here is where some mix up could happen if you’re not careful, see the next pictures for more explanation.

MOVE Instruction in PLC
PLC Logic – Simple network for MOVE block

As you see, this is a simple network where INPUT is moved to 6 different outputs from OUTPUT1 to OUTPUT6.

Below is the data type for each one.

TagINPUTOUTPUT1OUTPUT2OUTPUT3OUTPUT4OUTPUT5OUTPUT6
Data typeByteByteIntSIntUDIntUDIntDInt

Notice how the outputs have different data types; let’s see how that will affect the outcome. See the next picture 1.

how the Move block works
Picture 1 – Bits representation of input and outputs

If the INPUT has the Bit representation of 10101010

When the Move instruction is enabled, the Bit representation of the INPUT will be moved to the 6 outputs, but because they are of different data types.

You can see that the input only occupied the same number of bits it has, and the rest of the OUTPUT bits are zeros and never changed.

Move Instruction Value input and outputs
Picture 2 – Value interpretation of input and outputs

From picture 2 you can see that the value of the INPUT which is -86 is not the same in some of the OUTPUTS.

You can see that the OUTPUT2 value is 170 and not -86, that is because the OUTPUT2 is of data type Int which uses 16-bit memory, and the INPUT is a Byte, represented by only 8 bits.

So when you move 8 bits into an area of 16 bits, only 8 bits of this Int data type will be affected, and the rest won’t be changed. And that is why OUTPUT2 will be of value 170 and not -86.

 Because 10101010 is not the same as 0000000010101010

The same with OUTPUT4 and OUTPUT6.

So, when you move a small quantity of data/information into larger areas you may:

  • Loss the unused area of the larger memory, and in big projects, you need every bit of memory wisely used to avoid slowing your processing time or buying additional parts.
  • You might get the wrong values moved because of different interpretations of bits for different data types, especially when working with signed (+/-) values.

If IN and OUT1 are of Different Data Types (IN larger area)

Move instruction in PLC Siemens
Picture 3 – Bits representation of input and outputs (IN larger area)

As you see from picture 3, the IN area is now larger than some of the OUTPUTs

The following table shows data types:

TagINPUTOUTPUT1OUTPUT2OUTPUT3OUTPUT4OUTPUT5OUTPUT6
Data typeDintByteIntSIntUDIntUDIntDInt

The value of the INPUT is 4_294_967_295 which is the highest value this data type can hold, it means as you can see in picture 3, the bit representation will be all ones 1111_1111_1111_1111_1111_1111_1111_1111

When you try to move all those Ones into a smaller memory area, you are bound to lose some of the data, because there is simply not enough space in a Byte or an Int to hold all information in a DInt and that is why you would expect, the values in these OUTPUTs will be different. As shown in the next Picture.

PLC programming tutorial TIA Portal Move operations
 Picture 4 – Value interpretation of input and outputs

As you can see in picture 4 as expected the values inside different OUTPUTs are different. Because of different interpretations of each data type to the information it holds.

How to Avoid this Problem in Move Instruction?

First, you need to know that it is not a problem per say, if you’re paying attention to the data types you are using, and if you know what you should expect from your logic.

But it is also worth mentioning that all of this mix-up is a possibility if you’re not using the IEC check when working with your code _ by the way, not using the IEC check is the standard configuration in TIA Portal_.

If you’re using the IEC check, then the system will make sure the IN and OUT of the MOVE block are compatible together and it will give you a warning if you use data types that are not compatible. See pic.5 and pic.6

TIA Portal MOVE Instruction
Picture 5 – with IEC check

See in picture 5, when the IEC is checked, the system gave you a warning that outputs 3, 4, and 5 are not compatible and it will force you to choose the correct data type.

Siemens MOVE BLK
Picture 6 – without an IEC check

As you can see in picture 6, when the IEC check was not chosen, the system didn’t care about compatibility between IN and OUT and will almost accept any data type you choose.

You can check the help of MOVE instructions in Siemens TIA Portal to find a list of compatibility with/without the IEC check.

Learn the basic programming related to the MOVE block from the below video.

Move Instruction in Siemens PLC Programming - Full Course

Conclusion

  • Move Block is not edge triggered.
  • You should pay attention to the data type of IN and OUT when using the MOVE block.
  • You can avoid this mix-up possibility if you choose the IEC check.
  • You can choose to work with different data types if that is what you want, but in most cases, you’ll be losing some memory areas unused or losing some of the information moved to the new OUT area.

If you liked this article, then please subscribe to our YouTube Channel for Instrumentation, Electrical, PLC, and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

Read Next:

  • SCADA Indusoft Web Studio
  • PLC Programming Languages
  • How to Design an Effective HMI?
  • Inputs and Outputs in Delta PLC
  • Logic Gate Functional Block Diagram
Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !

Continue Reading

Sink or Source? Normally Open or Normally Closed?
Heating and Mixing of Products using PLC Example Tutorial
Configuration of InTouch Scada Trends
Automate Batch Mixing with Repeated Cycles in Omron PLC
How to use Sub Routines with Allen Bradley PLC
Understanding Braking Theory in VFD
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

How to Program a Star-Delta System using 1 Button in PLC?
What are Analog Inputs? – Analog Signals Processing in PLC
PLC Question Bank
PLC based Metro Automation Project
Introduction to SCADA
Difference between Timer and Counter – PLC Basics
Design Counters in PLC Programming With a Move Instruction
Real-Time Clock in Omron PLC? – CX Programmer

Keep Learning

Database for each safety module

Global Acknowledgment Instruction in Safety PLC

Free Mitsubishi PLC Online Training Courses

Free Mitsubishi PLC Online Training Course and Tutorials

Siemens Simatic HMI

How to Design an Effective HMI? – Human Machine Interface

PLC Totalizer

PLC Program for Flow Totalizer

Top 5 Advantages of Human-Machine Interface (HMI)

Top 5 Advantages of Human-Machine Interface (HMI)

Intrinsic Safety Barriers

Intrinsically Safe Barriers Questions and Answers

Relay Motor Logic Circuit

Motor Control Circuits

PLC Programming Example on Multi-Motor Control for Beginners

PLC Programming Example on Multi-Motor Control for Beginners

Learn More

Types of Sensors used in the Dairy Industry

Types of Sensors used in the Dairy Industry

ON OFF Valve Parts

ON OFF Valve Preventive Maintenance and Testing Procedure

Cable Float Level Switch Principle

Cable Float Level Switch Working Principle

Substation Safety Clearances

Substation Safety Clearances

Roller Conveyor

Difference Between Belt Conveyor and Roller Conveyor

How to Identify the Transistor Terminals

Pipeline Project Management

Pipeline Project Management

pH Analyzer Calibration and Troubleshooting

pH Analyzer Calibration and Troubleshooting

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?