Evolving from the mechanical cam, programmable limit switches are the latest development for directing rotary motion in machine control.
Programmable limit switches (PLSs) convert rotating shaft motion, or linear motion that was changed to rotary motion, into signals that control machine events or processes. These microprocessor- based devices have functions similar to those of programmable controllers (PLCs). Because their programming is simpler, though, they scan I/O faster, which lets them relieve PLCs of some motion control functions.
PLSs have their origins in the mechanical cam switch. The mechanical cam helps synchronize process operations to the speed of the machinery. However, it is not dependable at high speeds because of switch contact bounce, mechanical wear, and switch arm deformation. In addition, the thin metal cams are often hard to adjust – if they are adjustable at all.
Replacing those mechanical components with electronic-based shutters and photocouplers improved the cam's responsiveness. The resulting electronic cam switches are better able to handle high-speed operations. But switching resolution is relatively coarse. The interaction of the shutter and photocoupler assembly limits the resolution to plus or minus a degree. Another drawback - adjustment of switching setpoints is not possible during operation.
Incorporating a microprocessor and a feedback device into the switch refines the resolution. Such a programmable limit switch meets the positioning accuracy needs of high-speed applications, such as metal cutting and assembly equipment, automated welders, lasers, and vision equipment. It is also used in material handling in palletizers, depalletizers, and conveyors, as well as related switching, turning, and transfer operations.
Finding its way
The PLS uses either a gray-code encoder or a resolver to give the microprocessor absolute position information of rotating motion, even if power to the sensor is interrupted. The microprocessor can mathematically manipulate these data, opening possibilities for offsetting position information to create a new "virtual" position. Through the encoder or resolver, the switch establishes the zero point anywhere in the shaft rotation. With a resolver, the scale factor, or number of "counts" in one full revolution, can be changed – from 1 to 4,096 counts per revolution – to suit the application.
Because of the microprocessor, the PLS offers capabilities not available on electronic cam switches. For example, you can adjust setpoints with the machine in motion, make program changes from a remote location, and adjust machine speeds during operation.
The switch to PLS
Though several of their functions are similar, programmable limit switches and PLCs solve different machinery control problems. PLCs provide a programmable method of relating the operation of sensors, limit switches, selector switches and other input devices to output components, such as solenoid valves, motors and pneumatic cylinders. Through ladder logic, sequential function charts, flow charts, and other languages, you change machine functions without rewiring the system.
During execution, the PLC performs a repetitive cycle of operations. It scans input devices and updates a memory table that indicates their status. Next, as it processes the control logic, it updates another memory table that indicates whether output devices should be on or off. Then it uses this table to change the condition of the output devices. The time it takes for this cycle varies from a few to a maximum of 10 msec, depending on the control program.
The programmable limit switch, on the other hand, performs accurate control (to ±0.09 deg in some resolverbased models) of repetitive high-speed machine functions. These functions often correlate with a rotating shaft, so the PLS microprocessor spends less time polling inputs. By nature of its firmware, it typically does its task in 300 μsec. Thus, with these shorter scan times, the PLS can more readily compensate for changing machine speeds than a PLC.
Like programmable controllers, the PLS executes machine logic functions by using inputs to initiate outputs. However, it does not translate programming code, such as ladder logic, into actions. Instead, it uses pre-programmed logic sequences, called modes, to direct action.
Each mode governs a number of output channels that must operate together within a framework of the machine process. One input bit initiates a mode. It's because each mode handles a limited number of outputs that scan times are fast.
The switch directly controls highspeed machine functions, while the PLC coordinates low-speed processes, as well as the operation of the PLS. Thus, many industrial control systems can benefit from combining a PLC with a PLS.
Continue on next page
In addition to rotary motion and high speed, the best PLS applications need just a simple triggering mechanism to engage, such as a signal from a proximity sensor. Some programmable switches can handle applications with varying product cycles, especially if they offer modes that can compensate for uneven spacing of products within the machine cycle. Often, however, such applications are best handled with a PLC.
Drive train considerations may affect whether you use a PLC or PLS. The programmable limit switch handles varying speeds better than the PLC. Transducer mounting is the same with either device, but you need to know whether you must provide for a shaft coupling, chain drive or other drive scheme.
The last criterion to consider is the number of outputs needed. The programmable limit switch can handle 64 outputs. While it can control both ac and dc outputs in one mode, such mixing may limit the total number of outputs even further. If the application calls for large amounts of input information, the PLC is typically the better choice.
Programming a PLS
Some programmable limit switches let you assign a number of output channels to a "Group," which then operates in one of several possible modes. Modes are like canned subroutines that require only a single bit to turn them on.
Grouping output circuits and assigning different modes of operation to them reduces the amount of work the switch's digital processor must do. Limiting the amount of information to process keeps scan times low.
By contrast, a PLC constantly looks down ladder logic rungs for instructions assigned to each input and output. The process of examining every input, output, and their operating conditions introduces a time delay in execution.
Here's a look at one set of PLS modes:
Mode 0. Outputs are not affected by any inputs for they are always ON. When the rotation of the limit switch reaches the programmed setpoint, switching occurs. This is similar to straight cam logic.
Mode 1. When the enable input turns on, the start position for all the outputs resets. The enable input has no further effect until it turns off, where it is then re-armed. This mode operates as straight cam logic until it receives the input.
Mode 2. Outputs are disabled until the enable input turns on. Then, the outputs are enabled for one machine cycle only at their programmed setpoints. Once reset, the input has no affect until re-armed, which also disables outputs.
Mode 3. Outputs are ON only while their programmed setpoints are ON and the corresponding input terminal is energized. If the input is OFF, all the outputs in the group will be OFF, regardless of the setpoint programming.
Mode 4. Outputs will turn ON at their programmed setpoints for one machine cycle only if the group input switches ON within a pulse, or "window," programmed into the group channel.
Mode 5. Outputs will turn ON at their programmed setpoints for one machine cycle if the group input is ON anywhere within a pulse, or "window," programmed into the group channel.
On the network
Several PLSs can operate in supervisory control applications using a communication protocol such as Modbus to transmit data to PCs using Windows or DOS-based software, intelligent touchscreen panels, and PLCs.
From a control panel, you can monitor the switch program and adjust or change the current program. All PLS data, including position, pulses, rpm, speed compensation, and timed-output information are available over a network. Thus, you can change product size or configuration quickly and automatically, reducing downtime and improving productivity.
Paul Anderson is an application engineer at Electro Cam Corp., Roscoe, Ill.