Standard RLL Instructions

Size: px
Start display at page:

Download "Standard RLL Instructions"

Transcription

1 R Instructions InThishapter... oolean Instructions omparative oolean Immediate Instructions Timer, ounter and hift Register Instructions ccumulator / tack oad and Output ata Instructions ogical Instructions (ccumulator) Math Instructions it Operation Instructions (ccumulator) Number onversion Instructions (ccumulator) Table Instructions PU ontrol Instructions Program ontrol Instructions Interrupt Instructions Message Instructions

2 - Introduction Micro Ps offer a wide variety of instructions to perform many different types of operations. This chapter shows you how to use each standard Relay adder ogic (R) instruction. In addition to these instructions, you may also need to refer to the rum instruction in hapter, or the tage programming instructions in hapter. There are two ways to quickly find the instruction you need. If you know the instruction category (oolean, omparative oolean, etc.) just use the title at the top of the page to find the pages that discuss the instructions in that category. If you know the individual instruction name, use the following table to find the page(s) that discusses the instruction. Instruction Page Instruction Page Instruction Page ON -- IN -- PU IRT -- P N --, --, -- N -- N -- N --9 NI -- NN --, -- NN --9 NNI IN -- MP -- MP --9 NT O -- II -- I RUM --, -- NO --9 N -- NI -- UT -- IN -- INT -- IG -- JMP MR -- M -- MO -- MOM -- MU -- NON -- NOP -- OR --, --, -- OR -- OR I -- OR -- OR -- OR -- ORI -- ORN --, -- ORN -- ORNI -- --, POP -- RT -- RTI -- T -- TI -- G --9 GNT -- H -- HR -- R --9 TOP , I -- N --9, -- N -- NI -- U -- U -- TMR -- TMR -- TMR -- TMR -- U -- XOR -- XOR -- P User Manual, rd dition

3 oolean Instructions - Using oolean Instructions o you ever wonder why so many P manufacturers always quote the scan time for a K boolean program? imple. Most all programs utilize many boolean instructions. These are typically very simple instructions designed to join input and output contacts in various series and parallel combinations. Our irectot software is a similar program. It allows you to use graphic symbols to develop the program; therefore, you don t necessarily have to know the instruction mnemonics in order to develop a program. Many of the instructions in this chapter are not program instructions used in irectot, but are implied. In other words, they are not actually keyboard commands, however, they can be seen in a Mnemonic iew of the program once the irectot program has been developed and accepted (compiled). ach instruction listed in this chapter will have a small chart to indicate how the instruction is used with irectot and the HPP. HPP Implied Used N tatement The following paragraphs show how these instructions are used to build simple ladder programs. ll programs require an N statement as the last instruction. This tells the PU that this is the end of the program. Normally, any instructions placed after the N statement will not be executed. There are exceptions to this such as interrupt routines, etc. This chapter will discuss the instruction set in detail. X ll programs must have and N statement Y N imple Rungs You use a contact to start rungs that contain both contacts and coils. The boolean instruction that does this is called a tore or, instruction. The output point is represented by the Output or, instruction. The following example shows how to enter a single contact and a single output coil. irectot xample Handheld Mnemonics X Y N X Y N P User Manual, rd dition

4 - oolean Instructions Normally losed ontact Normally closed contacts are also very common. This is accomplished with the tore Not or, N instruction. The following example shows a simple rung with a normally closed contact. X irectot xample Y Handheld Mnemonics N X Y N N ontacts in eries Use the N instruction to join two or more contacts in series. The following example shows two contacts in series and a single output coil. The instructions used would be X, N X, followed by Y. X X irectot xample Y Handheld Mnemonics X N X Y N N Midline Outputs ometimes it is necessary to use midline outputs to get additional outputs that are conditional on other contacts. The following example shows how you can use the N instruction to continue a rung with more conditional outputs. X X irectot xample X X Y Y Y Handheld Mnemonics X N X Y N X Y N X Y N N P User Manual, rd dition

5 oolean Instructions - Parallel lements You also have to join contacts in parallel. The OR instruction allows you to do this. The following example shows two contacts in parallel and a single output coil. The instructions would be X, OR X, followed by Y. irectot xample Handheld Mnemonics X X Y X OR X Y N N Joining eries ranches in Parallel Quite often it is necessary to join several groups of series elements in parallel. The Or tore (OR) instruction allows this operation. The following example shows a simple network consisting of series elements joined in parallel. irectot xample Handheld Mnemonics X X X X Y N X N X X N X OR Y N Joining Parallel ranches in eries You can also join one or more parallel branches in series. The nd tore (N) instruction allows this operation. The following example shows a simple network with contact branches in series with parallel contacts. irectot xample Handheld Mnemonics X X X Y X X OR X N Y N N P User Manual, rd dition

6 - oolean Instructions ombination Networks You can combine the various types of series and parallel branches to solve most any application problem. The following example shows a simple combination network. X X X Y X X X X N omparative oolean ome P manufacturers make it really difficult to do a simple comparison of two numbers. ome of them require you to move the data all over the place before you can actually perform the comparison. The Micro Ps provide omparative oolean instructions that allow you to quickly and easily solve this problem. The omparative oolean provides evaluation of two -digit values using boolean contacts. The valid evaluations are: equal to, not equal to, equal to or greater than, and less than. In the following example when the value in -memory location is equal to the constant value, Y will energize. K Y P User Manual, rd dition

7 oolean Instructions - oolean tack There are limits to how many elements you can include in a rung. This is because the Ps use an -level boolean stack to evaluate the various logic elements. The boolean stack is a temporary storage area that solves the logic for the rung. ach time the program encounters a instruction, the instruction is placed on the top of the stack. ny other instructions already on the boolean stack are pushed down a level. The N, and OR instructions combine levels of the boolean stack when they are encountered. n error will occur during program compilation if the PU encounters a rung that uses more than the eight levels of the boolean stack. The following example shows how the boolean stack is used to solve boolean logic. X X OR N X Y Output X N X N X OR X X X X X X N X X N X X X X X X OR X OR (X N X) X N X X N [X OR (X N X)] X ORNOT X NOTXORXN[XOR(XNX)] X N XN(NOTXORX)N[XOR(XNX)] P User Manual, rd dition

8 - oolean Instructions Immediate oolean The Micro Ps usually can complete an operation cycle in a matter of milliseconds. However, in some applications you may not be able to wait a few milliseconds until the next I/O update occurs. The Ps offer Immediate input and outputs which are special boolean instructions that allow reading directly from inputs and writing directly to outputs during the program execution portion of the PU cycle. You may recall that this is normally done during the input or output update portion of the PU cycle. The immediate instructions take longer to execute because the program execution is interrupted while the PU reads or writes the I/O point. This function is not normally done until the read inputs or the write outputs portion of the PU cycle. NOT: ven though the immediate input instruction reads the most current status from the input point, it only uses the results to solve that one instruction. It does not use the new status to update the image register. Therefore, any regular instructions that follow will still use the image register values. ny immediate instructions that follow will access the I/O again to update the status. The immediate output instruction will write the status to the I/O and update the image register. PU can Read Inputs The PU reads the inputs from the local base and stores the status in an input image register. X... X X X O... ON O O Input Image Register O O X X Read Inputs from pecialty I/O olve the pplication Program X Y I Immediate instruction does not use the input image register, but instead reads the status from the module immediately. I/O Point X hanges Write Outputs Write Outputs to pecialty I/O iagnostics ON O X X P User Manual, rd dition

9 oolean Instructions -9 oolean Instructions tore () HPP Used Used The tore instruction begins a new rung or an additional branch in a rung with a normally open contact. tatus of the contact will be the same state as the associated image register point or memory location. tore Not (N) HPP Used Used The tore Not instruction begins a new rung or an additional branch in a rung with a normally closed contact. tatus of the contact will be opposite the state of the associated image register point or memory location. Operand ata Type Range Inputs X -- Outputs Y -- ontrol Relays -- tage -- Timer T -- ounter T -- pecial Relay P --, -- In the following tore example, when input X is on, output Y will energize. irectot X Y In the following tore Not example, when input X is off output Y will energize. irectot X Y P N P User Manual, rd dition

10 - oolean Instructions Or (OR) HPP Implied Used The Or instruction logically ors a normally open contact in parallel with another contact in a rung. The status of the contact will be the same state as the associated image register point or memory location. Or Not (ORN) HPP Implied Used The Or Not instruction logically ors a normally closed contact in parallel with another contact in a rung. The status of the contact will be opposite the state of the associated image register point or memory location. Operand ata Type Range Inputs X -- Outputs Y -- ontrol Relays -- tage -- Timer T -- ounter T -- pecial Relay P --, -- In the following Or example, when input X or X is on, output Y will energize. irectot X X Y Q OR In the following Or Not example, when input X is on or X is off, output Y will energize. irectot X X Y R ORN P User Manual, rd dition

