1、In PLCs there are elements that are used to hold data, that is, bits, and behave like relays,being able to be switched on or off and to switch other devices on or off. Hence the term internal relay. Such internal relays do not exist as real-world switching devices but are merely bits in the storage
2、memory that behave in the same way as relays. For programming, they can be treated in the same way as an external relay output and input. Thus inputs to external switches can be used to give an output from an internal relay. This then results in the internal relay contacts being used, in conjunction
3、 with other external input switches, to give an output, such as activating a motor. Thus we might have (Figure 7.1)On one rung of the program: Inputs to external inputs activate the internal relay output.On a later rung of the program: As a consequence of the internal relay output, internal relay co
4、ntacts are activated and so control some output.In using an internal relay, it has to be activated on one rung of a program and then its output used to operate switching contacts on another rung, or rungs, of the program. Internal relays can be programmed with as many sets of associated contacts as
5、desired.To distinguish internal relay outputs from external relay outputs, they are given different types of addresses. Different manufacturers tend to use different terms for internal relays and have different ways of expressing their addresses. For example, Mitsubishi uses the term auxiliary relay
6、 or marker and the notation M100, M101, and so on. Siemens uses the term flag and the notation F0.0, F0.1, and so on. Telemecanique uses the term bit and the notation B0, B1, and so on. Toshiba uses the term internal relay and the notation R000, R001, and so on. Allen-Bradley uses the term bit stora
7、ge and notation in the PLC-5 of the form B3/001,B3/002, and so on.7.2 Ladder ProgramsWith ladder programs, an internal relay output is represented using the symbol for an output device, namely , with an address that indicates that it is an internal relay. Thus, with a Mitsubishi PLC, we might have t
8、he address M100, the M indicating that it is an internal relay or marker rather than an external device. The internal relay switching contacts are designated with the symbol for an input device, namely , and given the same address as the internal relay output, such as M100.7.2.1 Programs with Multip
9、le Input ConditionsAs an illustration of the use that can be made of internal relays, consider the following situation. A system is to be activated when two different sets of input conditions are realized.We might just program this as an AND logic gate system; however, if a number of inputs have to
10、be checked in order that each of the input conditions can be realized, it may be simpler to use an internal relay. The first input conditions then are used to give an output to an internal relay. This relay has associated contacts that then become part of the input conditions with the second inputFi
11、gure 7.2 shows a ladder program for such a task. For the first rung, when input In 1 or input In 3 is closed and input In 2 closed, internal relay IR 1 is activated. This results in the contacts for IR 1 closing. If input In 4 is then activated, there is an output from output Out 1. Such a task migh
12、t be involved in the automatic lifting of a barrier when someone approaches from either side. Input In 1 and input In 3 are inputs from photoelectric sensors that detect the presence of a personapproaching or leaving from either side of the barrier, input In 1 being activated from one side of it and
13、 input In 3 from the other. Input In 2 is an enabling switch to enable the system to be closed down. Thus when input In 1 or input In 3, and input In 2, are activated, there is an output from internal relay 1. This will close the internal relay contacts. If input In 4, perhaps a limit switch,detects
14、 that the barrier is closed, then it is activated and closes. The result is then an output fromOut 1, a motor that lifts the barrier. If the limit switch detects that the barrier is already open, the person having passed through it, then it opens and so output Out 1 is no longer energized and a coun
15、terweight might then close the barrier. The internal relay has enabled two parts of the program to be linked, one part being the detection of the presence of a person and the second part the detection of whether the barrier is already up or down. Figure 7.3a shows how Figure 7.2 would appear in Mits
16、ubishi notation and Figure 7.3b shows how it would appear in Siemens notation.Figure 7.4 is another example of a ladder program involving internal relays. Output 1 is controlled by two input arrangements. The first rung shows the internal relay IR 1, which isenergized if input In 1 or In 2 is activa
17、ted and closed. The second rung shows internal relay IR 2, which is energized if inputs In 3 and In 4 are both energized. The third rung shows that output Out 1 is energized if internal relay IR 1 or IR 2 is activated. Thus there is an output from the system if either of two sets of input conditions
18、 is realized.7.2.2 Latching ProgramsAnother use of internal relays is for resetting a latch circuit. Figure 7.5 shows an example of such a ladder program.When the input In 1 contacts are momentarily closed, there is an output at Out 1. This closes the contacts for Out 1 and so maintains the output,
19、even when input In 1 opens. When input In 2 is closed, the internal relay IR 1 is energized and so opens the IR 1 contacts, which are normally closed. Thus the output Out 1 is switched off and so the output is unlatched.Consider a situation requiring latch circuits where there is an automatic machin
20、e that can be started or stopped using push-button switches. A latch circuit is used to start and stop the power being applied to the machine. The machine has several outputs that can be turned on if the power has been turned on and are off if the power is off. It would be possible to devise a ladde
21、r diagram that has individually latched controls for each such output. However, a simpler method is to use an internal relay. Figure 7.6 shows such a ladder diagram. The first rung has the latch for keeping the internal relay IR 1 on when the start switch gives a momentary input. The second rung wil
22、l then switch the power on. The third rung will also switch on and give output Out 2 if the input 2 contacts are closed. The third rung will also switch on and give output Out 3 if the input 3 contacts are closed. Thus all the outputs can be switched on when the start push button is activated. All t
23、he outputs will be switched off if the stop switch is opened. Thus all the outputs are latched by IR 1.7.2.3 Response TimeThe time taken between an input occurring and an output changing depends on such factors as the electrical response time of the input circuit, the mechanical response of the outp
24、utdevice, and the scan time of the program. A ladder program is read from left to right and from top to bottom. Thus if an output device, such as an internal relay, is set in one scan cycle and the output has to be fed back to earlier in the program, it will require a second scan of the program befo
25、re it can be activated. Figure 7.7 illustrates this concept.7.3 Battery-Backed RelaysIf the power supply is cut off from a PLC while it is being used, all the output relays and internal relays will be turned off. Thus when the power is restored, all the contacts associated with those relays will be
26、set differently from when the power was on. Therefore, if the PLC was in the middle of some sequence of control actions, it would resume at a different point in the sequence. To overcome this problem, some internal relays have battery backup so that they can be used in circuits to ensure a safe shut
27、down of a plant in the event of a power failure and so enable it to restart in an appropriate manner. Such battery-backed relays retain their state of activation, even when the power supply is off. The relay is said to have been made retentive.The term retentive memory coil is frequently used for su
28、ch elements. Figure 7.8a shows the IEC 1131-3 standard symbol for such elements. With Mitsubishi PLCs, battery-backed internal relay circuits use M300 to M377 as addresses for such relays. Other manufacturers use different addresses and methods of achieving retentive memory. The Allen-Bradley PLC-5
29、uses latch and unlatch rungs. If the relay is latched, it remains latched if power is lost and is unlatched when the unlatch relay is activated. (See Section 7.5 for a discussion of such relays in the context of set and reset coils.)As an example of the use of such a relay, Figure 7.8b shows a ladde
30、r diagram for a system designed to cope with a power failure. IR 1 is a battery-backed internal relay. When input In 1 contacts close, output IR 1 is energized. This closes the IR 1 contacts, latching so that IR 1 remains on even if input In 1 opens. The result is an output from Out 1. If there is a power failure, IR 1 still remains energized and so the IR 1 contacts remain closed and there is an output from Out 1.7.4 One-Shot OperationOne of the functions provided by some PLC manufacturers is the ability to program an internal relay so that its con
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1