User:边缘

维基百科,自由的百科全书

我就是传说中Super1的中文ID:)

可编程序控制器[编辑]

en:Programmable logic controller

可编程序逻辑控制器

A programmable logic controller, PLC, or programmable controller is a small computer used for automation of real-world processes, such as control of machinery on factory assembly lines. Where older automated systems would use hundreds or thousands of relays and cam timers, a single PLC can be programmed as a replacement. Programmable controllers were initially adopted by the automotive manufacturing industry, where software revision replaced the re-wiring of hard-wired control panels.

The PLC is a microprocessor based device with either modular or integral input/output circuitry that monitors the status of field connected sensor inputs and controls attached devices (motor starters, solenoids, pilot lights/displays, speed drives, valves, etc.) according to a user-created program stored in battery-backed memory. The functionality of the PLC has evolved over the years to include typical relay control, sophisticated motion control, process control, Distributed Control System and complex networking. A PLC is typically programmed in IEC 61131 programming languages. PLCs are often categorized by the number of I/O ports they provide. PLCs are often RISC based and are designed for realtime and rugged industrial environments. See DCS.

Digital vs. Analog Signals[编辑]

Digital or discrete signals behave as switches, yielding simply an On or Off signal (1 or 0, True or False, respectively). Pushbuttons, limit switches, and photo-eyes are examples of devices providing a digital signal. Digital signals are judged using either voltage or current, where a specific range is denominated as On and another as Off. A PLC might use 24VDC I/O, with values above 22VDC representing On and values below 2VDC representing Off. Initially, PLCs had only digital I/O.

Analog signals behave as volume controls, yielding a range of values between zero and full-scale. These are typically interpreted as integer values by the PLC, with various ranges of accuracy depending on the device and the number of bits available to store the data. Pressure, temperature and weight are examples of measurements which can provide analog signals. Analog signals can use voltage or current, but do not have discrete ranges for On or Off. Instead they work in a defined range of valid values where the I/O device can operate reliably. On a 0-24VDC scale, 25VDC may be interpreted by the PLC as any value.

Example: Digital vs Analog[编辑]

As an example, say the facility needs to store water in a tank. The water is drawn from the tank by another system, our example system must manage the water level in the tank.

Using only digital signals, the PLC has two digital inputs from float switches (tank empty and tank full). The PLC uses a digital output to open and close the inlet valve into the tank.

If both float switches are off (down) or only the 'tank empty' switch is on, the PLC will open the valve to let more water in. If only the 'tank full' switch is on, the valve turns off. Both switches being on would signal that something is wrong with one of the switches, as the tank cannot be both full and empty at the same time. Two float switches are used to prevent a 'flutter' condition where any water usage activates the pump for a very short time causing the system to wear out faster.

An analog system might use a load cell (scale) to that weighs the tank and a rate valve. The PLC could use a PID loop (see section below) to control the rate valve. The load cell is connected to one of the PLC's analog inputs and the rate valve is connected to one of the PLC's analog outputs. This system fills the tank faster when there's less water in the tank. If the water level drops rapidly, the rate valve can be opened wide. If water is only dripping out of the tank, the rate valve adjusts to slowly drip water back into the tank.

In this system, to avoid 'flutter' adjustments that can wear out the valve many PLCs have a "deadband". This deadband would be adjusted so the valve moves only for a significant change in rate. This will in turn minimize the motion of the valve, and reduce its wear.

A real system might combine both approaches, using float switches and simple valves to prevent spills, and a rate sensor and rate valve to optimize refill rates. Backup and maintenance methodolgies can make a real system very complicated.

Communication Signals: Proprietary vs Standard[编辑]

A wide variety of communication protocols are used to enable a PLC to interact with more complex systems. Many manufacturers have proprietary protocols for specific tasks and standard protocols for more general tasks. Proprietary protocols are typically used to enable a PLC to communicate with expansion systems, perhaps providing more I/O. Standard protocols can be used to interface with a wider variety of devices, including User Interfaces (see below) or PLCs or computers from other manufacturers.

How PLC's package I/O capabilities: Modular, Rack, P2P[编辑]

PLCs of the modular type have a limited number of connections built in for inputs and outputs. Typically, expansions are available if the base model does not have sufficient I/O.

Rack-style PLCs have processor modules with separate [optional] I/O modules, which may occupy many racks giving thousands of discrete and analog inputs and outputs. Often a special high speed serial I/O link is used so that racks can be remotely mounted from the processor, thereby saving on wiring costs especially for large plants.

PLCs intended for use in larger I/O systems may have peer-to-peer (P2P) communication between processors. This allows separate parts of a complex process to have individual control while allowing the sub-systems to co-ordinate over the communication link. These communication links are also often used for HMI devices such as keypads or PC-type workstations.

The average amount of inputs installed in the world is three times that of outputs for both analog and digital. The need for this rises from the PLC's need to have redundant methods to monitor a instrument to appropriately control another.

Programming[编辑]

PLCs programs are generally written in a special application on a personal computer then downloaded over a custom cable to the PLC. The program is typically stored in the PLC either in battery-backed-up RAM or some other non-volatile memory.

Early PLCs were designed to be used by electricians who would learn PLC programming on the job. These PLC's were programmed in "ladder logic", which strongly resembles a schematic of relay logic. Modern PLCs can be programmed in a variety of ways, from ladder logic to more traditional programming languages such as BASIC and C. Another method is State Logic, a Very High Level Programming Language designed to program PLCs based on State Transition Diagrams.

