












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various plc instructions including jump to, go to subroutine, label, return, and arithmetic instructions. These instructions allow altering the order of execution of control programs and performing arithmetic operations. The document also covers the use of labels, return instructions, and arithmetic instructions in both ladder and functional block formats.
Typology: Slides
1 / 20
This page cannot be seen from the preview
Don't miss anything!













(JMP)^ instruction
allows^ the^ control
program
sequence to be altered if certain conditions exist. If^ the^ rung^ condition
is^ TRUE,^ the^
jump^ to^ coil^ reference address tells the processor to jump forward and execute thetarget rung. The jump to address label specifies the target rung to jump to. Using this instruction, a PLC can alter the order of execution ofthe control program to execute a rung that needs immediateattention. This instruction may also be called a go to instruction. Note: Care should be exercised when jumping over timers andcounters. Jumping over timers and counters will cause the timing andcounting instructions not to be executed.
and are^ sometimes located in an area specified by the PLC maker. If a PLC does not have a reserved subroutine area,the user can create one by programming a dummyrung with direct control to another dummy rung atthe end of the programmed subroutines. For proper programming documentation order, thesubroutine area should be located at the end of thecontrol program.
PLC With Assigned Subroutines AtThe End Of The Program
(RET)^ instruction
terminates^
a^ ladder
subroutine and is programmed with no conditionalinputs. When^ the^
control^ program
encounters
this
instruction, it returns to the main program, going tothe^ ladder^ rung
immediately^
following^ the^
instruction that initiated the subroutine. Normal program execution continues from that point. Each subroutine must have a return instruction.
Table Listing ArithmeticInstructions And Their Symbols
reference^ registers,
which^ define^ the
two^ operand
registers and the destination register of the operation. Some instructions, such as multiplication and division, may use fourregisters. Most^ arithmetic^ operations
in^ a^ PLC^ require
only^ single-precision arithmetic, meaning that the values of the operands and the result canbe held in one register each. If operations dealing with larger numbers are required, a PLC mayoffer double-precision arithmetic instructions. Double precision means that the system uses double the number ofregisters to hold the operands and result, because it must store largernumbers. Example, a double-precision addition instruction would use a total ofsix registers, two for each operand and two for the result.
instructions^
to^ obtain^ the
arithmetic
operands. In functional block format, some manufacturers offerthe ability to “cascade” block functions. Cascading is very useful when dealing with multiplearithmetic^ operations,
since^ one^
instruction^ will activate the next one when finished. Other manufacturers allow arithmetic operations tobe performed in block form; that is, using blocks ofseveral^ contiguous
registers^ as^
the^ operands
and
storing the results in another block of registers.
Use Of A Get (GET) Data Transfer Instruction &Referencing The Two Registers Using Contact Symbols ^ If A closes, the contents of register X and register Y are added and stored inregister Z. ^ If A does not close, no addition is performed. ^ If contact A was omitted, the addition would be performed in every scan
conditions^ are^ TRUE,
the^ processor^ performs
the
addition function. In the block shown in previous figure, register 1000 and register 1001can be preset values, storage registers, or I/O registers. Each^ time^ an^ OFF-to-ON
transition^ enables
the^ control^ line,
the
instruction adds the values in these two registers and places the resultin register 2000. The done, or enable, output coil indicates that the operation has beencompleted. This output remains ON as long as the control line is TRUE. An overflow of the addition operation energizes the overflow output ofthe block. If the operation overflows, some PLCs will clamp, or store, the resultsat the maximum value that the register can hold. Others will store the difference between the maximum count value andthe actual overflow value.