11 oolean Instructions - nd (N) HPP nd Not (NN) HPP Implied Used Implied Used The nd instruction logically ands a normally open contact in series with another contact in a rung. The status of the contact will be the same state as the associated image register point or memory location. The nd Not instruction logically ands a normally closed contact in series with another contact in a rung. The status of the contact will be opposite the state of the associated image register point or memory location. Operand ata Type Range Inputs X -- Outputs Y -- ontrol Relays -- tage -- Timer T -- ounter T -- pecial Relay P --, -- In the following nd example, when input X and X are on output Y will energize. irectot X X Y N In the following nd Not example, when input X is on and X is off output Y will energize. irectot X X Y W NN P User Manual, rd dition

12 - oolean Instructions nd tore (N ) HPP Implied Used The nd tore instruction logically ands two branches of a rung in series. oth branches must begin with the tore instruction. Or tore (OR ) HPP Implied Used The Or tore instruction logically ors two branches of a rung in parallel. oth branches must begin with the tore instruction. In the following nd tore example, the branch consisting of contacts X, X, and X have been anded with the branch consisting of contact X. irectot X X X X Y N Q OR NT In the following Or tore example, the branch consisting of X and X have been ored with the branch consisting of X and X. irectot X X X X Y N N M ORT P User Manual, rd dition

13 oolean Instructions - There are limits to what you can enter with boolean instructions. This is because the internal PU uses an -level stack to evaluate the various logic elements. The stack is a temporary storage area that helps solve the logic for the rung. ach time you enter a instruction, the instruction is placed on the top of the stack. ny other instructions on the stack are pushed down a level. The nd tore and Or tore instructions combine levels of the stack when they are encountered. ince the stack is only eight levels, an error will occur if the PU encounters a rung that uses more than the eight levels of the stack. The following example shows how the stack is used to solve boolean logic. X X ORT N X Y Output X N X NT X OR X X X X X X N X X N X X X X X X ORT X OR (X N X) X N X X N [X OR (X N X)] X OR X X OR [X N [X OR (X N X)]] X NT X N [(X OR [X) N [X OR (X N X)]]] P User Manual, rd dition

14 - oolean Instructions Out () HPP Used Used The Out instruction reflects the status of the rung (on/off) and outputs the discrete (on/off) state to the specified image register point or memory location. Multiple Out instructions referencing the same discrete location should not be used since only the last Out instruction in the program will control the physical output point. Instead, use the next instruction, the Or Out. Operand ata Type Range Inputs X -- Outputs Y -- ontrol Relays -- In the following Out example, when input X is on, output Y and Y will energize. irectot X Y Y Or Out (OR ) HPP Used Used The Or Out instruction allows more than one rung of discrete logic to control a single output. Multiple Or Out instructions referencing the same output coil may be used, since all contacts controlling the output are logically ORed together. If the status of any rung is on, the output will also be on. OR Operand ata Type Range Inputs X -- Outputs Y -- ontrol Relays -- In the following example, when X or X is on, Y will energize. irectot X X Y OR Y OR O INT# O INT# P User Manual, rd dition

15 oolean Instructions - Positive ifferential (P) Used HPP Used The Positive ifferential instruction is typically known as a one shot. When the input logic produces an off to on transition, the output will energize for one PU scan. P Operand ata Type Range Inputs X -- Outputs Y -- ontrol Relays -- In the following example, every time X makes an off to on transition, will energize for one scan. irectot X P P et (T) HPP Used Used The et instruction sets or turns on an image register point/memory location or a consecutive range of image register points/memory locations. Once the point/location is set it will remain on until it is reset using the Reset instruction. It is not necessary for the input controlling the et instruction to remain on. Optional memory range T Reset (RT) HPP Used Used The Reset instruction resets or turns off an image register point/memory location or a range of image registers points/memory locations. Once the point/location is reset it is not necessary for the input to remain on. Optional memory range RT Operand ata Type Range Inputs X -- Outputs Y -- ontrol Relays -- tage -- Timer T -- ounter T -- P User Manual, rd dition

16 - oolean Instructions et, Reset Instr. ontinued In the following example when X is on, Y through Y will energize. irectot X Y T Y X T In the following example when X is on, Y through Y will be reset or de--energized. irectot X Y RT Y RT Pause (PU) HPP Used Used O INT# J 9 G The Pause instruction disables the output update on a range of outputs. The ladder program will continue to run and update the image register. However, the outputs in the range specified in the Pause instruction will be turned off at the output points. H Y PU Operand ata Type Range Outputs Y -- In the following example, when X is ON, Y--Y will be turned O. The execution of the ladder program will not be affected. irectot X Y Y PU ince the --HPP Handheld Programmer does not have a specific Pause key, you can use the corresponding instruction number for entry (#9), or type each letter of the command. O INT# J 9 G H In some cases, you may want certain output points in the specified pause range to operate normally. In that case, use ux to over-ride the Pause instruction. P User Manual, rd dition

17 omparative oolean Instructions - omparative oolean tore If qual () The tore If qual instruction begins a new rung or additional branch in a rung with a normally open comparative contact. The contact will be on when = bbb. bbb tore If Not qual (N) The tore If Not qual instruction begins a new rung or additional branch in a rung with a normally closed comparative contact. The contact will be on when bbb. bbb Operand ata Type Range bbb --memory ll (ee page --9) ll (ee page --9) onstant K In the following example, when the value in --memory location = 9, Y will energize. irectot K9 Y J 9 In the following example, when the value in --memory location, Y will energize. irectot K Y P N G P User Manual, rd dition

18 - omparative oolean Instructions Or If qual (OR) The Or If qual instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when = bbb. bbb Or If Not qual (ORN) The Or If Not qual instruction connects a normally closed comparative contact in parallel with another contact. The contact will be on when bbb. bbb Operand ata Type Range bbb --memory ll (ee page --9) ll (ee page --9) onstant K In the following example, when the value in --memory location = or =, Y will energize. irectot K Y K Q OR In the following example, when the value in --memory location = 9 or, Y will energize. irectot K9 Y J 9 G K R ORN P User Manual, rd dition

19 omparative oolean Instructions -9 nd If qual (N) The nd If qual instruction connects a normally open comparative contact in series with another contact. The contact will be on when = bbb. bbb nd If Not qual (NN) The nd If Not qual instruction connects a normally closed comparative contact in series with another contact. The contact will be on when bbb bbb Operand ata Type Range / bbb --memory ll (ee page --9) ll (ee page --9) onstant K In the following example, when the value in --memory location = and =, Y will energize. irectot K K Y N In the following example, when the value in --memory location = and, Y will energize. irectot K K Y W NN P User Manual, rd dition

20 - omparative oolean Instructions tore () The omparative tore instruction begins a new rung or additional branch in a rung with a normally open comparative contact. The contact will be on when ² bbb. bbb tore Not (N) The omparative tore Not instruction begins a new rung or additional branch in a rung with a normally closed comparative contact. The contact will be on when < bbb. bbb Operand ata Type Range / bbb --memory ll (ee page --9) ll (ee page --9) onstant K Timer T -- ounter T -- In the following example, when the value in --memory location ², Y will energize. irectot K Y N In the following example, when the value in --memory location <, Y will energize. irectot K Y P N N P User Manual, rd dition

21 omparative oolean Instructions - Or (OR) The omparative Or instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when ² bbb. bbb Or Not (ORN) The omparative Or Not instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when < bbb. bbb Operand ata Type Range / bbb --memory ll (ee page --9) ll (ee page --9) onstant K Timer T -- ounter T -- In the following example, when the value in --memory location = or ², Y will energize. irectot K Y G K Q OR N In the following example when the value in --memory location = or <, Y will energize. irectot K Y K R ORN N P User Manual, rd dition

22 - omparative oolean Instructions nd (N) The omparative nd instruction connects a normally open comparative contact in series with another contact. The contact will be on when ² bbb. bbb nd Not (NN) The omparative nd Not instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when < bbb. bbb Operand ata Type Range / bbb --memory ll (ee page --9) ll (ee page --9) onstant K Timer T -- ounter T -- In the following example, when the value in --memory location =, and ², Y will energize. irectot K K Y N N In the following example, when the value in --memory location = and <, Y will energize. irectot K K Y H W NN N Y N P User Manual, rd dition

23 Immediate Instructions - Immediate Instructions tore Immediate (I) The tore Immediate instruction begins a new rung or additional branch in a rung. The status of the contact will be the same as the status of the associated input point at the time the instruction is executed. The image register is not updated. X tore Not Immediate (NI) The tore Not Immediate instruction begins a new rung or additional branch in a rung. The status of the contact will be opposite the status of the associated input point at the time the instruction is executed. The image register is not updated. X Operand ata Type Range Inputs X -- In the following example, when X is on, Y will energize. irectot X Y I In the following example when X is off, Y will energize. irectot X Y P N I Or Immediate (ORI) Or Not Immediate (ORNI) The Or Immediate connects two contacts in parallel. The status of the contact will be the same as the status of the associated input point at the time the instruction is executed. The image register is not updated. The Or Not Immediate connects two contacts in parallel. The status of the contact will be opposite the status of the associated input point at the time the instruction is executed. The image register is not updated. X X P User Manual, rd dition

