0% found this document useful (0 votes)
176 views18 pages

Q. Explain The ONE SHOT (ONS) Function With An Application.: Advanced PLC Programming

Uploaded by

Haripriya Palem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
176 views18 pages

Q. Explain The ONE SHOT (ONS) Function With An Application.: Advanced PLC Programming

Uploaded by

Haripriya Palem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 18

ADVANCED PLC PROGRAMMING

Q. Explain the ONE SHOT (ONS) function with an application.

 One of the important functions provided by PLC is the ability to program an


internal relay so that its contacts are activated for just one cycle, that is, one
scan through the ladder program.
 This function is often termed one-shot. The figure below shoes ONE SHOT
function inserted in a ladder rung.

 As shown in figure the one-shot is triggered by the off-to-on transition of the


input signal. It stays on for one scan and goes off even if the triggering input
is on.
 It stays off until the input goes off and then comes on again.
 The conveyor box counting PLC program illustrates the application of ONE
SHOT (ONS) instruction.

 An optical proximity sensor detects the boxes and provides input signal to
PLC. The counter instruction counts the number of boxes passing along
conveyor.
 A schematic ladder diagram of PLC program is shown in figure. When there is
true condition of proximity switch, a count takes place and it is stored in
designated register HR037.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 1


ADVANCED PLC PROGRAMMING

 This ladder diagram will not function as intended. In fact, with this ladder
diagram, when one box goes past proximity sensor the counter instead of
showing one count, will show hundreds of count. Let’s see what is wrong
with this ladder diagram.
 While the box is being detected, the PLC scans the rungs. These scans are
extremely fast and occur many times before the box passes the sensor.
Therefore, instead of counting once when a box is detected, the counting
occurs every time there is scan.
 Therefore, for correct working, we need the PLC counter to operate (i.e.
count) only during first scan. The counter must not count during subsequent
scans. The next count should be counted when that box goes past sensor
and next box is being detected.
 This is accomplished by introducing ONE SHOT instruction between proximity
sensor contact and the counter as shown in figure.

 The modified ladder diagram is shown in figure. The ONE SHOT instruction
sends a signal to counter whenever there is off to on transition of the
proximity contact.

Q. Explain in brief CLEAR (CLR) instruction.

 The CLEAR (CLR) instruction of function sets all the bits in a register or word
to zero.
 This is useful when we wish to zero out a system before starting or restarting
a process.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 2


ADVANCED PLC PROGRAMMING

Q. Explain in brief SWEEP function.

 The SWEEP function is used when we wish to scan through a program or


portion of a program at fixed intervals.
 The fixed interval needs to be longer than the scan time to be operational: for
example, if scan time is 30 milliseconds (ms) and we set the sweep time to
20 ms. The scans will be made every 30 ms, the scan time.
 If we set the sweep time for 5 seconds, the program will be scanned every 5
seconds, which is longer than the scan time.

Q. Explain how Bit patterns in registers can be used in machine control?

 Most PLCs are capable of working with digital bits. Instead of controlling
output devices from individual contacts, these PLCs use register bits in
groups. For example, if the on-off status of 16 machines is to be controlled,
just one of the 16 bits of the 16-bit register could control each of the 16
machines.
 If there are 157 machines to be turn on and off, only 10 of these 16-bit
registers are needed for on-off control (157/16=9.815, or 9 registers plus part
of a 10th one). By contrast, in contact-coil ladder control would need 157
ladder lines in the program.

 Suppose we wish to have outputs CR0081 and CR0082 controlled by a


register bit status. To have CR0081 controlled by bit 11 in HR0207 and
CR0082 controlled by bit 12, we should designate the contacts at shown in
figure.
 Take the first 10 bits (from the right is standard on) and use them to control
10 outputs, as shown in figure. The outputs with a feeder bit of 1 would be
on, and those with 0 bit would be off. If we modify HR0207 to another
pattern of bits, the outputs would change status accordingly.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 3


