Programmable Logic Controllers. Su Chen Jonathon Lin
Чтение книги онлайн.
Читать онлайн книгу Programmable Logic Controllers - Su Chen Jonathon Lin страница 21
4.1.3Output Devices
The actuation of output devices is normally controlled by whether the electrical power is present. After applying electrical power to an output device, the device is called energized. Removing power from it, it is de-energized. In binary logic, being energized is represented by a binary “1,” de-energized is binary “0.” Table 4.3 gives examples of binary logic for output devices.
Figure 4.2: Negative (normally closed) logic elements
Table 4.2: Negative (NC) input logic elements
Element | Binary “1” logic (in normal state) | Binary “0” logic (in actuated state) |
---|---|---|
Limit switch (NC) | ||
Pressure switch (NC) | ||
Temperature switch (NC) | ||
Liquid level switch (NC) | ||
Photodetector (NC) | ||
Push button (NC) | ||
Relay contact (NC) |
4.2 Three Basic Logic Operations
There are three basic logic operations used in digital logic design: AND, OR, and NOT. Each of these operations has established rules that determine the outcome of the event based on certain conditions. The outcome of a logic operation is normally referred to as the output and the given conditions are called inputs.
4.2.1The AND function
Logically, the AND function is true (“1”) if and only if all of the inputs are true (“1”). There can be any number of inputs, but the resulting output (“1”) still requires that all of the inputs have values equal to true (“1”). The graphical symbol of an AND function is shown in Figure 4.3. The graphic symbol is called an AND gate.
Table 4.3: Binary logics for output elements
Figure 4.3: AND gate
Tables listing all possible input and output values are called true tables. The number of outcomes (or input combinations) in a true table is determined by the number of inputs and can be calculated as 2n, where n is the number of inputs. A logic gate with two inputs has a total of 4 (or 22) input combinations. A three-input logic gate has 8 (or 23) input combinations. Figure 4.4 shows the true tables for 2-input and 3-input AND gate.
Figure 4.4: True tables for 2-input and 3-input AND gate
A 2-input AND gate can be used to represent a simple safety circuit for a hydraulic punch press (Figure 4.5). This simple circuit consists of two push buttons that are wired in series and one solenoid output. Both push buttons must be actuated simultaneously to energize the solenoid for dropping the punch ram. The AND logic representation of this 2-input safety circuit is displayed in Figure 4.6.
Figure 4.5: A safety circuit using AND function
Figure 4.6: AND gate for 2-input safety circuit
4.2.2The OR Function
Logically, the OR output will be true (“1”) if any one of the inputs has true (“1”) value. Again, there is no limitation on the number of inputs. The graphical symbol and true table for a 2-input OR gate is shown in Figure 4.7.
Figure 4.7: 2-input OR gate
The OR function can be regarded as the parallel function, as shown in Figure 4.8. A car horn on a steering wheel is an example of using the OR function in which two push buttons are wired in parallel to control the horn. The horn can be activated by pressing either one of two push buttons. The OR logic representation of this 2-input car horn circuit is listed in Figure 4.9.
Figure 4.8: A car-horn circuit using the OR function