Data manipulation instruction in PLC

Data manipulation involves transferring data and operating on data with math Functions, data conversion, data comparison and logical operations. Data manipulation instructions enable the PLC to take some of the qualities of a computer system. Most PLC’s are equipped with the capability to manipulate data. Each instruction requires two or more words of data memory for operation. The words of data memory are referred to as Registers.

Data transfer instructions involve the transfer of the contents from one word to another. Data transfer instructions are Output instructions. The MOVE instruction is used to copy the value in one word to another word. The instruction copies data from a source word to a destination word.

Data compare instructions are input instructions. Data comparison instructions are useful in cases such as:

  • To start an action or process when the counter value at a specific value.

  • To verify that an input device’s data (Analog input) is within the range.

  • To verify that the parts are within the tolerance limit.

The commands can be summarized as follows:

MOV (Move) —Moves the source value to the destination.

MVM (Masked Move) —Moves data from a source location to a selected portion of the destination.

AND (And) —Performs a bitwise AND operation.

OR (Or) —Performs a bitwise OR operation.

XOR (Exclusive Or) —Performs a bitwise XOR operation.

NOT (Not) —Performs a bitwise NOT operation.

CLR (Clear) —Sets all bits of a word to zero.

Data Compare Instructions:

  • The compare instructions can be summarized as follows:

LIM (Limit test) —Tests whether one value is within the limit range of two other values.

MEQ (Masked Comparison for Equal) —Tests portions of two values to see whether they are equal. Compares 16-bit data of a source address to 16-bit data at a reference address through a mask.

EQU (Equal) —Tests whether two values are equal.

NEQ (Not Equal) —Tests whether one value is not equal to a second value.

LES (Less Than) —Tests whether one value is less than a second value.

GRT (Greater Than) —Tests whether one value is greater than a second value.

LEQ (Less Than or Equal) —Tests whether one value is less than or equal to a second value.

GEQ (Greater Than or Equal) —Tests whether one value is greater than or equal to a second value.