L-14 PLC_3

May 27, 2018 | Author: S M Jawad Fakhir | Category: Bit, Input/Output, Instruction Set, Integer (Computer Science), Data Type


Comments



Description

which includes the memory area identifier. and the bit number. the byte address. . To access a bit in a memory area. you specify the address. .              Process-Image Input Register: I Process-Image Output Register: Q Variable Memory Area: V Bit Memory Area: M Timer Memory Area: T Counter Memory Area: C High-Speed Counters: HC Accumulators: AC Special Memory: SM Local Memory Area: L Analog Inputs: AI Analog Outputs: AQ Sequence Control Relay (SCR) Memory Area: S . bytes.  The S7-200 samples the physical input points at the beginning of each scan cycle and writes these values to the process-image input register. You can access the process-image input register in bits. or double words: . words.   At the end of the scan cycle. You can access the process-image output register in bits. bytes. the S7-200 copies the values stored in the processimage output register to the physical output points. words. or double words: . words. bytes. or double words: .  You can use V memory to store intermediate results of operations being performed by the control logic in your program. You can also use V memory to store other data pertaining to your process or task. You can access the V memory area in bits. You can access the bit memory area in bits. or double words .  You can use the bit memory area (M memory) as control relays to store the intermediate status of an operation or other control information. bytes. words. Two variables are associated with a timer: Current value: this 16-bit signed integer stores the amount of time counted by the timer.   The S7-200 provides timers that count increments of time in resolutions (time-base increments) of 1 ms. The preset value is entered as part of the timer instruction. 10 ms. Timer bit: this bit is set or cleared as a result of comparing the current and the preset value. or 100 ms. . . Two variables are associated with a counter: Current value: this 16-bit signed integer stores the accumulated count. Counter bit: this bit is set or cleared as a result of comparing the current and the preset value. one type counts down only. and one type counts both up and down.   The S7-200 provides three types of counters that count each low-to-high transition event on the counter input(s): one type counts up only. The preset value is entered as part of the counter instruction. 32-bit integer counting value (or current value). The current value of the high-speed counter is a read-only value and can be addressed only as a double word (32 bits). Highspeed counters have a signed. .  The high-speed counters count high-speed events independent of the CPU scan. For example. and AC3). you can use accumulators to pass parameters to and from subroutines and to store intermediate values used in a calculation. The S7200 provides four 32-bit accumulators (AC0. The accumulators are read/write devices that can be used like memory. AC1. AC2. . . You can use these bits to select and control some of the special functions of the S7-200 CPU. a bit that toggles at a fixed rate.  The SM bits provide a means for communicating information between the CPU and your program. or a bit that shows the status of math or operational instructions. such as: a bit that turns on for the first scan cycle. size of the data (W). or 4). Analog input values are read-only values. you access them with even-number byte addresses (such as AIW0.  The S7-200 converts an analog value (such as temperature or voltage) into a word-length (16-bit) digital value. 2. . and the starting byte address. AIW2. Since analog inputs are words and always start on even-number bytes (such as 0. You access these values by the area identifier (AI). or AIW4). .     The S7-200 converts a word-length (16-bit) digital value into a current or voltage. 2. or 4). You write these values by the area identifier (AQ). Analog output values are write-only values. you write them with even-number byte addresses (such as AQW0. or AQW4). AQW2. proportional to the digital value (such as for a current or voltage). and the starting byte address. Since analog outputs are words and always start on even-number bytes (such as 0. size of the data (W).    SCRs or S bits are used to organize machine operations or steps into equivalent program segments. SCRs allow logical segmentation of the control program. You can access the S bits as bits, bytes, words, or double words. S7-200 Instruction Set . it updates immediately. AN. ON) obtain the referenced value from the memory or from the process-image register. it changes the value on the top of the stack from 0 to 1 or from1 to 0). The standard contact instructions obtain the referenced value from the memory (or process-image register if the data type is I or Q). Immediate Contacts: An immediate contact does not rely on the S7-200 scan cycle to update.      Standard contact: The Normally Open contact instructions (LD. and O) and Normally Closed contact instructions (LDN. . NOT Instruction: The Not instruction (NOT) changes the state of power flow input (that is. The Normally Open Immediate contact is closed (on) when the physical input point (bit) is 1. A. and the Normally Closed Immediate contact is closed (on) when the physical input point (bit) is 0. Positive and Negative Transition Instructions: The Positive Transition contact instruction (EU) allows power to flow for one scan for each offto-on transition. . You can set or reset from 1 to 128 points immediately . The Set (S) and Reset (R) instructions set (turn on) or reset (turn off) the specified number of points (N). You can set or reset from 1 to 255 points. starting at the specified address (Bit). Immediate and Reset Immediate instructions immediately set (turn on) or immediately reset (turn off) the number of points (N). When the Output instruction is executed.  Output Immediate:  Set and Reset:  Set Immediate and Reset Immediate: The Set The Output Immediate instruction (=I) writes the new value to both the physical output and the corresponding processimage register location when the instruction is executed.  Output: The Output instruction (=) writes the new value for the output bit to the process-image register. the S7-200 turns the output bit in the process-image register on or off. starting at specified address (Bit). . . . . If the set (S) and reset (R1) signals are both true. the output (OUT) is false.  The Set Dominant Bistable is a latch where the set dominates. If the set (S1) and reset (R) signals are both true. the output (OUT) is true. . The Reset Dominant Bistable is a latch where the reset dominates. . An off-delay timer will turn on immediately when a line of ladder logic is true. that is an off delay. If you turn the key in the ignition and the car does not start immediately. Consider the example of an old car. An on-delay timer can be used to allow an oven to reach temperature before starting production. If you turn the key to stop the engine but the engine doesn’t stop for a few seconds. but it will delay before turning off. A nonretentive timer will start timing the delay from zero each time .       An on-delay timer will wait for a set time after a line of ladder logic has been true before turning on. even if the timer never finished. An off delay timer can keep cooling fans on for a set time after the oven has been turned off. A retentive timer will sum all of the on or off time for a timer. that is an on-delay. but it will turn off immediately. The SIMATIC timers are available in three resolutions: 1 ms. 10 ms. and 100 ms. . . . .  Comparing Numerical Values The compare instructions are used to compare two values . . .    The Count Down instruction (CTD) counts down from the current value of that counter each time the count down (CD) input makes the transition from off to on. and the counter bit Cxx turns on. The counter resets the counter bit Cxx and loads the current value with the preset value PV when the load input LD turns on. The counter stops upon reaching zero. When the current value Cxx is equal to 0. the counter bit Cxx turns on. . . . . . . . . . X1 – Proximity Sensor to sense upper part of the Bottle i.e.e.   Detecting the standing bottles on the conveyor and pushing falling bottles in tray X0 – Proximity Sensor to sense bottom of the Bottle i. X1 = ON when the detected input signal from the bottle-neck is sheltered. X0 = ON when the detected input signal from the bottle-bottom is sheltered. the ignition power must not be applied. When the car door is open. and the seatbelt is not done up. If all is safe then the key will start the engine. .  Problem: Develop Ladder Logic for a car door/seat belt safety system. . .  Problem: Design a motor controller that has a forward and a reverse button. When both buttons are pushed the motor will not work. The motor forward and reverse outputs will only be on when one of the buttons is pushed. . Push button B will reset the counters . Develop the ladder logic that will turn on a light. after switch A has been closed 10 times.  Develop the ladder logic that will turn on an output (light). 15 seconds after switch (A) has been turned on. . . after a switch (A) has been closed 10 times. Push button (B) will reset the counters. Develop the ladder logic that will turn on a output (light). output C. will be turned on. As parts leave they will activate input B. If the number of parts is less than 8 then a conveyor motor. . As parts arrive they activate input A. Write a ladder logic program that will count the number of parts in a buffer.  Write a simple program that will use one timer to flash a light. The light should be on for 1. .5 seconds.0 seconds and off for 0. . After that it will be off for two seconds. After that the light will not turn on again until the input A is turned off. and then again on for 5 seconds. When an input A is turned on a light will be on for 10 seconds.   Write a program that only uses one timer. . second flowers and third trees.0) starts to work when either temperature sensor(I0.1) send a signal to it.1) fro 4 second (it is assumed very small for simplicity) and then flowers will be water (water the flowers Q0.each section is separated and here the order to water this garden is given: First grass. Since it is required to avoid pressure drop in the water line . In this scenario grass will be water first (water the grass Q0.2) for 10 second and at last trees will be watered (water the trees Q0. .Here the water sprinkler system (Q0.0) or humidity sensor (I0.3) for 18 seconds. In this example. the load cell is converting a value of weight from 0 to 500 pounds into a 0 .10 VDC load cell output is connected to the input of an S7-200 PLC analog expansion module. For instance.10 VDC output. In the following example. the actual weight can be compared to a desired weight for a package or group of packages. The 0 . A load cell is a device that generates an electrical output proportional to the force applied. . a scale is connected to a load cell. The analog value applied to the PLC can be used in various ways. As packages move along the conveyor they are weighed. A package that weighs at or greater than a specified value is routed along one conveyor path. . This example can be expanded to include a conveyor system with a gate to direct packages of varying weight. All of this functionality can be controlled by an S7-200 PLC. A package that weighs less than a specified value is routed along another conveyor path. where it will later be inspected for missing contents. the system can not run even if there is a box on conveyor. The light on the start box indicates that the system is active whereas UP and Down lights indicate that the stamp is UP and DOWN position respectively. the stamp goes up and conveyor moves again to the other end of the conveyor. Upon reaching the mid point of the conveyor (on LS2) the conveyor motor stops. When this process is finished.        An automatic stamp system shown in Figure 2 works as follows: When start switch is turned on. Develop a LAD to control the stamp system. the motor stops. When the operator puts a box at the beginning of the conveyor (on LS1) the motor runs and conveyor moves. . Then the stamp comes down and puts the stamp on the box. After box reaches to end of the conveyor (on LS3). If start switch is turned off. The system waits for the box to get and the another box to be placed at the beginning of the conveyor. system gets ready to run. . After 5 seconds Conveyor Belt-2 will be active. Conveyor Belt-1 will stop. Conveyor Belt-1 will begin to run. After the whole system runs for 15 seconds. Also the system can be reset by the emergency-stop button at any time.The system to be controlled by PLC consists of two belts. too. If the Start button is pressed.Construct a LAD for S7-200 PLC to control the system . Then Conveyor Belt-2 continues to move for 5 seconds and then it will stop. The sensor S1 and S2 are used to count the car at the entrance and exit. The gate arm is controlled by activating/deactivating the gate solenoid (GS). The arm stays closed until one or more parking space is available in the lot. If the number of the cars reaches to 100. . red light is lit and the gate arm is closed. The parking lot which has a capacity of 100 cars is to be controlled by a PLC system.
Copyright © 2024 DOKUMEN.SITE Inc.