• No results found

Inputs and outputs

In document Electrical Technology Grade 12 (Page 154-157)

As was mentioned earlier, each rung is connected between two power rails (live and neutral), so for current to flow through the circuit and activate the output field device, there must be a continuous link from live to neutral. If the link is broken, the output field device will stop operating. Let us consider the following circuits.

Figure 6.9 (a) shows the connection of a lamp through an open contact. When the switch is closed, the contact (X0) is closed and the coil (Q0) will be activated and therefore switch the lamp on. Figure 6.9 (b) shows the lamp connected through a closed contact keeping the lamp on. The lamp will only switch off when the switch is activated, thus opening the contact (X1) and de-energising the coil (Q1).

Figure 6.9 (a): NO contact to switch Figure 6.9 (b): NC contact to switch one output one output

From figures 6.9 (a) & (b), it is evident that X0 & X1 represent the inputs (contacts) and Q0 & Q1 represent the outputs (coils). Remember, ladder diagrams can have more than one input to activate one output. On the next page is an example of a ladder diagram with two input contacts in series, activating one output coil that in turn could switch a lamp or motor on. In this example, the lamp/motor will only be activated (switched on) when both the input contacts X0 & X1 are closed, therefore energising the coil (Q1) allowing the lamp/motor to be switched on.

Take note the PLC and the ladder diagram is the program

Figure 6.10: Two NO contacts to switch one output

Timers

It is important to note that the way timers work differs from PLC to PLC but that the basic operational principles are the same. A timer can therefore be seen as an instruction that waits a set amount of time before doing something. Timer instructions are output instructions used to time intervals for which their rung conditions are true (On delay timer, T-ON), or false (Off delay timer, T-OF). These are software timers that must be programmed to perform a certain function. A second important input to a timer is the enable/reset input. When this input is activated, it will reset the timer back to zero. Once again, the operation of the enable/reset depends on the type of PLC. You will have to study/familiarise yourself with the operation of the PLC you will be working with.

On delay timers: This type of timer delay turns the output field device on for a certain amount of clock pulses. In other words, after the input field sensor turns on, it will wait X seconds before switching the output field device on (a motor). This is one of the most commonly used timers.

Off delay timer: This timer, on the other hand, will delay turning the output field device off after a certain number of clock pulses. The output field device (a motor) would be on, and eventually switch off after X seconds.

Let us look at an example:

With reference to figure 6.11, when contact X0 is closed, the timer (T1) starts running and after 5 seconds (indicated by k5) the timer contact (T1) closes and switches the coil (Q0) to the motor on. In this example, when contact X1 is closed, it resets the timer back to zero. Please also note that figure 6.11 is a ladder diagram (inside the PLC) and the switches and motor is not shown in this figure. They are external devices to the PLC.

Figure 6.11: Ladder diagram for a timer circuit L N

X0 X1 Q0

X0 T1/k5

T1 Q0

X1 Reset T1

Counters

Once again, it is important to note that the way counters work differs from PLC to PLC but that the basic operational principles are the same. Counters are instructions to do only one thing and that is count. We basically get two types of counters, one that counts up (i.e. 1,2,3,4, etc.), the up-counter and the other that counts down (i.e. 4,3,2,1, etc.), the down-counter. Counters do not physically exist.

They are simulated counters and they can be programmed to count pulses. These pulses could be the number of bottles or boxes passing a specific point and being picked up by a sensor.

Counters will also have a set/reset input to set the counter to its starting count or to reset the counter back to zero.

Let us look at an example:

Figure 6.12 represents a ladder diagram for a counter that is set to 9 and counting down. Each time contact X0 is closed, the counter decreases by 1 (counting down).

So if the contact X0 is repeatedly opened and closed 9 times, at the ninth count the counter contact (C1) closes and the coil (Q0) that activates a motor will be energised. When contact X1 is closed, it sets the counter back to its initial state (9).

Figure 6.12: Ladder diagram for a counter circuit

When we use an up-counter on the other hand, every time the input contact X0 is closed, the counter increases (counts up) by one. At the 9th pulse, the counter contact (C1) will close and the coil (Q0) will then be activated, which in turn will switch on the motor. When contact X1 is closed, it resets the counter back to its initial state (0).

We could, for example, have a system in a factory where 9 items need to be placed in a box. The counter will count the 9 items, and after the 9th count the full box is then removed and an empty box is put in its place to be filled again. After the 9th count, the counter will also get a reset pulse to set it back to zero.

Data storage (markers, internal relays or flags)

These are simple registers in the memory used to store information or data.

Information or data is only stored temporarily in these registers. They are also sometimes used for retentive/accumulative data storage. If, for example, the output

X0 C1/k9

C1 Q0

X1 Set/Reset C1 L N

of one rung must be used as an input to another rung (figure 6.13), then we will use a marker/internal relay/flag as a temporary storage device. The input to the second rung depends on the condition of the marker/ internal relay/flag. The marker is represented by coil (M) and the marker contact represented by contact (M). In other words, if marker coil (M) is energised then the marker contact (M) will be closed. However, if the marker is not energised, the marker contact will be open.

Figure 6.13: Use of the marker

Latches

Latching is about using an ‘imaginary’ contact that is linked to your output device (coil) and uses such imaginary contact within your program, allowing you to create a latch or some kind of memory element. Let us look at an example. In figure 6.14 below, the contact labelled Q0 is an imaginary contact that is tagged (linked) to the output coil (Q0). In other words, the condition of the output coil will determine the condition of the contact that is tagged (linked) to it. When contact X0 is closed, the coil (Q0) will be energised and the imaginary contact called Q0 will also be energised, resulting in the coil (Q0) staying energised, even though the input contact (X0) is opened again.

As with a DOL motor starter, where the normally open switch of the main contactor acts as the holding in contact, a latch keeps the main contactor activated once the start button is released.

Figure 6.14: A latch circuit

In document Electrical Technology Grade 12 (Page 154-157)