Encoder Handling in Roll Forming PLC Systems — Rollover, Direction Detection & Sanity Checks
Introduction — Why Encoder Handling Is Critical in Roll Forming Machines
Encoders are one of the most important sensors in roll forming machines. They provide the position and movement information required for many critical functions, including:
- panel length measurement
- punch timing
- flying shear synchronization
- speed feedback
- material tracking.
Without accurate encoder data, the PLC cannot reliably determine where the strip is within the machine. This leads to problems such as:
- incorrect panel lengths
- misaligned punch holes
- failed flying shear cuts
- unstable speed control.
However, encoder signals must be handled carefully inside the PLC program. Raw encoder values often require additional logic to manage issues such as:
- counter rollover
- incorrect direction detection
- signal noise
- unrealistic motion values.
A robust PLC program must include proper encoder handling routines to ensure reliable machine operation.
What an Encoder Does in a Roll Forming Machine
An encoder converts mechanical rotation into electrical pulses.
These pulses allow the PLC to measure how far the strip has moved through the machine.
Encoders may be mounted in several locations including:
- measuring wheels contacting the strip
- main drive shaft
- gearbox output shaft
- servo motor shafts.
The PLC counts encoder pulses and converts them into linear distance.
Types of Encoders Used in Roll Forming Machines
Several types of encoders are commonly used.
Incremental Encoders
These produce pulses as the shaft rotates.
Typical signals include:
- A channel
- B channel
- Z index.
The PLC counts the pulses to determine movement.
Incremental encoders are the most common type used in roll forming machines.
Absolute Encoders
Absolute encoders provide a digital position value rather than pulse counts.
They maintain position information even when power is lost.
Absolute encoders are often used in advanced motion systems.
Encoder Pulse Counting
The PLC typically receives encoder pulses through:
- high-speed input modules
- dedicated motion modules
- servo drive feedback systems.
These modules count pulses much faster than standard PLC inputs.
High-speed counting is necessary because roll forming machines may generate thousands of pulses per second.
Understanding Encoder Rollover
PLC counters have a maximum value they can represent.
For example:
32-bit counter maximum value:
2,147,483,647
If the encoder count increases beyond this limit, the value resets to zero or wraps around.
This is called rollover.
Rollover can cause major calculation errors if the PLC program does not account for it.
Why Rollover Occurs
Encoder counts increase continuously while the machine is running.
If the counter reaches its maximum value, it resets to the beginning of the range.
Example:
Counter reaches maximum value.
Next pulse causes the counter to wrap to zero.
Without rollover handling, the PLC may interpret this as a sudden large movement.
Rollover Handling Logic
To prevent errors, PLC programs must detect rollover conditions.
The program compares the current encoder value with the previous value.
If the difference is extremely large, rollover has likely occurred.
The program adjusts the calculation accordingly.
This ensures that length measurements remain accurate.
Direction Detection
In roll forming machines, the strip may move:
- forward during production
- backward during threading or setup.
The PLC must correctly detect movement direction.
Incremental encoders provide two channels:
- A channel
- B channel.
These signals are offset slightly in time.
By comparing which signal changes first, the PLC can determine direction.
Quadrature Encoding
A and B channels operate in a pattern known as quadrature encoding.
The sequence of signal transitions indicates direction.
If A leads B, the encoder rotates forward.
If B leads A, the encoder rotates in reverse.
Quadrature decoding allows the PLC to track both speed and direction.
Why Direction Detection Matters
Direction detection is important for several reasons.
Preventing Incorrect Length Calculations
If the strip moves backward during setup, the PLC must subtract movement rather than add it.
Preventing Punch Misalignment
Punch triggers must depend on forward strip movement only.
Correct Position Tracking
Flying shear synchronization depends on accurate motion direction.
Encoder Sanity Checks
Even with correct wiring and configuration, encoder signals may sometimes produce unrealistic values.
This can happen due to:
- electrical noise
- loose connections
- damaged encoder cables
- mechanical slip.
PLC programs should include sanity checks to detect abnormal encoder behavior.
Maximum Speed Checks
The PLC can calculate strip speed from encoder pulses.
If the calculated speed exceeds the physical capability of the machine, this likely indicates a signal error.
Example:
Machine maximum speed: 40 m/min
Encoder calculation shows: 200 m/min
The PLC can flag this as an encoder fault.
Sudden Position Jump Detection
If the encoder value suddenly jumps by a large amount in one scan cycle, the PLC should treat this as invalid data.
Possible causes include:
- rollover misinterpretation
- electrical interference
- encoder failure.
Sanity checks prevent these errors from affecting machine control.
Missing Pulse Detection
If the encoder signal stops unexpectedly while the machine is running, the PLC may detect a fault condition.
This may indicate:
- broken encoder cable
- failed encoder
- high-speed counter malfunction.
Detecting missing pulses helps prevent incorrect length calculations.
Encoder Scaling
Encoder pulses must be converted into linear distance.
This requires knowledge of:
- encoder resolution
- measuring wheel circumference.
Example:
Encoder resolution: 2000 pulses per revolution
Measuring wheel circumference: 500 mm
Each pulse represents:
0.25 mm of strip movement.
The PLC multiplies pulse counts by this factor to calculate strip length.
Encoder Slip Detection
If the measuring wheel slips on the strip surface, the encoder may report incorrect movement.
Slip detection may involve:
- comparing encoder values with drive motor position
- monitoring unusual acceleration changes.
Slip detection helps maintain accurate panel length measurements.
Filtering Encoder Signals
High-speed encoder signals may contain electrical noise.
Filtering techniques may include:
- hardware signal conditioning
- PLC input filtering
- digital averaging for speed calculations.
Filtering improves signal reliability.
Encoder Data in Flying Shear Systems
Flying shear systems require extremely accurate encoder data.
The PLC must synchronize the shear carriage with strip movement.
Encoder errors can cause:
- incorrect cut positions
- mechanical collisions
- damaged tooling.
Therefore, flying shear systems often use dedicated motion controllers or servo feedback systems.
Troubleshooting Encoder Problems
Technicians diagnosing encoder issues should perform several checks.
Inspect Encoder Mounting
Ensure the encoder is securely mounted and aligned.
Check Cable Connections
Loose or damaged cables may cause signal interruptions.
Verify PLC Input Module
Confirm that the high-speed counter module is functioning correctly.
Monitor Encoder Values
Watch encoder counts in the PLC diagnostic interface.
Sudden jumps or unrealistic speeds may indicate faults.
Commissioning Encoder Systems
During machine commissioning, encoder systems should be tested carefully.
Typical steps include:
1 verifying encoder wiring
2 confirming direction detection
3 calibrating encoder scaling
4 running test panels to verify length accuracy.
Proper commissioning ensures reliable machine operation.
Preventative Maintenance for Encoders
Encoders should be inspected periodically.
Recommended practices include:
Monthly checks:
- inspect encoder mounting
- verify cable condition.
Quarterly checks:
- confirm encoder scaling accuracy
- check measuring wheel condition.
Regular maintenance helps prevent unexpected failures.
Benefits of Robust Encoder Handling
Proper encoder handling provides several important benefits.
These include:
- accurate panel length measurement
- reliable punch positioning
- stable flying shear synchronization
- improved production quality.
For high-speed roll forming machines, encoder handling is one of the most critical aspects of PLC programming.
FAQ — Encoder Handling in PLC Systems
What is encoder rollover?
Encoder rollover occurs when the counter value reaches its maximum limit and resets to zero.
Why must PLC programs handle rollover?
Without rollover handling, the PLC may interpret the reset as a large movement, causing incorrect calculations.
How does the PLC detect direction from an encoder?
Incremental encoders provide A and B channels that allow the PLC to determine rotation direction using quadrature decoding.
What are encoder sanity checks?
Sanity checks detect unrealistic encoder values such as sudden jumps or speeds beyond the machine’s physical limits.
Why are encoders important in roll forming machines?
They provide the position and movement information required for panel length measurement and machine synchronization.
What causes encoder signal errors?
Common causes include electrical noise, cable damage, mechanical slip, or faulty encoder hardware.
The next page in the PLC Programming—Roll Forming Patterns category should be:
“Length Compensation Algorithms — Speed-Based Cut Offset Control.”