【正文】
gic ControllersThe PLC is a programmable device which uses an instruction set of logical mands. It is divided into three sections. Digital inputs connected to specific internal addresses. Analogue inputs can only be accepted by prior conversion to digital. Internal memory prising timers, counters, registers and discreet internal relays. Digital outputs made up of relays, transistors and triacs and analogue outputs handled by digital to analogue converters.No standard approach to programming has been developed due to the varied nature of systems. There is no standard language so most PLC programmers develop programs using Ladder Logic with no standard methodology.Ladder Logic is an attempt to simplify the programming task across a range of different PLCs. The ladder logic models the 39。hard wiring39。 thus modelling the solution not the problem. A simple example is the control of a start stop relay for a motor shown in figure A1 figure (1). The equivalent ladder logic looks very similar, figure A1figure(2). This circuit is based on the start switch being connected to input number 400, the stop switch to 401 and the motor output to 436. The ladder is a low level modelling tool, the PLC program is a translation of the ladder logic into mneumonics and number that vary from PLC to PLC. Figure A1For a Mitsubishi PLC the corresponding set of instruction is given. The PLC first scans its internal memory to establish the state of the system. It will then run the program to establish all logical connections between input and output before actioning the outputs.In a plex control situation with a very large number of logical inputs and logical binations it is difficult to predict the results of illegal inputs such as damaged input switches or sensors. This lack of control causes normally stable systems to behave unpredictably causing damage to plant and violating safety. PLCs in flexible manufacturingPLCs are used extensively in flexible manufacturing systems. The cross effect of one output on another is difficult and often impossible to detect, consequently programmers do not take into account all possible permutations.The following example prises three machining centres. Machine 1 is a pillar drill operating on a single axis with sensors positioned at the top and bottom of the machine slide. Machine 2 is a planer with vertical movement and a rotating machine head with three selectable heads. Machine 3 is a horizontal miller with movement on two axis and sensors positioned at the end of each stroke. The three conveyor belts convey the ponents from the starting bay to each of the machining centres. Each of the ponents is individually coded, the code being entered into the PLC when it enters the starting bay. The ponent is then tracked through the system. As the ponent passes each of the machining centres a sensor informs the PLC of its arrival, the machining centre can now perform the appropriate operation for the ponent.In a system such as this it is relatively easy to loose control which results in jumped sequences, deadlock and lost ponents. The project39。s objective was to model this system.Figure A2 The Entrance Door [1]To slightly further plicate the solution for the entrance door we assort that the door is a hinged door (not sliding) thus when it opens it moves over mat B. As a consequence any person stood on mat B when the door opens risks injury. Figure A3 shows the entrance door. Figure A3 Figure A4Figure A4 shows a simple ladder diagram that may have been produced by an inexperienced 1 and 2 examine the environment and set internal flags, odf, open door flag, and cdf, close door 3 and 4 monitor internal flags and cause external action, in this case either the opening or closing of the door. Simply standing on mat A causes the door to open and standing on mat B causes the door to close. Modelling with Petri NetsThis really is a very basic solution. It shows that ladder logic is really a notation for PLC programs in that is assumes the internal memory is set by external events. Transitions A, D and G are not necessary for modelling of the ladder logic in that they model the environment of the door, not the door and mats themselves. Observation of the net demonstrates the obvious problems with the logic. Firstly the door may open or close when a person is stood on mat B, the so called ~hospital case39。. Secondly the net allows for the door to be left open. The ladder logic, however would always detect a person on mat B and close the door. It is relatively easy to stop the door opening or closing when a person is on mat B. Rungs 1 and 4 should be amended as shown below. This appears simple but would not work in practice. Reexamine the new ladder logic and recall the operation of a PLC, scan internal memory, establish logical connections, action outputs. The initial scan will detect on A, not on B, and set internal memory, odf, open door flag. A second scan will detect odfand the door will begin to open. However as soon as the door opens a fraction the person may step offmat A and start to pass through the door. A scan at this instant will detect neither A nor B, neither odf or cdf will be set and the door will halt part way open. Secondly, assume that the person is patient and waits for the door to be fully open before stepping through onto mat B. A scan at this stage will set cdf, close door flag. Nothing further will be effected until the person leaves mat B. Subsequently at scans cdf will not be set, no one on B, rung 4 will never evaluate to true and the door will never close. The programmer overes this problem by latching,2 reexamine figures 1 and 2 where an output is reused as an input to latch the motor until the stop button is depressed, a Note that some PLCs have self latching relays. Returning to the door. It is necessary to latch the open door flag unti