24 - Immediate Instructions OR Immediate Instructions ont d Operand ata Type Range Inputs X -- In the following example, when X or X is on, Y will energize. irectot X X Y Q OR I In the following example, when X is on or X is off, Y will energize. irectot X X Y R ORN I nd Immediate (NI) nd Not Immediate (NNI) The nd Immediate connects two contacts in series. The status of the contact will be the same as the status of the associated input point at the time the instruction is executed. The image register is not updated. The nd Not Immediate connects two contacts in series. The status of the contact will be opposite the status of the associated input point at the time the instruction is executed. The image register is not updated. X X Operand ata Type Range Inputs X -- In the following example, when X and X are on, Y will energize. irectot X X Y N In the following example, when X is on and X are off, Y will energize. irectot X X Y I W NN I P User Manual, rd dition

25 Immediate Instructions - Or Out Immediate (ORI) The Or Out Immediate instruction has been designed to use more than rung of discrete logic to control a single output. Multiple Or Out Immediate instructions referencing the same output coil may be used, since all contacts controlling the output are ored together. If the status of any rung is on at the time the instruction is executed, the output will also be on. Y ORI Operand ata Type Range Outputs Y -- In the following example, when X is on, output point Y on the output module will turn on. or instruction entry on the Handheld Programmer, you can use the instruction number (#) as shown, or type each letter of the command. irectot X Y I O INT# In the following example, when X or X is on, Y will energize. irectot X Y OR I O INT# X Y OR I O INT# P User Manual, rd dition

26 - Immediate Instructions et Immediate (TI) The et Immediate instruction immediately sets, or turns on an output or a range of outputs in the image register and the corresponding output point(s) at the time the instruction is executed.once the outputs are set it is not necessary for the input to remain on. The Reset Immediate instruction can be used to reset the outputs. Y TI Reset Immediate (RTI) The Reset Immediate instruction immediately resets, or turns off an output or a range of outputs in the image register and the output point(s) at the time the instruction is executed. Once the outputs are reset it is not necessary for the input to remain on. Y RTI Operand ata Type Range Outputs Y -- In the following example, when X is on, Y through Y will be set on in the image register and on the corresponding output points. irectot X Y Y TI X T I In the following example, when X is on, Y through Y will be reset (off) in the image register and on the corresponding output module(s). irectot X Y RTI Y RT I P User Manual, rd dition

27 Timer, ounter, and hift Register Instructions - Timer, ounter and hift Register Instructions Using Timers X Timers are used to time an event for a desired length of time. The single input timer will time as long as the input is on. When the input changes from on to off the timer current value is reset to. There is a tenth of a second and a hundredth of a second timer available with a maximum time of and seconds respectively. There is a discrete bit associated with each timer to indicate that the current value is equal to or greater than the preset value. The timing diagram below shows the relationship between the timer input, associated discrete bit, current value, and timer preset. econds X TMR K T T urrent alue / econds T Timer preset Y There are those applications that need an accumulating timer, meaning it has the ability to time, stop, and then resume from where it previously stopped. The accumulating timer works similarly to the regular timer, but two inputs are required. The start/stop input starts and stops the timer. When the timer stops, the elapsed time is maintained. When the timer starts again, the timing continues from the elapsed time. When the reset input is turned on, the elapsed time is cleared and the timer will start at when it is restarted. There is a tenth of a second and a hundredth of a second timer available with a maximum time of and seconds respectively. The timing diagram below shows the relationship between the timer input, timer reset, associated discrete bit, current value, and timer preset. X econds X tart/top TMR K T X X Reset Input T urrent alue / econds P User Manual, rd dition

28 - Timer, ounter, and hift Register Instructions Timer (TMR) and Timer ast (TMR) The Timer instruction is a. second single input timer that times to a maximum of seconds. The Timer ast instruction is a. second single input timer that times up to a maximum of seconds. These timers will be enabled if the input logic is true (on) and will be reset to if the input logic is false (off). Instruction pecifications Timer Reference (T): pecifies the timer number. Preset alue (bbb): onstant value (K) or a memory location. urrent alue: Timer current values are accessed by referencing the associated or T memory location*. or example, the timer current value for T physically resides in -memory location. iscrete tatus it: The discrete status bit is referenced by the associated T memory location. Operating as a timer done bit, it will be on if the current value is equal to or greater than the preset value. or example, the discrete status bit for Timer is T. TMR T bbb Preset Timer # TMR bbb T Preset Timer # The timer discrete status bit and the current value are not specified in the timer instruction. NOT: Timer preset constants (K) may be changed by using a handheld programmer, even when the PU is in Run Mode. Therefore, a -memory preset is required only if the ladder program must change the preset. Operand ata Type Range / bbb Timers T memory for preset values onstants (preset only) K Timer discrete status bits T/ -- or -- Timer current values /T* -- NOT: * With the HPP, both the Timer discrete status bits and current value are accessed with the same data reference. irectot uses separate references, such as T for discrete status bit for Timer T, and T for the current value of Timer T. You can perform functions when the timer reaches the specified preset using the discrete status bit. Or, use comparative contacts to perform functions at different time intervals, based on one timer. The examples on the following page show these two methods of programming timers. P User Manual, rd dition

29 Timer, ounter, and hift Register Instructions -9 Timer xample Using iscrete tatus its irectot X In the following example, a single input timer is used with a preset of seconds. The timer discrete status bit (T) will turn on when the timer has timed for seconds. The timer is reset when X turns off, turning the discrete status bit off and resetting the timer current value to. TMR K T Timing iagram econds T Y X T Y N TMR urrent alue / econds T MR Timer xample Using omparative ontacts irectot X In the following example, a single input timer is used with a preset of. seconds. omparative contacts are used to energize Y, Y, and Y at one second intervals respectively. When X is turned off the timer will be reset to and the comparative contacts will turn off Y, Y, and Y. TMR T K Timing iagram econds T K Y X Y T K Y Y Y T K Y T urrent alue / econds N TMR T MR T MR T MR P User Manual, rd dition

30 - Timer, ounter, and hift Register Instructions ccumulating Timer (TMR) ccumulating ast Timer (TMR) The ccumulating Timer is a. second two input timer that will time to a maximum of The ccumulating ast Timer is a. second two-input timer that will time to a maximum of ach one uses two timer registers in -memory. These timers have two inputs, an enable and a reset. The timer starts timing when the enable is on and stops when the enable is off (without resetting the count). The reset will reset the timer when on and allow the timer to time when off. Instruction pecifications Timer Reference (T): pecifies the timer number. Preset alue (bbb): onstant value (K) or a --memory location. urrent alue: Timer current values are accessed by referencing the associated or T memory location*. or example, the timer current value for T resides in -memory location. iscrete tatus it: The discrete status bit is accessed by referencing the associated T memory location. Operating as a timer done bit, it will be on if the current value is equal to or greater than the preset value. or example the discrete status bit for timer would be T. nable Reset TMR bbb T Preset Timer # nable Reset TMR bbb T Preset Timer # The timer discrete status bit and the current value are not specified in the timer instruction. NOT: The accumulating type timer uses two consecutive -memory locations for the -digit value, and therefore two consecutive timer locations. or example, if TMR is used, the next available timer number is TMR. Operand ata Type Range / bbb Timers T memory for preset values onstants (preset only) K Timer discrete status bits T/ -- or -- Timer current values /T* -- NOT: * With the HPP, both the Timer discrete status bits and current value are accessed with the same data reference. irectot uses separate references, such as T for discrete status bit for Timer T, and T for the current value of Timer T. The following examples show two methods of programming timers. One performs functions when the timer reaches the preset value using the discrete status bit, or use comparative contacts to perform functions at different time intervals. P User Manual, rd dition

31 Timer, ounter, and hift Register Instructions - ccumulating Timer xample using iscrete tatus its irectot X In the following example, a two input timer (accumulating timer) is used with a preset of seconds. The timer discrete status bit (T) will turn on when the timer has timed for seconds. Notice in this example that the timer times for second, stops for one second, then resumes timing. The timer will reset when turns on, turning the discrete status bit off and resetting the timer current value to. TMR K T X Timing iagram econds T Y T urrent alue / econds (cont) T MR G N TMR G ccumulator Timer xample Using omparative ontacts In the following example, a single input timer is used with a preset of. seconds. omparative contacts are used to energized Y, Y, and Y at one second intervals respectively. The comparative contacts will turn off when the timer is reset. irectot X TMR T Timing iagram econds K X T K Y Y Y T K Y Y T T K Y urrent alue / econds (cont) N TMR T MR T MR T MR P User Manual, rd dition

32 - Timer, ounter, and hift Register Instructions Using ounters ounters are used to count events. The counters available are up counters, up/down counters, and stage counters (used with R PU programming). The up counter has two inputs, a count input and a reset input. The maximum count value is The timing diagram below shows the relationship between the counter input, counter reset, associated discrete bit, current value, and counter preset. X X T X X Up Reset NT K T urrent alue ounts ounter preset The up down counter has three inputs, a count up input, count down input and reset input. The maximum count value is The timing diagram below shows the relationship between the counter input, counter reset, associated discrete bit, current value, and counter preset. X X X X Up U K T X X own T urrent alue ounts Reset ounter preset The stage counter has a count input and is reset by the RT instruction. This instruction is useful when programming using the R PU structured programming. The maximum count value is The timing diagram below shows the relationship between the counter input, associated discrete bit, current value, counter preset and reset instruction. X T X Up GNT K T urrent alue RT T ounts ounter preset P User Manual, rd dition

33 Timer, ounter, and hift Register Instructions - ounter (NT) The ounter is a two input counter that increments when the count input logic transitions from off to on. When the counter reset input is on the counter resets to. When the current value equals the preset value, the counter status bit comes on and the counter continues to count up to a maximum count of The maximum value will be held until the counter is reset. Instruction pecifications ounter Reference (T): pecifies the counter number. Preset alue (bbb): onstant value (K) or a --memory location. urrent alues: ounter current values are accessed by referencing the associated or T memory locations*. The --memory location is the counter location +. or example, the counter current value for T resides in --memory location. ount Reset ounter # NT T bbb Preset The counter discrete status bit and the current value are not specified in the counter instruction. iscrete tatus it: The discrete status bit is accessed by referencing the associated T memory location. It will be on if the value is equal to or greater than the preset value. or example the discrete status bit for counter would be T. NOT: ounter preset constants (K) may be changed by using a programming device, even when the PU is in Run Mode. Therefore, a -memory preset is required only if the ladder program must change the preset. Operand ata Type Range / bbb ounters T memory (preset only) onstants (preset only) K ounter discrete status bits T/ -- or -- ounter current values /T* -- NOT: * With the HPP, both the ounter discrete status bits and current value are accessed with the same data reference. irectot uses separate references, such as T for discrete status bit for ounter T, and T for the current value of ounter T. P User Manual, rd dition

34 - Timer, ounter, and hift Register Instructions ounter xample Using iscrete tatus its irectot X In the following example, when X makes an off to on transition, counter T will increment by one. When the current value reaches the preset value of, the counter status bit T will turn on and energize Y. When the reset turns on, the counter status bit will turn off and the current value will be. The current value for counter T will be held in --memory location. NT K T X ounting diagram T Y Y urrent alue (cont) T MR GY NT ounter xample Using omparative ontacts irectot X In the following example, when X makes an off to on transition, counter T will increment by one. omparative contacts are used to energize Y, Y, and Y at different counts. When the reset turns on, the counter status bit will turn off and the counter current value will be, and the comparative contacts will turn off. NT K T X ounting diagram T K Y Y Y T T K K Y Y Y urrent alue (cont) T MR GY NT T MR T MR P User Manual, rd dition

35 Timer, ounter, and hift Register Instructions - tage ounter (GNT) The tage ounter is a single input counter that increments when the input logic transitions from off to on. This counter differs from other counters since it will hold its current value until reset using the RT instruction. The tage ounter is designed for use in R PU programs but can be used in relay ladder logic programs. When the current value equals the preset value, the counter status bit turns on and the counter continues to count up to a maximum count of The maximum value will be held until the counter is reset. Instruction pecifications ounter Reference (T): pecifies the counter number. Preset alue (bbb): onstant value (K) or a --memory location. urrent alues: ounter current values are accessed by referencing the associated or T memory locations*. The -memory location is the counter location +. or example, the counter current value for T resides in --memory location. iscrete tatus it: The discrete status bit is accessed by referencing the associated T memory location. It will be on if the value is equal to or greater than the preset value. or example the discrete status bit for counter would be T. GNT T bbb Preset ounter # The counter discrete status bit and the current value are not specified in the counter instruction. Operand ata Type Range / bbb ounters T memory (preset only) onstants (preset only) K ounter discrete status bits T/ -- or -- ounter current values /T* -- NOT: * With the HPP, both the ounter discrete status bits and current value are accessed with the same data reference. irectot uses separate references, such as T for discrete status bit for ounter T, and T for the current value of ounter T. P User Manual, rd dition

36 - Timer, ounter, and hift Register Instructions tage ounter xample Using iscrete tatus its irectot X In the following example, when X makes an off to on transition, stage counter T will increment by one. When the current value reaches, the counter status bit T will turn on and energize Y. The counter status bit T will remain on until the counter is reset using the RT instruction. When the counter is reset, the counter status bit will turn off and the counter current value will be. The current value for counter T will be held in --memory location. GNT T K X ounting diagram T Y T RT Y urrent alue RT T (cont) RT G GY NT H RT T MR H T MR H tage ounter xample Using omparative ontacts irectot X In the following example, when X makes an off to on transition, counter T will increment by one. omparative contacts are used to energize Y, Y, and Y at different counts. lthough this is not shown in the example, when the counter is reset using the Reset instruction, the counter status bit will turn off and the current value will be. The current value for counter T will be held in --memory location. GNT T K X ounting diagram T K Y Y T K Y Y Y T K Y urrent alue (cont) T MR RT G GY NT T MR T MR P User Manual, rd dition

37 Timer, ounter, and hift Register Instructions - Up own ounter (U) This Up/own ounter counts up on each off to on transition of the Up input and counts down on each off to on transition of the own input. The counter is reset to when the Reset input is on. The count range is The count input not being used must be off in order for the active count input to function. Up own Reset U T bbb ounter # Preset Instruction pecification ounter Reference (T): pecifies the counter number. Preset alue (bbb): onstant value (K) or two consecutive --memory locations. urrent alues: urrent count is a double word value accessed by referencing the associated or T memory locations*. The -memory location is the counter location +. or example, the counter current value for T resides in --memory location and. iscrete tatus it: The discrete status bit is accessed by referencing the associated T memory location. Operating as a counter done bit it will be on if the value is equal to or greater than the preset value. or example the discrete status bit for counter would be T. aution: The U uses two memory locations for the digit current value. This means that the U uses two consecutive counter locations. If U T is used in the program, the next available counter is T. The counter discrete status bit and the current value are not specified in the counter instruction. Operand ata Type Range / bbb ounters T memory (preset only) onstants (preset only) K ounter discrete status bits T/ -- or -- ounter current values /T* -- NOT: * With the HPP, both the ounter discrete status bits and current value are accessed with the same data reference. irectot uses separate references, such as T for discrete status bit for ounter T, and T for the current value of ounter T. P User Manual, rd dition

38 - Timer, ounter, and hift Register Instructions Up / own ounter xample Using iscrete tatus its In the following example if X and X are off,when X toggles from off to on the counter will increment by one. If X and X are off the counter will decrement by one when X toggles from off to on. When the count value reaches the preset value of, the counter status bit will turn on. When the reset X turns on, the counter status bit will turn off and the current value will be. irectot X X U K T X ounting iagram X X X T Y T urrent alue (cont) T MR U IG Up / own ounter xample Using omparative ontacts In the following example, when X makes an off to on transition, counter T will increment by one. omparative contacts are used to energize Y and Y at different counts. When the reset (X) turns on, the counter status bit will turn off, the current value will be, and the comparative contacts will turn off. irectot X X U T X ounting iagram X X X T K Y T K Y Y Y urrent alue (cont) U IG N T MR T MR P User Manual, rd dition

39 Timer, ounter, and hift Register Instructions -9 hift Register (R) The hift Register instruction shifts data through a predefined number of control relays. The control ranges in the shift register block must start at the beginning of an bit boundary use -bit blocks. The hift Register has three contacts. T R ata determines the value ( or ) that will enter the register OK rom lock shifts the bits one position on each low to high transition RT To bbb Reset resets the hift Register to all zeros. With each off to on transition of the clock input, the bits which make up the shift register block are shifted by one bit position and the status of the data input is placed into the starting bit position in the shift register. The direction of the shift depends on the entry in the rom and To fields. rom to would define a block of sixteen bits to be shifted from left to right. rom to would define a block of sixteen bits, to be shifted from right to left. The maximum size of the shift register block depends on the number of available control relays. The minimum block size is control relays. Operand ata Type Range / bbb ontrol Relay irectot X ata Input R X lock Input rom X Reset Input To RT H R ORN Inputs on uccessive cans hift Register its ata lock Reset indicates on - indicates off P User Manual, rd dition

40 - ccumulator / tack oad and Output ata Instructions ccumulator / tack oad and Output ata Instructions Using the ccumulator opying ata to the ccumulator The accumulator in the internal PUs is a bit register which is used as a temporary storage location for data that is being copied or manipulated in some manor. or example, you have to use the accumulator to perform math operations such as add, subtract, multiply, etc. ince there are bits, you can use up to an -digit number. The accumulator is reset to at the end of every PU scan. The oad and Out instructions and their variations are used to copy data from a -memory location to the accumulator, or, to copy data from the accumulator to --memory. The following example copies data from -memory location to -memory location. X opy data from to the lower bits of the accumulator Unused accumulator bits are set to zero cc opy data from the lower bits of the accumulator to ince the accumulator is bits and memory locations are bits the oad ouble and Out ouble (or variations thereof) use two consecutive -memory locations or digit constants to copy data either to the accumulator from a -memory address or from a -memory address to the accumulator. or example if you wanted to copy data from and to and the most efficient way to perform this function would be as follows: X 9 opy data from and to the accumulator cc. 9 opy data from the accumulator to and 9 hanging the ccumulator ata Instructions that manipulate data also use the accumulator. The result of the manipulated data resides in the accumulator. The data that was being manipulated is cleared from the accumulator. The following example loads the constant value 9 into the accumulator, shifts the data right bits, and outputs the result to. P User Manual, rd dition

41 ccumulator / tack oad and Output ata Instructions - X onstant 9 K9 oad the value 9 into the accumulator cc. The upper bits of the accumulator will be set to hifted out of accumulator HR K cc. hift the data in the accumulator bits (K) to the right Output the lower bits of the accumulator to 9 ome of the data manipulation instructions use bits. They use two consecutive memory locations or an digit constant to manipulate data in the accumulator. In the following example, when X is on, the value in and will be loaded into the accumulator using the oad ouble instruction. The value in the accumulator is added with the value in and using the dd ouble instruction. The value in the accumulator is copied to and using the Out ouble instruction. X 9 oad the value in and into the accumulator ddthevalueinthe accumulator with the value in and 9 + cc. 9 9 (ccumulator) ( and ) opy the value in the accumulator to and 9 9 P User Manual, rd dition

42 - ccumulator / tack oad and Output ata Instructions Using the ccumulator tack The accumulator stack is used for instructions that require more than one parameter to execute a function or for user defined functionality. The accumulator stack is used when more than one oad instruction is executed without the use of an Out instruction. The first load instruction in the scan places a value into the accumulator. very oad instruction thereafter without the use of an Out instruction places a value into the accumulator and the value that was in the accumulator is placed onto the accumulator stack. The Out instruction nullifies the previous load instruction and does not place the value that was in the accumulator onto the accumulator stack when the next load instruction is executed. very time a value is placed onto the accumulator stack the other values in the stack are pushed down one location. The accumulator is eight levels deep (eight bit registers). If there is a value in the eighth location when a new value is placed onto the stack, the value in the eighth location is pushed off the stack and cannot be recovered. X K oad the value into the accumulator onstant urrent cc. value cc. Previous cc. value cc. evel evel evel ccumulator tack evel evel evel K onstant urrent cc. value evel evel oad the value into the accumulator, pushing the value onto the stack cc. Previous cc. value cc. evel evel ccumulator tack ucket evel evel evel evel K onstant urrent cc. value evel evel oad the value into the accumulator, pushing the value to the st stack location and the value to the nd stack location cc. Previous cc. value cc. evel evel ccumulator tack ucket evel evel evel evel evel evel The POP instruction rotates values upward through the stack into the accumulator. When a POP is executed the value which was in the accumulator is cleared and the value that was on top of the stack is in the accumulator. The values in the stack are shifted up one position in the stack. ucket P User Manual, rd dition

43 ccumulator / tack oad and Output ata Instructions - X POP Previous cc. value cc. POP the st value on the stack into the accumulator and move stack values up one location urrent cc. value cc. evel evel ccumulator tack 9 9 evel evel opy data from the accumulator to evel evel evel evel POP Previous cc. value cc. POP the st value on the stack into the accumulator and move stack values up one location urrent cc. value cc. 9 evel evel ccumulator tack 9 evel evel opy data from the accumulator to. 9 evel evel evel evel POP Previous cc. value cc. 9 POP the st value on the stack into the accumulator and move stack values up one location urrent cc. value cc. X X X X 9 evel evel ccumulator tack evel evel opy data from the accumulator to 9 evel evel evel evel Using Pointers Many of the series instructions will allow -memory pointers as a operand (commonly known as indirect addressing). Pointers allow instructions to obtain data from -memory locations referenced by the pointer value. NOT: -memory addressing is in octal. However, the pointers reference a -memory location with values viewed as HX. Use the oad ddress () instruction to move an address into the pointer location. This instruction performs the Octal to Hexadecimal conversion automatically. In the following simple example we are using a pointer operand in a oad instruction. -memory location is being used as the pointer location. contains the value which the PU views as the Hex equivalent of the Octal address -memory location. The PU will copy the data from which in this example contains the value into the lower word of the accumulator. P User Manual, rd dition

This Errata Sheet contains corrections or changes made after the publication of this manual.

This Errata Sheet contains corrections or changes made after the publication of this manual. Errata heet This Errata heet contains corrections or changes made after the publication of this manual. Product Family: L ate: pril Manual Number --M Revision and ate nd Edition, Rev. ; March hanges to

More information

13 Entering Programs

13 Entering Programs Entering Ladder Programs Purpose of Section Handheld Programmer Key Sequences Instruction Overview This section will demonstrate how to use the Handheld programmer for mnemonic programming. The HPP is

More information

Ladder logic (LAD) representation Statement list (STL) representation Available in these CPUs

Ladder logic (LAD) representation Statement list (STL) representation Available in these CPUs 1 he following conventions are used in this chapter to illustrate the equivalent ladder logic and statement list instructions and the CPUs in which the instructions are available: = n n adder logic ()

More information

Index A B C D. i-1

Index A B C D. i-1 ccumulating Fast Timer instruction, ccumulating Timer (TMR) instruction, ccumulator, ccumulator Instructions, liases, nalog Ioxes, 0 pprovals, SII onversion Table, G- SII In/Out and PRINT, SII Instructions,

More information

Monitoring. In This Chapter

Monitoring. In This Chapter ebugging and hapter Monitoring 0 In This hapter Monitor with ata View... 0- hange Value ialog.... 0- Using the Memory Editor.... 0-0 Test Mode Operations for ebugging.... 0- Trap Monitor.... 0- Stack Monitor

More information

Edit a Program. In This Chapter

Edit a Program. In This Chapter Edit a Program hapter In This hapter I/O onfiguration.... - Referencing Program Elements.... -4 Entering Program Instructions.... - Shortcuts for Entering Instructions.... - rawing/eleting onnecting Lines....

More information

This chapter describes the SIMATIC instruction set for the S7-200.

This chapter describes the SIMATIC instruction set for the S7-200. 9 This chapter describes the SIMATIC instruction set for the S7-200. Chapter Overview Section escription Page 9.1 SIMATIC Bit ogic Instructions 9-2 9.2 SIMATIC Compare Instructions 9-10 9.3 SIMATIC Timer

More information

Chapter. Operation. In this Chapter

Chapter. Operation. In this Chapter hapter PU Specifications and Operation In this hapter Introduction... PU Specifications... PU Hardware Setup... PU Operation... I/O Response Time... PU Scan Time onsiderations... Memory Map... L0 System

More information

PLC Programming D R. T A R E K A. T U T U N J I

PLC Programming D R. T A R E K A. T U T U N J I PLC Programming D R. T A R E K A. T U T U N J I PLC Programming As PLCs developed and expanded, programming languages have developed with them. The three types of programming languages used in PLCs are:

More information

Appendix. Special Relays. In This Appendix... DL06 PLC Special Relays...D 2

Appendix. Special Relays. In This Appendix... DL06 PLC Special Relays...D 2 Special Relays ppendix In This ppendix... L0 PL Special Relays... ppendix : Special Relays L0 PL Special Relays Special Relays are just contacts that are set by the PU operating system to indicate a particular

More information

Appendix. Auxiliary Functions. In This Appendix...

Appendix. Auxiliary Functions. In This Appendix... uxiliary Functions ppendix In This ppendix... Introduction... UX * RLL Operations... UX * V-memory Operations... UX * I/O onfiguration... UX * PU onfiguration... UX * Handheld Programmer onfiguration...

More information

Simple Ladder Logic. Simple Ladder Logic. OR Operation. Chapter 2: Basic Ladder Logic Programming. Ladder Logic Learning objectives.

Simple Ladder Logic. Simple Ladder Logic. OR Operation. Chapter 2: Basic Ladder Logic Programming. Ladder Logic Learning objectives. OR Operation Chapter 2: asic Ladder Logic Programming Control ehavior: The light should be on when either switch is on (i.e., closed) or switch is on (closed). Otherwise it should be off Task: Implement

More information

Appendix. Auxiliary Functions. In This Appendix...

Appendix. Auxiliary Functions. In This Appendix... uxiliary Functions ppendix In This ppendix... Introduction... UX * RLL Operations... UX * V-memory Operations... UX * I/O onfiguration... UX * PU onfiguration... UX * Handheld Programmer onfiguration...

More information

Chapter. System design and. configuration. In This Chapter

Chapter. System design and. configuration. In This Chapter hapter System design and configuration In This hapter L0 System esign Strategies... Module Placement... Power udgeting... onfiguring the L0 s omm Ports... onnecting to MOUS and irectnet Networks... Non

More information

PLC AUTOMATION SYSTEM LABORATORY. Manual

PLC AUTOMATION SYSTEM LABORATORY. Manual MRS AVN COLLEGE POLYTECHNIC VISAKHAPATNAM DEPARTMENT OF ELECTRICAL ELECTRONICS ENGINEERING PLC AUTOMATION SYSTEM LABORATORY Manual PLC Automation System Laboratory Lab 1 : Getting familiar with Step 7-

More information

Chapter. F0-04AD-2, 4-Channel Analog Voltage Input. In This Chapter...

Chapter. F0-04AD-2, 4-Channel Analog Voltage Input. In This Chapter... F0-0-, -hannel nalog Voltage Input hapter In This hapter... Module Specifications... Setting the Module Jumpers... onnecting and isconnecting the Field Wiring... Wiring iagram... Module Operation... Special

More information

MECH 1500 DIGITAL FUNDAMENTALS AND PROGRAMMABLE LOGIC CONTROLLERS CLASSWORK MANUAL

MECH 1500 DIGITAL FUNDAMENTALS AND PROGRAMMABLE LOGIC CONTROLLERS CLASSWORK MANUAL MH 1500 IGITL FUNMNTLS N PROGRMML LOGI ONTROLLRS LSSWORK MNUL Table of ontents: Subject Page hapter 1 dditional Questions.. 2 hapter 2 dditional Questions.. 3 hapter 3 dditional Questions.. 4 hapter 4

More information

Chapter. Maintenance and. Troubleshooting. In This Chapter...

Chapter. Maintenance and. Troubleshooting. In This Chapter... hapter Maintenance and Troubleshooting In This hapter... Hardware System Maintenance... iagnostics... PU Indicators... ommunications Problems... I/O Point Troubleshooting... Noise Troubleshooting... 0

More information

CISC 662 Graduate Computer Architecture. Classifying ISA. Lecture 3 - ISA Michela Taufer. In a CPU. From Source to Assembly Code

CISC 662 Graduate Computer Architecture. Classifying ISA. Lecture 3 - ISA Michela Taufer. In a CPU. From Source to Assembly Code IS 662 Graduate omputer rchitecture Lecture 3 - IS Michela Taufer lassifying IS Powerpoint Lecture Notes from John Hennessy and David Patterson s: omputer rchitecture, 4th edition ---- dditional teaching

More information

Standard Instructions Special Instructions High-Speed Instructions SIMATIC S7-200 Programmable Controller System Manual

Standard Instructions Special Instructions High-Speed Instructions SIMATIC S7-200 Programmable Controller System Manual Programming A PLC STEP 7-Micro/WIN32 is the program software used with the S7-2 PLC to create the PLC operating program. STEP 7 consists of a number of instructions that must be arranged in a logical order

More information

68HC11 PROGRAMMER'S MODEL

68HC11 PROGRAMMER'S MODEL 8H11 PROGRMMER'S MODEL s (,, and D) s and are general-purpose 8-bit accumulators used to hold operands and results of arithmetic calculations or data manipulations. Some instructions treat the combination

More information

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

UNIT-II. Part-2: CENTRAL PROCESSING UNIT Page1 UNIT-II Part-2: CENTRAL PROCESSING UNIT Stack Organization Instruction Formats Addressing Modes Data Transfer And Manipulation Program Control Reduced Instruction Set Computer (RISC) Introduction:

More information

1 B A B C D

1 B A B C D 0 2 L0 Error odes L0 Error ode E00 PU FTL ERROR E00 SOFTWRE TIME-OUT E0 PU TTERY LOW E0 WRITE FILE E OMMN E RM FILURE E2** I/O MOULE FILURE E202 MISSING I/O MOULE E20 POWER FULT E22 NEW I/O FG E22 I/O

More information

BASIC PLC PROGRAMMING

BASIC PLC PROGRAMMING Q. What are ladder diagrams and sequence listing? Ladder diagram: Ladder diagrams are the most commonly used diagrams for nonelectronic control circuits. They are sometimes called elementary diagrams or

More information

COSC 243. Instruction Sets And Addressing Modes. Lecture 7&8 Instruction Sets and Addressing Modes. COSC 243 (Computer Architecture)

COSC 243. Instruction Sets And Addressing Modes. Lecture 7&8 Instruction Sets and Addressing Modes. COSC 243 (Computer Architecture) COSC 243 Instruction Sets And Addressing Modes 1 Overview This Lecture Source Chapters 12 & 13 (10 th editition) Textbook uses x86 and ARM (we use 6502) Next 2 Lectures Assembly language programming 2

More information

Central Processing Unit

Central Processing Unit Central Processing Unit Networks and Embedded Software Module.. by Wolfgang Neff Components () lock diagram Execution Unit Control Unit Registers rithmetic logic unit DD, SU etc. NOT, ND etc. us Interface

More information

MECH 1500 Quiz 4 Review

MECH 1500 Quiz 4 Review Class: Date: MECH 1500 Quiz 4 Review True/False Indicate whether the statement is true or false. 1. For the timer relay contact shown, when the relay coil is energized, there is a time delay before the

More information

Topics. PLC Fundamentals Ladder Logic Fundamentals

Topics. PLC Fundamentals Ladder Logic Fundamentals PLC Fundamentals Ladder Logic Fundamentals MET 382 Controls & Instrumentation for Automation Spring 08 T.E. Kostek Topics PLC programming languages Anatomy of a ladder program Logic functions Logical continuity

More information

System Monitoring and Troubleshooting

System Monitoring and Troubleshooting 6 2 Troubleshooting Suggestions The Handheld programmer is useful for monitoring and troubleshooting your PLC and machine operation. There are several operations and features which help debug and isolate

More information

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram: The CPU and Memory How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram: 1 Registers A register is a permanent storage location within

More information

Microcomputer Architecture and Programming

Microcomputer Architecture and Programming IUST-EE (Chapter 1) Microcomputer Architecture and Programming 1 Outline Basic Blocks of Microcomputer Typical Microcomputer Architecture The Single-Chip Microprocessor Microprocessor vs. Microcontroller

More information

1 of 8. I. (13pts) TRUE OR FALSE

1 of 8. I. (13pts) TRUE OR FALSE Sample PLC Final Exam Name (1pt): By signing I agree to abide by the UWA policies governing academic integrity. I. (13pts) TRUE OR FALSE 1. The user memory segment stores information needed to execute

More information

Chapter. Operation. In This Chapter

Chapter. Operation. In This Chapter PU Specifications and Operation In This hapter hapter PU Overview....- PU Specifications....- Using attery ackup.... -0 PU Setup Information.... - PU Operation.... - I/O Response Time.... - PU Scan Time

More information

Accumulator and memory instructions 1. Loads, stores, and transfers 2. Arithmetic operations 3. Multiply and divide 4. Logical operations 5. Data test

Accumulator and memory instructions 1. Loads, stores, and transfers 2. Arithmetic operations 3. Multiply and divide 4. Logical operations 5. Data test HC11 Instruction Set Instruction classes 1. 2. 3. 4. Accumulator and Memory Stack and Index Register Condition Code Register Program control instructions 2 1 Accumulator and memory instructions 1. Loads,

More information

MICROPROCESSOR & MICROCONTROLLER

MICROPROCESSOR & MICROCONTROLLER a) From road north to East From road east to north From road south to west From road west to south From road west to north b) From road north to East From road south to west From road south to north From

