【正文】
sers to even see mnemonic programs. Sequential Function Charts (SFC) have been developed to acmodate the programming of more advanced systems. These are similar to flowcharts, but much more powerful. The example seen in Figure is doing two different things. To read the chart, start at the top where is says start. Below this there is the double horizontal line that says follow both paths. As a result the PLC will start to follow the branch on the left and right hand sides separately and simultaneously. On the left there are two functions the first one is the power up function. This function will run until it decides it is done, and the power down function will e after. On the right hand side is the flash function。 this will run until it is done. These functions look unexplained, but each function, such as power up will be a small ladder logic program. This method is much different from flowcharts because it does not have to follow a single path through the flowchart. Structured Text programming has been developed as a more modern programming language. It is quite similar to languages such as BASIC. A simple example is shown in Figure . This example uses a PLC memory location N7:0. This memory location is for an integer, as will be explained later in the book. The first line of the program sets the value to 0. The next line begins a loop, and will be where the loop returns to. The next line recalls the value in location N7:0, adds 1 to it and returns it to the same location. The next line checks to see if the loop should quit. If N7:0 is greater than or equal to 10, then the loop will quit, otherwise the puter will go back up to the REPEAT statement continue from there. Each time the program goes through this loop N7:0 will increase by 1 until the value reaches 10. N7:0 := 0。 REPEAT N7:0 := N7:0 + 1。 UNTIL N7:0 = 10 END_REPEAT。 PLC ConnectionsWhen a process is controlled by a PLC it uses inputs from sensors to make decisions and update outputs to drive actuators, as shown in Figure . The process is a real process that will change over time. Actuators will drive the system to new states (or modes of operation). This means that the controller is limited by the sensors available, if an input is not available, the controller will have no way to detect a condition.The control loop is a continuous cycle of the PLC reading inputs, solving the ladder logic, and then changing the outputs. Like any puter this does not happen instantly. Figure shows the basic operation cycle of a PLC. When power is turned on initially the PLC does a quick sanity check to ensure that the hardware is working properly. If there is a problem the PLC will halt and indicate there is an error. For example, if the PLC backup battery is low and power was lost, the memory will be corrupt and this will result in a fault. If the PLC passes the sanity checks it will then scan (read) all the inputs. After the inputs values are stored in memory the ladder logic will be scanned (solved) using the stored values not the current values. This is done to prevent logic problems when inputs change during the ladder logic scan. After this the system goes back to do a sanity check, and the loop continues indefinitely. Unlike normal puters, the entire program will be run every scan. Typical times for each of the stages are in the order of milliseconds.Questions Should Pay Attention to When PLC Is in the UsePLC which should pay attention to in the application is specially the control device which serves for the industrial production, usually does not need to take any measure, may use directly in the industry environment. But, when the production environment is too bad, the electromagnetic interference is special intense, or installs uses improper, cannot guarantee PLC the normal operation, therefore should pay attention to the following questions in the use. First, Siemens PLC maintenance 1. Maintenance procedures, equipment, periodic testing, adjustment provisions (1) Halfyearly or quarterly inspection PLC cabinet terminal connections, and if time to reloose strong local connection。(2) Of the cabinet to the host power supply voltage of the monthly resurvey work。 2. The provisions of cleaning equipment on a regular basis(1) Every six months or a quarter of the PLC to clean, cut off power to the PLC power supply to the power rack, CPU board and input / output board in turn be removed to purge, clean and then in turn installed in situ, will all link to resume evacuation call and start the host PLC. PLC box carefully sweeping health。 (2) Every three months to replace the power rack below the filter。3. Maintenance preparation, maintenance of order(1) Ready before maintenance tools。 (2) To protect the ponents and the template does not function no fault damage, must be protection devices and serious preparations for antistatic。 (3) Maintenance scheduling and operator contact before and well, be linked to overhaul licensing office hung maintenance card。 4. Equipment and method of disassembly sequence (1) Downtime, must be two or more monitoring operation。 (2) The way the CPU on the front panel select switch from the Run to Stop position。 (3) Close the PLC power supply mains, and then close the other to the power supply module Osaka。 (4) Connected to the power supply rack power cord clear line number keep in mind and remove the link location, then remove the power rack and rack screws connected, power rack can be removed。 (5) CPU motherboard and I / 0 boards in the bottom of the screw rotation after template changed。 (6) Installed in reverse order。5. Maintenance process and technical requirements (1) measure voltage, use a digital voltmeter or accuracy of 1% of the multimedia, measure (2) the power rack, CPU board can only be removed when the main power cut off。(3) RAM module to remove or insert the CPU from