ADVANCED PLC PROGRAMMING

Q. What are the different functions available in PLC for CHANGING A


REGISTER BIT STATUS? Explain each of them.

Following PLC functions are available for changing register bit status:

 BIT SET (BS)


 BIT CLEAR (BC)
 BIT FOLLOW (BF)

BIT SET:

When the BS function is enabled as shown in figure, bit 4 of HR0207 is set to 1 (if it
was not already a 1). Turning the function off would have no further effect on the
bit – it would remain a 1.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 4


ADVANCED PLC PROGRAMMING

BIT CLEAR:

The bit clear function, shown in figure, has the opposite effect of BIT SET. The
example in figure operates on big 5 of HR0207. When enabled, the BC function
would change bit 5 from 1 to 0. If we had applied BC to bit 6, nothing would have
happened, because bit 6 is already a 0. When BC is turned off, nothing further
happens.

BIT FOLLOW:

Figure shows the BF function applied to bit 4 of HR 0207. When enabled, the
function sets the bit to 1. When disabled, or off, the function sets the bit to 0. Notice
that BF differs from BS and BC: on and off are both active and significant in the BIT
FOLLOW function.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 5


ADVANCED PLC PROGRAMMING

Q. Explain PLC SEQUENCER function.

 The PLC SEQUENCER is a function that is used for sequential control. It


replaces the mechanical drum sequencer that was used to control machines
that have a stepped sequence of repeatable operations.
 One form of the mechanical drum sequencer consisted of a drum from which
a number of pegs protruded. When the cylinder rotated, contacts aligned with
the pegs were closed when the peg impacted them and opened when the peg
had passed.

 Thus for the arrangement shown in figure, as the drum rotates, in the first
step the peg for output 1 is activated, in step 2 the peg for the third output,
in step 3 the peg for the second output, and so on. Different outputs could be
controlled by pegs located at different distances along the drum. Another
form consisted of a series of cams on the same shaft, the profile of the cam
being used to switch contacts on and off.
 The PLC SEQUENCER is based on mechanical drum controller, but it more
powerful and flexible programming tool.
 Suppose we want output 1 to be switched on 5 s after the start and remain
on until the time reaches 10 s, output 2 to be switched on at 10 s and remain
on until 20 s, output 3 to be switched on at 15 s and remain on until 25 s,
and so on. We can represent these requirements by a time sequence
diagram, shown in figure, demonstrating the required time sequence.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 6


ADVANCED PLC PROGRAMMING

 We can transform the timing diagram into a drum sequence requirement.


Taking each drum sequence step to take 5 s gives the requirement diagram
shown in Table 10.1. Thus at step 1 we require output 1 to be switched on
and to remain on until step 2. At step 2 we require output 2 to be switched
on and remain on until step 4. At step 3 we require output 3 to be switched
on and remain on until step 5. At step 5 we require output 4 to be switched
on and remain on until step 6.

Step Time (s) Output 1 Output 2 Output 3 Output 4

0 0 0 0 0 0

1 5 1 0 0 0

2 10 0 1 0 0

3 15 0 1 1 0

4 20 0 0 1 0

5 25 0 0 1 1

6 30 0 0 0 0

 PLC sequencer is programmed using a sequence of binary words in the form


of the outputs required, such as those listed in table given above. Thus we
would have the following binary word sequence put into the program using
the programming device. We have seven steps and four outputs.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 7


ADVANCED PLC PROGRAMMING

 Figure shows a basic ladder program using such a sequencer. The timer is
started by an input to I:012/1 and has a preset time of 30 s. It is reset by its
DN bit. The DN bit also increments the SQO instruction to the next output
word. Thus the sequencer is incremented every 30 s.

 The location of the data for the words is given by FILE, which gives the
starting address for the registers in which the binary data for each step is
stored.
 Sometimes the sequencer is not required to operate on the entire word, so