More information

Abstraction of State Elements. Sequential Logic Implementation. Forms of Sequential Logic. Finite State Machine Representations

Abstraction of State Elements. Sequential Logic Implementation. Forms of Sequential Logic. Finite State Machine Representations Sequential ogic Implementation! Models for representing sequential circuits " Finite-state machines (Moore and Mealy) " epresentation of memory (states) " hanges in state (transitions)! Design procedure

More information

Digital IP Cell 8-bit Microcontroller PE80

Digital IP Cell 8-bit Microcontroller PE80 1. Description The is a Z80 compliant processor soft-macro - IP block that can be implemented in digital or mixed signal ASIC designs. The Z80 and its derivatives and clones make up one of the most commonly

More information

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller of 8085 microprocessor 8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor designed by Intel in 1977 using NMOS technology. It has the following configuration 8-bit

More information

CDN180 CCO SPECIFICATIONS

CDN180 CCO SPECIFICATIONS CDN180 CCO SPECIFICATIONS Revision 1.0 03/30/97 Table of Contents OVERVIEW 1 VIRTUAL PROCESSOR OBJECT (VPO) CLASS CODE: 80 (0X50) 2 VPO Class Attributes 2 VPO, Instance 1 Attributes 2 VPO Common Services

More information

Appendix. Numbering Systems. In This Appendix...

