SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
03EC402 – INDUSTRIAL ELECTRONICS
L – 19: Data Handling Instructions in PLC Programming
1. Data Handling Instructions
The instructions like timers and counters handle single bit of data (0 or 1). Data handling
instructions deals with more than a bit, like;
 Moving or transferring numbers from one memory location to another,
 Comparing data values, or
 Performing simple arithmetic operations,
a) Move (MOV) Instructions
This output instruction moves the source value to the destination location. As long as the rung
remains true, the instruction moves the data on each scan.
Entering parameters;
 Source is the address or constant of the data you want to move,
 Destination is the address where the instruction moves the data,
Application note: if you wish to move one word of data without affecting the math flags,
use a copy (COP) instruction with a length of one word instead of the MOV instruction.
Using MOV for variable initialization
S:1/15 is a bit in status date file that is energized for exactly one PLC scan when the PLC is
placed in run mode.
 It can be used to condition the initialization of variables used elsewhere in the ladder
logic.
UNIT – 4: PLC and PROGRAMMING Page 1
03EC402 – INDUSTRIAL ELECTRONICS
b) Masked Move (MVM) instructions,
The MVM instruction is a word instruction that moves data from a source location to a
destination and allows portions of the destination data to be masked by a separate word.
As long as the rung remains true, the instruction moves the data on each scan.
Entering parameters;
 Source is the address of the data you want to move,
 Mask is the address of the mask through which the instruction moves data;
 Destination is the address where the instruction ‘move’ data.
c) Bitwise AND instruction
The instruction performs a bit-by-bit logical AND. The operation is performed using the value at
source A and the value at source B.
 The result is stored in the destination.
 Source A and B can either be a word address or a constant; however, both sources cannot
be a constant.
 The destination must be a word address.
Application note:
When entering constants, you can used the ampersand (&) operator to change the radix of the
your entry.
 Instead of entering – 1 as a constant, you could enter &B1111111111111111 or &HFFFF
UNIT – 4: PLC and PROGRAMMING Page 2
03EC402 – INDUSTRIAL ELECTRONICS
d) Clear (CLR) Instruction
The CLR instruction is used to set the destination value of a word to zero.
This instruction always set the zero (Z) flag (S:0/2).
 Other arithmetic status bits are always cleared (reset)
o S:0/0, carry (C)
o S:0/1, overflow (V)
o S:0/3, sign (S)
2. Math Instructions:
Math instructions are used in ladder logic for various arithmetic operations like;
 Addition,
 Subtraction,
 Multiplication,
 Division
Source is the value / (values) to be used for the numerical, logic and moving operation.
 An instruction with two source operands in both operands does not accept program
constants.
Destination is the address of the operation’s end.
 Signed integers are contained in the complimentary shape of two and refer to parameters
of source and destination.
Location of math instructions in ladder logic will decide the operation performed,
 i.e If the (AB+C) operation is required, the ADD operation will occur before the MUL.
There are math instructions such as;
 ADD (addition),
 SUB (subtraction),
 MUL(multiplication),
 DIV (division),
 SQR (square root),
 NEG (negative a value -2’s
complementary),
 TOD ( convert integer to BCD),
 FRD (convert from BCD to integer)
UNIT – 4: PLC and PROGRAMMING Page 3
03EC402 – INDUSTRIAL ELECTRONICS
3. Jump Instructions (JMP)
A jump instruction is used to skip portion of the ladder program,
 Jumping to a label saves the scanning time of the program by omitting a segment
of the program until necessary.
 Jumping backwards allows the controller to repeatedly execute segments.
o Jump to subroutine (JSR)
The instructions for;
 Jump to Subroutine (JSR),
 Subroutine (SBR),
 Return (RET),
Are used to guide the controller to execute a separate subroutine file within the ladder system
and return to the instructions as per the instructions for JSR.
When the JSR instruction is executed, the controller jumps to the subroutine instruction
(SBR) at the beginning of the target subroutine file and resume execution at that point.
 You cannot jump into any part of a subroutine except the first instruction in that file.
4. Master Control Reset (MCR)
Use pair-based Master Control Reset (MCR) instructions to create program zones that turn
off all non-retentive outputs in the area.
 Rungs within the MCR zone are still scanned, but the scanning time is reduced due to
the false state of non-retentive outputs MCR zones allow you to enable or inhibit
segments of your program.
UNIT – 4: PLC and PROGRAMMING Page 4
03EC402 – INDUSTRIAL ELECTRONICS
5. Temporary End (TND) Instruction:
Temporary End (TND) Instruction, if its rung is true;
 Stop the processor from scanning the rest of the program file,
 Update the I/O and resume scanning at rung 0 of the main program.
o If the rung of this instruction is wrong, the processor will continue the scan
until the next TND instruction or the END statement.
6. Suspend (SUS) instruction:
Upon execution of the Suspend (SUS) instruction, the processor enters the Suspend idle
mode and store the Suspend ID in the statue file’s word 7 (S:7).
UNIT – 4: PLC and PROGRAMMING Page 5

More Related Content

