Making of sequence control program for Programmable logic controller (PLC)   1011
Knowledge concerning a sequence program is profitable to remove some useless movements of machineryfs as well as humans.
This manual is for people who have knowledge of ladder program of PLC to some degree.  If you are a beginner, read this after learning the basic knowledge of ladder program from other documents.
Contents

What is a good program?
Standardized program Arrangements
Impossible to operate when interlocks are set too much
An operation flow chart should be written.
The basis of the program is hard-wired self holding relay circuit.
Program it in order of operations.
After an operation is confirmed, operate as follows.
differentiation instructions are effective
Two or more units do the same movement
Series of operations is repeated
Response to signal wire cutting
The display panels as HMI are useful.

What is a good program?

In my opinion, a good program is easy to understand, seldom fails operations and its size is small. Most important thing for a good program are easy to understand, and its size is not so much.

Itfs difficult to shorten the program, while keeping it easy to understand.

My hope is that this article helps engineers make good programs. I wish you to become an engineer who can make a good program, by reading this article.

Standardized program Arrangements

Arrangement in a program should be standardized.  By this standardization, any one can easily search a target part.

 One example for standardization of arrangement is as follows.

 Confirming mechanical starting positions are arranged in the first part.  And it continues with the driving condition confirmation, the input process, the reset processing, the manual processes, the automatic driving operation, and output processing. And, an external display panel control part, if it has one, arranged in the ending part. 

By the way, the program should be in order by its input address numbers or the operation order.@@

Impossible to operate when interlocks are set too much

It isnft possible to operate when interlocks are set too much.

Without an occasion which might cause a serious accident, you should not add an interlock program to the manual operations program.

Interlock should not be set it as much as possible in manual operations.  Otherwise the machinery will not be able to control when a position censor is out of order.

An operation flow chart should be written

To make the program and maintain it, the flow chart of operation should be written and left it.  So other stuff can understand it much easier. Even the writer of the program might forget the flow of the program. The best flow chart is written with some circles, triangles and squares. But, Because it is better than nothing, a timing diagram along the time,@that is called ga Gantt charth should be made.

The basis of the program is hard-wired seal-in (latching) relay circuit

Early PLCs were programmed in "simple ladder logic or combined with some basic logics, which strongly resembles a schematic diagram of relay logic and had only four elements (turning on or off condition, self-latching, turning off condition and output) to make a seal-in (latching) logic. By using those PLCs, it reduced the maintenance expenses. So we bought some PLCs even though it cost over million yen at that time. Now, a PLC with the same ability may be acquired for 50 thousand Yen!

The times have changed. A function of PLC has evolved, and they are now programmable by apps on personal computers. Now, you can make a complex logic circuit easily.  Still, the self-latching circuit is base of logic circuit; you can make a program plain by it.   Otherwise, the program might consume a lot of memory. You should obtain PLC with large size memory which is more expensive than the low-end model. Cost might rise, the program may be complex. And it will be difficult to understand.

         Example of seal-in (latching) relay circuit                                                   
   @ On Sw.             Off Sw.               Magnet coil of relay     
|------[ ]-------|------[/]----------------------(  )
|               |                                            
|  Self|latch  |                                   
|------[ ]------|                                            
|   Contact of relay     
|------[ ]-------------------------------------(OUTj@

Program it in order of movement

If it was programmed in order of movement in automatic control mode, people can easily analyze it.

When the operations run simultaneously, It is necessary to compose the program of each unit. So, the programs became easy to understand by anyone.

After an operation is confirmed, operate as follows

A machine sometimes moves suddenly when an optical sensor detects a part of the human body.

It might work unexpectedly when the machine movement is only programmed by the sensor detection. The machine will work by detecting the one even if it is a man part. The sensor can not recognize the object from a humanfs part  

You should add other condition to work. For example, the miss-operation can be prevented by a sequence program which confirms the execution result of operation just before it. The machine doesnft move without confirming the result which was done correctly.  And you should add a program which raises an alarm when it detects unexpected pause.

When the differentiation instructions are used for this purpose, it is comparatively easily achieved by a shorter program.

The differentiation instruction is effective           *Ifm sorry that Ifm not sure the termh differentiation instruction gis correct or not.

In the differentiation instructions, there are two kinds (the turning on differentiation and the turning off one).of instructions.

When the condition just before the turning on differentiation instruction, it keeps the on state during one scanning time, and when the condition just before the turning off differentiation instruction, it keeps the on state during  one scanning time(A ‚”‚‰‚‚… for PLC to do the I/O processing recognizing its program is called a gscan timeh), too.@

When you want to check the movement of the rotating table,.@using the differentiation instruction, only one sensor at the stop position can detect the movement of the table. Otherwise, the program might need a lot of memory. Then you might have to obtain PLC with a large memory that is more expensive than the low-end model! Cost will rise, and the program may be complicated, and difficult to understand.

By the way, Early PLCs already have this kind of function. You should choose a PLC that can use this instruction anywhere.

Two or more units do the same movement

When welding with two or more welding machines, it will be programmed respectively for those units. Recently, PLCs are programmed using application software on personal computers. So, you can make easily a copy of the original one, and can adopt it to other unitfs program by modifying it a little. But sometimes ‚‰‚” occurred some difference in the welding time or mechanic delay time, after the program have had modifying itself. The timers of the same function might be deferent each other by careless mistakes If it is two units , setting those timers in same time is easy. However, in more units, setting the same is difficult work.

Therefore, you should make the program which the timer setting of all the same functions change at once only one register is rewritten.  It becomes easy to maintain because the one register can change all the same function timers.

Series of operations is repeated

When a series of operations is repeated, you should not make the program by copying but use it repeatedly as a subroutine program, and return to just after the calling place. By this way you can save memory of PLC, and the program structure becomes simple.

Response to signal wire cutting

It is important that no problem would happen when the signal is not input due to the wire being cut or breakdown of the sensor itself.

. Use the OK signal when a check tool sends OK or NG signals, and never judge it from the NG signal.

Concerning interlock signals, the safety signal should be input. Warning is not a suitable input for the interlock signal but a safety signal. It is necessary to cut the safety signal in a sure manner when it is dangerous.

By the way, to check magnetic position detector reed switches on a cylinder, unite the two normally closed contacts of reed switches which are attached on the each edge of cylinder, in the series circuit of logic.  If both of the sensors continue non-contacting for a fixed time, then some trouble happened to these sensors.

It is needless to say for the prevention of accidents you should compose wired circuits by not only the program of PLC.

The display panels as HMI are useful

The display panels  in the form of a Human Machine Interface are useful. For example, if an abnormal history has been left in the display panel, it becomes a strong maintenance tool . And, by its touch screen panel as a keyboard switch PLC' resisters can be rewritten immediately without a programming terminal. Those resisters can be use as counters, timers, or digital memory.

The display panels are also use as pilot lights, indicators and switches. However, it is necessary to be careful in adopting these. You should consider the occasion when the panel beak down. Using it as a manual switch,it is necessary to be searchable quickly.@And it is necessary to replace the manual operations from its touch panel to the other way, when the displayf switches are not available.@

Longevity of a backlight of the display is shorter than expected, and it needs some expense to replace. I want you to decide the adoption by considering those running costs.

Return to Home
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Copyright 2011 All Right Reserved