Appendix. Numbering Systems. In This Appendix... Numbering Systems ppendix In This ppendix... Introduction... inary Numbering System... exadecimal Numbering System... Octal Numbering System... inary oded ecimal () Numbering System... 5 Real (Floating

More information

Appendix. Numbering Systems. In this Appendix

Appendix. Numbering Systems. In this Appendix Numbering Systems ppendix n this ppendix ntroduction... inary Numbering System... exadecimal Numbering System... Octal Numbering System... inary oded ecimal () Numbering System... 5 Real (Floating Point)

More information

Chapter 3. Z80 Instructions & Assembly Language. Von Neumann Architecture. Memory. instructions. program. data

Chapter 3. Z80 Instructions & Assembly Language. Von Neumann Architecture. Memory. instructions. program. data Von Neumann Architecture The von Neumann architecture is a computer design model that uses a processing unit and a separate storage to hold both instructions and data To run a machine, program and data

More information

3.0 Instruction Set. 3.1 Overview

3.0 Instruction Set. 3.1 Overview 3.0 Instruction Set 3.1 Overview There are 16 different P8 instructions. Research on instruction set usage was the basis for instruction selection. Each instruction has at least two addressing modes, with

More information

Chapter. Getting Started. In this Chapter

Chapter. Getting Started. In this Chapter Getting Started hapter In this hapter Introduction... onventions Used... L0 Micro PL omponents... 4 Programming Methods... 4 I/O Selection Quick hart... Quick Start for PL heckout and Programming... Steps

More information

Chapter. F2-02DA-1, F2-02DA-1L 2-Channel Analog. Current Output. In This Chapter...

Chapter. F2-02DA-1, F2-02DA-1L 2-Channel Analog. Current Output. In This Chapter... F-0-, F-0-L -hannel nalog hapter urrent In This hapter... Module Specifications onnecting and isconnecting the Field Wiring Module Operation Writing the ontrol Program 0 Module Specifications - The F-0-

More information

Computer Architecture Programming the Basic Computer

Computer Architecture Programming the Basic Computer 4. The Execution of the EXCHANGE Instruction The EXCHANGE routine reads the operand from the effective address and places it in DR. The contents of DR and AC are interchanged in the third microinstruction.

More information

DL05 Error Codes. Appendix. In This Appendix... DL05 Error Codes...B 1

DL05 Error Codes. Appendix. In This Appendix... DL05 Error Codes...B 1 L0 Error odes ppendix In This ppendix... L0 Error odes... 1 ppendix : L0 Error odes E00 SOFTWRE TIME-OUT L0 Error ode escription E00 INVLI INSTRUTION E0 M TTERY LOW E WRITE FILE E11 OMMN E2 ONFIGURE I/O

More information

SECTION 5 PROGRAM CONTROL UNIT

SECTION 5 PROGRAM CONTROL UNIT SECTION 5 PROGRAM CONTROL UNIT MOTOROLA PROGRAM CONTROL UNIT 5-1 SECTION CONTENTS SECTION 5.1 PROGRAM CONTROL UNIT... 3 SECTION 5.2 OVERVIEW... 3 SECTION 5.3 PROGRAM CONTROL UNIT (PCU) ARCHITECTURE...

More information

Appendix. DL05 Error Codes. In This Appendix... Error Code Table...B 2

Appendix. DL05 Error Codes. In This Appendix... Error Code Table...B 2 L0 Error odes ppendix In This ppendix... Error ode Table... 2 ppendix : L20 Error odes E00 SOFTWRE TIME-OUT E0 L20 Error ode PU TTERY LOW E0 PROGRM MEMORY EXEEE E WRITE FILE E OMMN E RM FILURE E202 MISSING

More information

Chapter 7. Storage Components

Chapter 7. Storage Components 7. Storage Components 7- Chapter 7. Storage Components ntroduction Storage components store data and perform simple data transformations, such as counting and shifting. Registers, counters, register files,

More information

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital hardware modules that accomplish a specific information-processing task. Digital systems vary in

More information

Computer Architecture

Computer Architecture Computer Architecture Lecture 1: Digital logic circuits The digital computer is a digital system that performs various computational tasks. Digital computers use the binary number system, which has two

More information

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN 6.1. Instruction Codes The organization of a digital computer defined by: 1. The set of registers it contains and their function. 2. The set of instructions

More information

8051 Instruction Set

8051 Instruction Set 8051 Instruction Set 23-ug-16 ptkarule@rediffmail.com 1 Programmers Model of 8051 7FH 30H 2FH 20H 1FH 00H General Purpose Bit addressable Register Banks 1FH 18H 17H 10H 0FH 08H 07H 00H R7 R6 R5 R4 R3 R2

More information

MICROPROGRAMMED CONTROL

MICROPROGRAMMED CONTROL MICROPROGRAMMED CONTROL Hardwired Control Unit: When the control signals are generated by hardware using conventional logic design techniques, the control unit is said to be hardwired. Micro programmed

More information

Example of A Microprogrammed Computer

Example of A Microprogrammed Computer Example of A Microprogrammed omputer The purpose of this example is to demonstrate some of the concepts of microprogramming. We are going to create a simple 16-bit computer that uses three buses A, B,

More information

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples.

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples. MICROCONTROLLERS AND APPLICATIONS 1 Module 2 Module-2 Contents: Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples. MEMORY

More information

COMPUTER ORGANIZATION & ARCHITECTURE

COMPUTER ORGANIZATION & ARCHITECTURE COMPUTER ORGANIZATION & ARCHITECTURE Instructions Sets Architecture Lesson 5a 1 What are Instruction Sets The complete collection of instructions that are understood by a CPU Can be considered as a functional

More information

Assembly Language Programming of 8085

Assembly Language Programming of 8085 Assembly Language Programming of 8085 1. Introduction A microprocessor executes instructions given by the user Instructions should be in a language known to the microprocessor Microprocessor understands

More information

Chapter 7 Central Processor Unit (S08CPUV2)

Chapter 7 Central Processor Unit (S08CPUV2) Chapter 7 Central Processor Unit (S08CPUV2) 7.1 Introduction This section provides summary information about the registers, addressing modes, and instruction set of the CPU of the HCS08 Family. For a more

More information

Computer Architecture Prof. Mainak Chaudhuri Department of Computer Science & Engineering Indian Institute of Technology, Kanpur

Computer Architecture Prof. Mainak Chaudhuri Department of Computer Science & Engineering Indian Institute of Technology, Kanpur Computer Architecture Prof. Mainak Chaudhuri Department of Computer Science & Engineering Indian Institute of Technology, Kanpur Lecture - 7 Case study with MIPS-I So, we were discussing (Refer Time: 00:20),

More information

Instruction set of 8085

Instruction set of 8085 Instruction set of 05 /23/2016 ptkarule@rediffmail.com 1 Instruction set of 05 Instruction set is divided into various groups depending on the operations performed: 1. Data transfer 2. rithmetic 3. Logical

More information

Chapter. Maintenance and. Troubleshooting. In this Chapter

Chapter. Maintenance and. Troubleshooting. In this Chapter hapter Maintenance and Troubleshooting In this hapter Hardware System Maintenance... iagnostics... PU Indicators... ommunications Problems... I/O Point Troubleshooting... Noise Troubleshooting... Machine

More information

ECE485/585: Programmable Logic Controllers Exam #2 (sample style questions)

ECE485/585: Programmable Logic Controllers Exam #2 (sample style questions) ECE485/585: Programmable Logic Controllers Exam #2 (sample style questions) 1. A certain process is to count the number of true-to-false transitions on input I:0.0/0 for a 10 second period. Counting is

More information

Assembly Language Programming of 8085

Assembly Language Programming of 8085 Assembly Language Programming of 8085 Topics 1. Introduction 2. Programming model of 8085 3. Instruction set of 8085 4. Example Programs 5. Addressing modes of 8085 6. Instruction & Data Formats of 8085

More information

Digital System Design Using Verilog. - Processing Unit Design

Digital System Design Using Verilog. - Processing Unit Design Digital System Design Using Verilog - Processing Unit Design 1.1 CPU BASICS A typical CPU has three major components: (1) Register set, (2) Arithmetic logic unit (ALU), and (3) Control unit (CU) The register

More information

EC4205 Microprocessor and Microcontroller

EC4205 Microprocessor and Microcontroller 4205 icroprocessor and icrocontroller Webcast link: https://sites.google.com/a/bitmesra.ac.in/aminulislam/home ll announcement made through webpage: check back often Students are welcome outside the class

More information

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers o How to disassemble an MC9S12 instruction sequence o Binary numbers are a code and represent what the programmer intends for the

More information

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers o How to disassemble an MC9S12 instruction sequence o Binary numbers are a code and represent what the programmer intends for the

More information

2. Arithmetic Instructions addition, subtraction, multiplication, divison (HCS12 Core Users Guide, Sections 4.3.4, and ).

2. Arithmetic Instructions addition, subtraction, multiplication, divison (HCS12 Core Users Guide, Sections 4.3.4, and ). AS12 Assembler Directives A Summary of 9S12 instructions Disassembly of 9S12 op codes Huang Section 1.8, Chapter 2 MC9S12 V1.5 Core User Guide Version 1.2, Section 12 o A labels is a name assigned the

More information

Chapter Introduction Chapter 1. a) Address translation b) Protection c) Program relocation. type's "««"** ***** ** various