DOCX
Sop 6.6 kv switchboard edited
PDF
自分のサービスで生きていく
PDF
Optical timing channel (OTC): Delivering sub-50ns over long-distance commerci...
PDF
High Accuracy Distance Measurement for Bluetooth Based on Phase Ranging
PDF
Yokogawa Centum VP
DOCX
Rach procedure in lte
PPTX
Introduction to Nokia RNC
PDF
Hsdpa analysis
Sop 6.6 kv switchboard edited
自分のサービスで生きていく
Optical timing channel (OTC): Delivering sub-50ns over long-distance commerci...
High Accuracy Distance Measurement for Bluetooth Based on Phase Ranging
Yokogawa Centum VP
Rach procedure in lte
Introduction to Nokia RNC
Hsdpa analysis

What's hot (20)

PDF
NEC 2020.pdf
PPTX
Introduction to arm virtualization
DOCX
How to resolve irat kpi issue in huawei
DOCX
Experiment 3 - Dynamic Characteristic of Thermistor
PPTX
project presentation on "THMC"
DOCX
Lte channel
PDF
MV MetalClad Switchgear
PDF
SRAN19 dimensioning.pdf
PDF
huawei-lte-kpi-ref
PDF
Hawke Universal Cable Glands - Installation Instruction
PDF
ホワイトボックス・スイッチの期待と現実
 
PDF
08102014_Huawei handovers-handover-algo
PPTX
Chapitre 3antennes.pptx
PDF
AXIWELD - EXOTHERMIC WELD POWDER AND MOULD
PDF
フュージョン・コミュニケーションズ_Fusion Connectのご提案
PDF
Commissioning flexi multiradio_bts_wcdma
PDF
802.11ac Technology Introduction
PPTX
3GPP F1インターフェース(TS38.470-f50)の概要
PPT
LCD Annunciators
NEC 2020.pdf
Introduction to arm virtualization
How to resolve irat kpi issue in huawei
Experiment 3 - Dynamic Characteristic of Thermistor
project presentation on "THMC"
Lte channel
MV MetalClad Switchgear
SRAN19 dimensioning.pdf
huawei-lte-kpi-ref
Hawke Universal Cable Glands - Installation Instruction
ホワイトボックス・スイッチの期待と現実
 
08102014_Huawei handovers-handover-algo
Chapitre 3antennes.pptx
AXIWELD - EXOTHERMIC WELD POWDER AND MOULD
フュージョン・コミュニケーションズ_Fusion Connectのご提案
Commissioning flexi multiradio_bts_wcdma
802.11ac Technology Introduction
3GPP F1インターフェース(TS38.470-f50)の概要
LCD Annunciators
Ad

Similar to data handling fuctions for programmable logic controller (20)

PDF
PPT
Data manipulation instructions
PPT
Data manipulation instructions
PPTX
Plc (programming)
PPT
instruction-set-of-8086-mr-binu-joy3.ppt
PPTX
Data transfer and manipulation
PDF
ARM programming basics for data typeswith examples
PDF
Chapter 6 - Introduction to 8085 Instructions
PDF
PLC-Programmable-Logic-Controller-Book.pdf
PPT
Instruction set of 8051.ppt
PDF
Plc ppt
PPT
MECHATRONICS-UNIT 4-PROGRAMMABLE LOGIC CONTROLLER .ppt
PPT
Data manipulation for Mechatronics System
PPT
An instruction is a binary pattern designed inside a microprocessor to perfor...
PDF
Automating Manufacturing Systems By Hugh Jack
PDF
BISWAJIT ADHIKARI_28101623024_PC EE 602.pdf
PDF
Basics of plc programming
PDF
Basics of plc_programming
PDF
Automating Manufacturing Systems With PLCs
PDF
AutomatingManufacturingSystemsWithPLCs.pdf
Data manipulation instructions
Data manipulation instructions
Plc (programming)
instruction-set-of-8086-mr-binu-joy3.ppt
Data transfer and manipulation
ARM programming basics for data typeswith examples
Chapter 6 - Introduction to 8085 Instructions
PLC-Programmable-Logic-Controller-Book.pdf
Instruction set of 8051.ppt
Plc ppt
MECHATRONICS-UNIT 4-PROGRAMMABLE LOGIC CONTROLLER .ppt
Data manipulation for Mechatronics System
An instruction is a binary pattern designed inside a microprocessor to perfor...
Automating Manufacturing Systems By Hugh Jack
BISWAJIT ADHIKARI_28101623024_PC EE 602.pdf
Basics of plc programming
Basics of plc_programming
Automating Manufacturing Systems With PLCs
AutomatingManufacturingSystemsWithPLCs.pdf
Ad

Recently uploaded (20)

PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Presentation on HIE in infants and its manifestations
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Institutional Correction lecture only . . .
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
RMMM.pdf make it easy to upload and study
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Presentation on HIE in infants and its manifestations
O5-L3 Freight Transport Ops (International) V1.pdf
Institutional Correction lecture only . . .
Computing-Curriculum for Schools in Ghana
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
01-Introduction-to-Information-Management.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
A systematic review of self-coping strategies used by university students to ...
Module 4: Burden of Disease Tutorial Slides S2 2025
RMMM.pdf make it easy to upload and study
GDM (1) (1).pptx small presentation for students
Chinmaya Tiranga quiz Grand Finale.pdf
O7-L3 Supply Chain Operations - ICLT Program
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Microbial disease of the cardiovascular and lymphatic systems
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS

