A moving assembly line for vehicles conveys two different types of cars: blue La
ID: 2080248 • Letter: A
Question
A moving assembly line for vehicles conveys two different types of cars: blue Lada (B) and yellow Corvettes (Y). They go down the line sequenced B-B-Y-B-B-Y-B-B and so on but need to be sorted for shipping. Notice that before a yellow car, there is a separation of 2 minutes. Just before the sorter, there is a vision sensor (V) that detects the type of car that is coming down the line. This sensor fires exactly every 60 seconds, which is the time needed for the next vehicle to reach that inspection point. However, the sensor needs to wait for 2 minutes every time a yellow vehicle is approaching, otherwise, a false (no car) reading will shut down the system. Once the sensor detects the type of vehicle, the motor (M) will route the cars to the appropriate conveyor. Develop a PLC ladder logic diagram that performs this behavior. You may use additional inputs/outputs beyond what is given in the problem but please explain what they are. Clearly state any assumptions you may need to make.
Explanation / Answer
9. LATCHES, TIMERS, COUNTERS AND MORE 9.1 INTRODUCTION More complex systems cannot be controlled with combinatorial logic alone. The main reason for this is that we cannot, or choose not to add sensors to detect all conditions. In these cases we can use events to estimate the condition of the system. Typical events used by a PLC include; first scan of the PLC - indicating the PLC has just been turned on time since an input turned on/off - a delay count of events - to wait until set number of events have occurred latch on or unlatch - to lock something on or turn it off The common theme for all of these events is that they are based upon one of two questions "How many?" or "How long?". An example of an event based device is shown in Figure 9.1. The input to the device is a push button. When the push button is pushed the input to the device turns on. If the push button is then released and the device turns off, it is a logical device. If when the push button is release the device stays on, is will be one type of event based device. To reiterate, the device is event based if it can respond to one or more things that have happened before. If the device responds only one way to the immediate set of inputs, it is logical. Topics: Objectives: • Understand latches, timers, counters and MCRs. • To be able to select simple internal memory bits. • Latches, timers, counters and MCRs • Design examples • Internal memory locations are available, and act like outputs plc timers - 9.2 Figure 9.1 An Event Driven Device 9.2 LATCHES A latch is like a sticky switch - when pushed it will turn on, but stick in place, it must be pulled to release it and turn it off. A latch in ladder logic uses one instruction to latch, and a second instruction to unlatch, as shown in Figure 9.2. The output with an L inside will turn the output D on when the input A becomes true. D will stay on even if A turns off. Output D will turn off if input B becomes true and the output with a U inside becomes true (Note: this will seem a little backwards at first). If an output has been latched on, it will keep its value, even if the power has been turned off. Figure 9.2 A Ladder Logic Latch e.g. A Start Push Button +V Push Button Device Push Button Device Device (Logical Response) (Event Response) On/Off time A D A C B D L U plc timers - 9.3 The operation of the ladder logic in Figure 9.2 is illustrated with a timing diagram in Figure 9.3. A timing diagram shows values of inputs and outputs over time. For example the value of input A starts low (false) and becomes high (true) for a short while, and then goes low again. Here when input A turns on both the outputs turn on. There is a slight delay between the change in inputs and the resulting changes in outputs, due to the program scan time. Here the dashed lines represent the output scan, sanity check and input scan (assuming they are very short.) The space between the dashed lines is the ladder logic scan. Consider that when A turns on initially it is not detected until the first dashed line. There is then a delay to the next dashed line while the ladder is scanned, and then the output at the next dashed line. When A eventually turns off, the normal output C turns off, but the latched output D stays on. Input B will unlatch the output D. Input B turns on twice, but the first time it is on is not long enough to be detected by an input scan, so it is ignored. The second time it is on it unlatches output D and output D turns off. A B C D event too short to be noticed (aliasing) These lines indicate PLC input/output refresh times. At this time all of the outputs are updated, and all of the inputs are read. The space between the lines is the scan time for the ladder logic. The spaces may vary if different parts of the ladder diagram are executed each time through the ladder (as with state space code). Notice that some inputs can be ignored if at the wrong time, and there can be a delay between a change in input, and a change in output. Timing Diagram The space is a function of the speed of the PLC, and the number of Ladder logic elements in the program. plc timers - 9.4 Figure 9.3 A Timing Diagram for the Ladder Logic in Figure 9.2 The timing diagram shown in Figure 9.3 has more details than are normal in a timing diagram as shown in Figure 9.4. The brief pulse would not normally be wanted, and would be designed out of a system either by extending the length of the pulse, or decreasing the scan time. An ideal system would run so fast that aliasing would not be possible. Figure 9.4 A Typical Timing Diagram A more elaborate example of latches is shown in Figure 9.5. In this example the addresses are for an Allen-Bradley Micrologix controller. The inputs begin with I/, followed by an input number. The outputs begin with O/, followed by an output number. A B C D plc timers - 9.5 Figure 9.5 A Latch Example A normal output should only appear once in ladder logic, but latch and unlatch instructions may appear multiple times. In Figure 9.5 a normal output O/2 is repeated twice. When the program runs it will examine the fourth line and change the value of O/2 in memory (remember the output scan does not occur until the ladder scan is done.) The last line is then interpreted and it overwrites the value of O/2. Basically, only the last line will change O/2. Latches are not used universally by all PLC vendors, others such as Siemens use I/0 I/1 I/0 I/0 I/1 O/0 O/1 O/1 O/2 O/2 L U I/0 I/1 O/0 O/1 O/2 plc timers - 9.6 flip-flops. These have a similar behavior to latches, but a different notation as illustrated in Figure 9.6. Here the flip-flop is an output block that is connected to two different logic rungs. The first rung shown has an input A connected to the S setting terminal. When A goes true the output value Q will go true. The second rung has an input B connected to the R resetting terminal. When B goes true the output value Q will be turned off. The output Q will always be the inverse of Q. Notice that the S and R values are equivalent to the L and U values from earlier examples. Figure 9.6 Flip-Flops for Latching Values
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.