Chapter Introduction Chapter 1. a) Address translation b) Protection c) Program relocation. type's ««** ***** ** various 72 Introduction Chapter 1 a) Address translation b) Protection c) Program relocation Chapter 2 type's "««"** ***** ** various 1.17 Discuss the main features' of typical coprocessors. o ' rhc diffcrcncc

More information

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store.

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store. IT 3123 Hardware and Software Concepts February 11 and Memory II Copyright 2005 by Bob Brown The von Neumann Architecture 00 01 02 03 PC IR Control Unit Command Memory ALU 96 97 98 99 Notice: This session

More information

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

ASSEMBLY LANGUAGE MACHINE ORGANIZATION ASSEMBLY LANGUAGE MACHINE ORGANIZATION CHAPTER 3 1 Sub-topics The topic will cover: Microprocessor architecture CPU processing methods Pipelining Superscalar RISC Multiprocessing Instruction Cycle Instruction

More information

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers 1. Define microprocessors? UNIT-I A semiconductor device(integrated circuit) manufactured by using the LSI technique. It includes

More information

5-1 Instruction Codes

5-1 Instruction Codes Chapter 5: Lo ai Tawalbeh Basic Computer Organization and Design 5-1 Instruction Codes The Internal organization of a digital system is defined by the sequence of microoperations it performs on data stored