data handling fuctions for programmable logic controller

  • 1. 03EC402 – INDUSTRIAL ELECTRONICS L – 19: Data Handling Instructions in PLC Programming 1. Data Handling Instructions The instructions like timers and counters handle single bit of data (0 or 1). Data handling instructions deals with more than a bit, like;  Moving or transferring numbers from one memory location to another,  Comparing data values, or  Performing simple arithmetic operations, a) Move (MOV) Instructions This output instruction moves the source value to the destination location. As long as the rung remains true, the instruction moves the data on each scan. Entering parameters;  Source is the address or constant of the data you want to move,  Destination is the address where the instruction moves the data, Application note: if you wish to move one word of data without affecting the math flags, use a copy (COP) instruction with a length of one word instead of the MOV instruction. Using MOV for variable initialization S:1/15 is a bit in status date file that is energized for exactly one PLC scan when the PLC is placed in run mode.  It can be used to condition the initialization of variables used elsewhere in the ladder logic. UNIT – 4: PLC and PROGRAMMING Page 1
  • 2. 03EC402 – INDUSTRIAL ELECTRONICS b) Masked Move (MVM) instructions, The MVM instruction is a word instruction that moves data from a source location to a destination and allows portions of the destination data to be masked by a separate word. As long as the rung remains true, the instruction moves the data on each scan. Entering parameters;  Source is the address of the data you want to move,  Mask is the address of the mask through which the instruction moves data;  Destination is the address where the instruction ‘move’ data. c) Bitwise AND instruction The instruction performs a bit-by-bit logical AND. The operation is performed using the value at source A and the value at source B.  The result is stored in the destination.  Source A and B can either be a word address or a constant; however, both sources cannot be a constant.  The destination must be a word address. Application note: When entering constants, you can used the ampersand (&) operator to change the radix of the your entry.  Instead of entering – 1 as a constant, you could enter &B1111111111111111 or &HFFFF UNIT – 4: PLC and PROGRAMMING Page 2
  • 3. 03EC402 – INDUSTRIAL ELECTRONICS d) Clear (CLR) Instruction The CLR instruction is used to set the destination value of a word to zero. This instruction always set the zero (Z) flag (S:0/2).  Other arithmetic status bits are always cleared (reset) o S:0/0, carry (C) o S:0/1, overflow (V) o S:0/3, sign (S) 2. Math Instructions: Math instructions are used in ladder logic for various arithmetic operations like;  Addition,  Subtraction,  Multiplication,  Division Source is the value / (values) to be used for the numerical, logic and moving operation.  An instruction with two source operands in both operands does not accept program constants. Destination is the address of the operation’s end.  Signed integers are contained in the complimentary shape of two and refer to parameters of source and destination. Location of math instructions in ladder logic will decide the operation performed,  i.e If the (AB+C) operation is required, the ADD operation will occur before the MUL. There are math instructions such as;  ADD (addition),  SUB (subtraction),  MUL(multiplication),  DIV (division),  SQR (square root),  NEG (negative a value -2’s complementary),  TOD ( convert integer to BCD),  FRD (convert from BCD to integer) UNIT – 4: PLC and PROGRAMMING Page 3
  • 4. 03EC402 – INDUSTRIAL ELECTRONICS 3. Jump Instructions (JMP) A jump instruction is used to skip portion of the ladder program,  Jumping to a label saves the scanning time of the program by omitting a segment of the program until necessary.  Jumping backwards allows the controller to repeatedly execute segments. o Jump to subroutine (JSR) The instructions for;  Jump to Subroutine (JSR),  Subroutine (SBR),  Return (RET), Are used to guide the controller to execute a separate subroutine file within the ladder system and return to the instructions as per the instructions for JSR. When the JSR instruction is executed, the controller jumps to the subroutine instruction (SBR) at the beginning of the target subroutine file and resume execution at that point.  You cannot jump into any part of a subroutine except the first instruction in that file. 4. Master Control Reset (MCR) Use pair-based Master Control Reset (MCR) instructions to create program zones that turn off all non-retentive outputs in the area.  Rungs within the MCR zone are still scanned, but the scanning time is reduced due to the false state of non-retentive outputs MCR zones allow you to enable or inhibit segments of your program. UNIT – 4: PLC and PROGRAMMING Page 4
  • 5. 03EC402 – INDUSTRIAL ELECTRONICS 5. Temporary End (TND) Instruction: Temporary End (TND) Instruction, if its rung is true;  Stop the processor from scanning the rest of the program file,  Update the I/O and resume scanning at rung 0 of the main program. o If the rung of this instruction is wrong, the processor will continue the scan until the next TND instruction or the END statement. 6. Suspend (SUS) instruction: Upon execution of the Suspend (SUS) instruction, the processor enters the Suspend idle mode and store the Suspend ID in the statue file’s word 7 (S:7). UNIT – 4: PLC and PROGRAMMING Page 5