MASK gives the bit pattern that masks off certain bits so they are not
controlled by the sequencer. Thus we could have a MASK word of
0000000000001111 because only last 4 bits are used in this example.
 SOURCE is the address of the input word or file for an SQC, and
DESTINATION is the address of the output word or file. CONTROL is the
address that contains parameters with control information. LENGTH is the

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 8


ADVANCED PLC PROGRAMMING

number of steps of the sequencer file. POSITION is the step in the sequencer
file from/to which the instruction moves data.

Q. Explain how PLC matrix functions help to reduce the program length.

 Suppose that we have 207 pilot lights, each of which is to go on only if both
of two contacts are closed. This means that we have to program 207 lines
with two contacts and a coil for a pilot light for each line.
 An alternative to the 207 lines of programming is one line of matrix function.
In this case we would program an AND matrix.
 Energizing the matrix function effectively scans all 207 lines and turns the
pilot lights on or off.
 In this way the PLC matrix functions help to reduce the program length.

Q. Explain the PLC AND matrix function.

 Four coils, each of which can be energized by two inputs in series, result in
four AND situations. The coils are programmed on the PLC in the usual
manner as shown in figure 5.1.

 The upper section of figure 5.2 shows the original four coils and eight inputs
arranged in a 2 x 2 matrix. A 1 represents on and a is 0, off, in the
conventional manner. Each bit of matrix A is used with corresponding bit of
matrix B. These bits are ANDed together and the result is put in the
corresponding bit location of matrix C.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 9


ADVANCED PLC PROGRAMMING

 In actual operation, the input data, or status, is contained in two series of


registers. The AND operation for the two series then takes place, and the
results are put in another series of registers. The equivalent register operation
each shown in the lower section of figure 5.2.

 We have used a 2 x 2 matrix for four AND functions. Next, suppose we have
53 coils, each with two series inputs for actuation. It would take a long time
and a lot of PLC memory to program the 106 contacts and the 53 coils. Using
the AND matrix system makes programming in lot more straightforward.
 A typical PLC has 16-bit registers. Therefore, in this case, we use three full
registers for the first 3 x 16 = 48 bits. The last 5 bits go in the first part of the
next (fourth) register. The on-off statuses of 106 contacts are stored in two
register groups. Results of the matrix AND operation appear in another matrix
as shown in figure 5.4.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 10


ADVANCED PLC PROGRAMMING

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 11


ADVANCED PLC PROGRAMMING

 How is the PLC programmed to do the PLC AND operation? Figure 5.5 shows
a typical PLC AND function. The coil is assigned a number in the usual
manner. We specify the matrix size i.e. the number of registers. We tell the
PLC which registers to use by specifying the last register of each group of
inputs and outputs.

Q. Explain PLC COMPLEMENT function.

 In some cases, we may wish to turn a number of devices to their opposing


state. The complement function allows us to do so.
 All devices that are on can be turned off, and vice versa. Effectively, this
function changes all 1s to 0s.
 Figure shows the result of complementing register A to register C.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 12


ADVANCED PLC PROGRAMMING

Q. Explain operation of discrete and analog PLC.

 By discrete operation we mean that PLC handles discrete values of inputs


and outputs i.e. inputs and outputs can only have two extreme states: ON or
OFF, 1 or 0, High or Low, etc.
 On the other hand, analog operation means that inputs and outputs can be
analog quantities i.e. continuous values ranging from minimum to maximum.
 Earlier PLCs offered only discrete functionality. But nowadays most medium
sized and large sized PLCs are capable of analog operation.
 Analog PLCs have separate analog input and output modules. These modules
are nothing but Analog to Digital and Digital to Analog convertors.
 Due to analog functionality, PLCs are widely used in such processes where
there are process variables such as temperature, pressure, flow level, etc.

Q. How the PLC networking is carried out?

OR

What is Network Topology?

 A PLC or computer with a single network interface can communicate with


many other PLCs or computers.
 To share the information effectively, all the nodes on the network must be