More information

CS401 - Computer Architecture and Assembly Language Programming Glossary By

CS401 - Computer Architecture and Assembly Language Programming Glossary By CS401 - Computer Architecture and Assembly Language Programming Glossary By absolute address : A virtual (not physical) address within the process address space that is computed as an absolute number.

More information

(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples.

(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples. (1) Explain instruction format and Opcode format of 8085 μp with example. OR With help of examples, explain the formation of opcodes of 8085 OR What is an instruction? List type of instruction based on

More information

8051 Microcontroller Interrupts

8051 Microcontroller Interrupts 8051 Microcontroller Interrupts There are five interrupt sources for the 8051, which means that they can recognize 5 different events that can interrupt regular program execution. Each interrupt can be

More information

Any offsets needing less or more than 1 hr will need special programming (call our tech support). Entering Mode Programming. Exiting Programming

Any offsets needing less or more than 1 hr will need special programming (call our tech support). Entering Mode Programming. Exiting Programming Adjusting Time Zone Clocks The basic mode for adjusting a time zone clock are primarily: The basic mode for adjusting a time zone clock are primarily: 21, 24 and 51-1 (51-1 is for Alpha Characters) Mode

More information

Mechanism of absolute rotary encoder. Rotary Encoders

Mechanism of absolute rotary encoder. Rotary Encoders Mechanism of absolute rotary encoder Rotary Encoders 40 Mechanism of absolute rotary encoder Rotary Encoders Gray to binary conversion by PLC etween TRD-N and D4-450,440/D2-250,240 Gray to binary conversion

More information

csitnepal Unit 3 Basic Computer Organization and Design

csitnepal Unit 3 Basic Computer Organization and Design Unit 3 Basic Computer Organization and Design Introduction We introduce here a basic computer whose operation can be specified by the resister transfer statements. Internal organization of the computer

More information

Register Transfer and Micro-operations

Register Transfer and Micro-operations Register Transfer Language Register Transfer Bus Memory Transfer Micro-operations Some Application of Logic Micro Operations Register Transfer and Micro-operations Learning Objectives After reading this

More information

A microcomputer system for mass spectrometer control and data acquisition

A microcomputer system for mass spectrometer control and data acquisition Proc. Indian Acad. Sci. (Chem. Sci.), Vol. 93, No. 2, March 1984, plx 189-193. 9 Printed in India. A microcomputer system for mass spectrometer control and data acquisition P G OZA, H S MAZUMDAR, A K CHOUDHARY

More information

PROGRAM CONTROL UNIT (PCU)

PROGRAM CONTROL UNIT (PCU) nc. SECTION 5 PROGRAM CONTROL UNIT (PCU) MOTOROLA PROGRAM CONTROL UNIT (PCU) 5-1 nc. SECTION CONTENTS 5.1 INTRODUCTION........................................ 5-3 5.2 PROGRAM COUNTER (PC)...............................

More information

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 11 Instruction Sets: Addressing Modes and Formats

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 11 Instruction Sets: Addressing Modes and Formats William Stallings Computer Organization and Architecture 8 th Edition Chapter 11 Instruction Sets: Addressing Modes and Formats Addressing Modes Immediate Direct Indirect Register Register Indirect Displacement

More information

Chapter 6 Basic Function Instruction

Chapter 6 Basic Function Instruction Chapter 6 Basic Function Instruction T 6-2 C 6-5 SET 6-8 RST 6- : MC 6-2 : MCE 6-4 2: SKP 6-5 3: SKPE 6-7 4: DIFU 6-8 5: DIFD 6-9 6: BSHF 6-2 7: UDCTR 6-2 8: MOV 6-23 9: MOV/ 6-24 : TOGG 6-25 : (+) 6-26

More information

Microcontroller & Interfacing

Microcontroller & Interfacing Course Title Course Code Microcontroller & Interfacing EC406 Lecture : 3 Course Credit Practical : 1 Tutorial : 0 Total : 4 Course Objective At the end of the course the students will be able to Understand

More information

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller. UNIT V -8051 MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS 1. What is micro controller? Micro controller is a microprocessor with limited number of RAM, ROM, I/O ports and timer on a single chip

More information

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 2

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 2 UNIT 22: PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 2 This work covers part of outcome 3 of the Edexcel standard module: Outcome 3 is the most demanding

More information

System Monitoring and Troubleshooting

System Monitoring and Troubleshooting Troubleshooting Suggestions The Handheld is very useful in troubleshooting your machine. As with any problem, you have to find it before you can fix it. There are several operations and features that help

More information

8051 Overview and Instruction Set

8051 Overview and Instruction Set 8051 Overview and Instruction Set Curtis A. Nelson Engr 355 1 Microprocessors vs. Microcontrollers Microprocessors are single-chip CPUs used in microcomputers Microcontrollers and microprocessors are different

More information

Projects. In This Chapter

Projects. In This Chapter Managing hapter Projects In This hapter Get Started Using irectsoft... - reate a New Project.... - Importing Projects... -5 opy or Save Existing irectsoft Files.... - 5 hapter : Managing Projects Get Started

More information

When an instruction is initially read from memory it goes to the Instruction register.

When an instruction is initially read from memory it goes to the Instruction register. CS 320 Ch. 12 Instruction Sets Computer instructions are written in mnemonics. Mnemonics typically have a 1 to 1 correspondence between a mnemonic and the machine code. Mnemonics are the assembly language

More information

Instruction Set Instruction set of 8085 can be classified in following groups: Data Transfer Instructions These instructions can perform data transfer operations between Registers of 8085 e.g. MOV 8085

More information

Practical Malware Analysis

Practical Malware Analysis Practical Malware Analysis Ch 4: A Crash Course in x86 Disassembly Revised 1-16-7 Basic Techniques Basic static analysis Looks at malware from the outside Basic dynamic analysis Only shows you how the

More information

PLC Programming. Ladder Diagrams

PLC Programming. Ladder Diagrams Ladder Diagrams Consider the diagram below showing a circuit for switching an electric motor on or off. We can redraw this diagram in a different way, using two vertical lines to represent the input power

More information

Chapter 3 : Control Unit

Chapter 3 : Control Unit 3.1 Control Memory Chapter 3 Control Unit The function of the control unit in a digital computer is to initiate sequences of microoperations. When the control signals are generated by hardware using conventional

More information

STRUCTURE OF DESKTOP COMPUTERS

STRUCTURE OF DESKTOP COMPUTERS Page no: 1 UNIT 1 STRUCTURE OF DESKTOP COMPUTERS The desktop computers are the computers which are usually found on a home or office desk. They consist of processing unit, storage unit, visual display

More information

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60 M. Sc (CS) (II Semester) Examination, 2012-13 Subject: Computer System Architecture Paper Code: M.Sc-CS-203 Time: Three Hours] [Maximum Marks: 60 Note: Question Number 1 is compulsory. Answer any four

More information

Entering RLL Programs

Entering RLL Programs Simple Ladder Programs Purpose of the Examples Handheld Key Sequences The Basics This section includes many examples that are intended to help you become familiar with the keystrokes required to enter

More information