Programmable logic controller: Difference between revisions

Content deleted Content added
Remove blatant advertisement and not-really-related wiki links. There are dozens of PLS manufacturers, and AB is not even the best one, so yank it. (it is the most common in the US, but not in Europe)
No edit summary
Line 4:
 
A simple program could maintain the level of water
in a tank between two float switchsswitches by opening and closing an electric valve. A slightly more complex arrangement could involve a scale under the tank (as an input) and a flow controller (as an output) allowing water to flow at a controlled rate. A typical industrial application might control several tanks in a process such as sewage treatment. Each tank might be watched for a variety of conditions such as being too full or too empty or having the wrong pH.
 
== Analog vs Digital Inputs and Outputs ==
Digital signals behave as switches, yielding simply an On or Off signal. Pushbuttons, limit-switches, and photo-eyes are examples of devices providing a digital signal. Analog signals behave as volume controls, yielding a range of values between On and Off. Pressure transducers, scales and gas leak detectors can provide analog signals.
 
In the simple example above, the PLC is accepting two digital inputs from float switchsswitches. The PLC is controlling a single digital output to actuate the inlet valve into the tank. If both float switches are off (down) the PLC will open the valve to let more water in. It will continue to fill until both floats lift making their switches turn on.
 
The slightly more complex example (scale and flow controller) uses analog inputs and outputs. The scale is connected to one of the PLC's analog inputs and the flow controller is connected to one of the PLC's analog outputs. In this system, we can fill at different rates based on how much water in left. If the water level drops rapidly, the flow controller can be opened wide. If water is dripping out, the flow controller can be set to allow only a small amount of water back into the tank.
Line 20:
Early PLCs were designed to be used by electricians who train 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 ladder logic or in more traditional programming languages such as C.
 
In ladder logic, a [[relay]] coil, or just 'coil', can open or close any number of contacts, (the switches which a relay controls). This can make ladder logic on a PLC easier then using real relays, which seldom have more then four contacts. A PLC programmer lays out these virtual contacts and coils on their PC to control a process or machine in the real world.
 
In addition to normal relays, ladder logic allows for math functions through [[black box]] pieces that are integrated into the ladder. A simple addition function may count the number of times a button is pushed.