connected in some specific manner.
 The method of connection of these nodes is called as network topology.
 There are four basic types of network topology namely:
o BUS
o RING
o STAR
o TREE

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 13


ADVANCED PLC PROGRAMMING

1. BUS Topology:

 In BUS topology network each node is connected to a common single


communication channel or ‘Bus’.
 Every node in bus topology receives a message and checks the
destination address that is included in the message.
 Each end of a bus cable must be terminated using electrical terminal
which absorbs the message energy and avoid from reflecting back
along the bus.
2. RING Topology:

 In Ring topology nodes are arranged in a closed loop or ring, the


message packets are transmitted sequentially from node to node like a
point to point system.
 Physically each node is connected to two other nodes and it receives
message packet from one node and transfer it to other node.
 Each node is having its specific address, when it receive the packet it
checks address included in the message matches its address. If the
match the address, it accept the message packet otherwise it boost the
signal and transfer to the next node.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 14


ADVANCED PLC PROGRAMMING

3. STAR Topology:

 Multiple modes are connected to a central component, known as Hub.


 Hub is a wiring center or a common termination point where all the
nodes are connected with its individual lines.
 For example, all telephone customers are individually connected to
telephone exchange with its separate telephone lines.
4. TREE Topology:

 In this topology, all the nodes are connected in a tree type structure,
which is consists of smaller bus network.
 To extend or increase the network repeaters are used to boost the
signal strength.
 The tree is divided into sub-units so it is easier to add new units or
disconnect a sub-unit.

The BUS topology is popular in industrial sector because other topologies are
expensive to configure and confusing.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 15


ADVANCED PLC PROGRAMMING

Q. State different PLC auxiliary commands and functions.

Three important PLC auxiliary functions are:

 MONITER
 FORCE
 PRINT

Q. Explain in brief MONITER MODE functions.

 The monitor mode for ladder diagram operation is indicated on the screen in
various ways. It may be indicated by a brightening of the pattern where
voltage is passed through.

 Above figure illustrates brightness enhancement for a standard, single line


motor control ladder diagram. The figure shows the screen as the two inputs
(stop and start) are energized and deenergized.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 16


ADVANCED PLC PROGRAMMING

 The above figure shows how the status of holding registers would be shown
on the screen.
 We may call up individual coils, contacts or both on the screen. For example,
if we are looking at or in the vicinity of line 32, we may wish to see what is
happening to an input contact on line 6, which is off the screen. Contacts and
coils from line 6 can be inserted in a blank space by themselves and observed
for on-off status as shown in following figure.

Q. Explain in brief FORCE MODE functions.

 The FORCE function is essentially an override control that enables the


operator or programmer to operate the circuit from the program keyboard.
 The FORCE mode is useful but must be used with utmost caution in
conjunction with a working process. Misuse of FORCE could lead to equipment
damage and operator injury.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 17


ADVANCED PLC PROGRAMMING

 FORCE is an override function. The FORCE procedure is normally carried out


in the MONITOR mode.
 First, the cursor is placed over the contact, coil, or function we wish to force.
Turning FORCE on changes the status of the contact or coil under the cursor.
If it is a normally open contact, it will close (turn on). If it is a normally closed
contact, it will open (turn off).

Q. Explain in brief PRINT functions.

 Ladder diagrams on a screen cover from one to four or five rungs, depending
upon the PLC model. If the entire operational circuit has 20 or more rungs,
we may wish to see the entire circuit at once. Using PRINT command, the
whole ladder diagram can be printed out continuously on a conventional
computer printer.
 There are, of course, other reasons we might want a ladder printout. We
might need a permanent written record, for instance.
 Also, in education and training, a printout is a written record of laboratory
achievement.
 Other typical PRINT mode capabilities include register status and values, time
vs. status diagrams, FORCE status, etc.

© Rohan Desai- Automobile Dept- New Polytechnic, Kolhapur Page 18

You might also like