Recently, the International standard IEC 61131-3 has become popular. IEC 61131-3 currently defines 5 programming languages for programmable control systems: FBD (Function Block Diagram), LD (Ladder Diagram), ST (Structured Text, Pascal type language), IL (Instruction List) and SFC (Sequential Function Chart). These techniques emphasize logical organization of operations.

PID loops[编辑]

PLCs may include logic for single-variable generic industrial feedback loop, a "proportional, integral, derivative" loop, or "PID controller."

A PID loop is the standard solution to many industrial process control processes that require proportional control. Proportional control dictates that large deviations should be corrected by large amounts and small deviations should be corrected by small amounts. A PID loop could be used to control the pH level of water in a swimming pool.

User interface[编辑]

PLCs may need to interact with people for the purpose of configuration, alarm reporting or everyday control. A Human-Machine Interface (HMI) is employed for this purpose.

A simple system may use buttons and lights to interact with the user. Text displays are available as well as graphical touch screens. Most modern PLCs can communicate over a network to some other system, such as a computer running SCADA system or web browser.

History[编辑]

PLC was invented in response to the needs of the American automotive industry. Before the PLC, control, sequencing, and safety interlock logic for manufacturing automobiles and trucks was accomplished using relays, timers and dedicated closed-loop controllers. The process for updating such facilities for the yearly model change-over was very time consuming and expensive, as the relay systems needed to be rewired by skilled electricians. In 1968 GM Hydramatic (the automatic transmission division of General Motors) issued a request for proposal for an electronic replacement for hard-wired relay systems.

The winning proposal came from Bedford Associates of Bedford, Massachusetts. The first PLC, designated the 084 because it was Bedford Associates eighty-fourth project, was the result. Bedford Associates started a new company dedicated to developing, manufacturing, selling, and servicing this new product: Modicon, which stood for MOdular DIgital CONtroller.

One of the very first 084 models built is now on display at Modicon's headquarters in North Andover, Massachusetts. It was presented to Modicon by GM, when the unit was retired from nearly twenty years of uninterrupted service.

The automotive industry is still one of the largest users of PLCs, and Modicon still numbers some of its controller models such that they end with eighty-four.

talk page of this article[编辑]

I removed the following from an article written at "Programmable Logic Controller". The extra information should be merged in:

A Programmable Logic Controller (PLC or programmable controller) is a programmable computer dedicated to industrial applications. The main difference with a computer is the connection to the process through the use of inputs and outputs linked to sensors and actuators. It is used to control and monitor machines. Everything from limit switches, simple level devices and temperature indicators to complex positioning systems or even machine vision can be detected from a PLC. On the actuator side, pneumatic or hydraulic cylinders or diaphragms, magnetic relays or solenoids as well as any kind of electric motors can driven.

The earliest PLCs expressed all decision making logic in simple [Ladder Logic] inspired from the electrical connection diagrams. The electricicians were quite able to trace out circuit problems with schematic diagrams using ladder logic. This was chosen mainly to reduce the apprehension of the existing technicians.

Recently, inspired from Grafcet, the PLC have integrated the Sequencial Function Charts : a new graphical language which allows now to directly program the sequencial nature of processes.

Today, the line between a programmable computer and a PLC is thinning. With the [IEC-1138] standard, it is now possible to program these devices using structured programming languages (such as C), and logic elementary operations.

Programming PLC[编辑]

There is some info missing: PLC can be programmed not only in ladder languages or C, but there is a galore of possibilities:

  • ladder logic (mentioned),
  • structural languages - mostly C (mentioned),
  • low-level languages- assembler, basic,
  • block languages, like FBD, PD, FUP...,
  • sequential function charts.

However, I don't feel wise enough to write more :D


History[编辑]

There seems to be some confusion about the history of the PLC. The present article seems to indicate that GM was the driving force behind the development of the PLC. However, in this article - http://www.barn.org/FILES/historyofplc.html, Dick Morley, its inventor, seemed to have had in mind the machine tool industry when he first envisioned it. Can anyone clarify this issue? Which came first - GM's proposal for a PLC or the PLC its self that neatly fit into GM's needs?

Simple and representative[编辑]

We don't need to document all methodologies used for each brand of PLC. We all have our favorite system and after a while it seems like the One True Way. I programmed ZWorld controllers in C(more or less) to control gas flows. If you controlled cutting machines using GE Fanucs, everything has a slightly different feel. We don't need to document the different feels in this page. For example, I just whittled down a big mess regarding the labels we use for digital input values: On/Off, 1/0, T/F, 24VDC/0VDC. Any of these is valid. Including them all just confuses the un-initated reader. You control motors, I control valves but we don't need to list everything that is a digital output to communicate the idea of Digital Output. Same with programming languages, UIs, data storage, networking... Can we keep it simple and representative please? -- TomCerul 05:38, 21 July 2005 (UTC)

Examples[编辑]

Okay folks, we know PLC programming is full of millions of details regarding how things can go horribly wrong. What examples should we use? My choice has been

1. DI/DO
2. AI/AO
3. Should we add an HMI example?
4. And now I'm thinking we should add an example and section describing the level of the complexity inherent to industrial control/PLC programming. Perhaps:"Now change the controlled fluid to gasoline. Extensive safety precations must be implemented. Overfill, vapor detection, catch pan liquid detector, exhaust monitoring, controller air pressure monitoring..."

I want to make most of the article clear enough for a layman. TomCerul 15:41, 1 September 2005 (UTC)