Process solution · Garment and sewing

Automatic Pocket Setter and Sewing Machine Automation

By the ONX Control engineering team · Last updated:

In short

An automatic pocket setter sews the back pocket or coin pocket of a pair of jeans, the bellows pocket of cargo trousers or the kangaroo pocket of a sweatshirt without the operator sewing it by hand. The pocket fabric is folded by a mould, the mould carries the pocket to the right place on the trouser panel, the sewing head follows the programmed stitch path around the pocket with X-Y servo axes, the thread is cut and the finished part is dropped on the stacker. ONX Control builds the control of these machines with CODESYS, EtherCAT servo drives and an operator interface running on a panel PC.

Automatic pocket setter principle: the pocket is folded by a mould, the sewing head follows the bartack and U stitch path with X-Y servo axes in sync with the needle, the thread is cut and the panel is stacked 1 · Folding 2 · X-Y sewing 3 · Thread trim 4 · Stacking Mould Stacker Thread trim Needle main shaft X-Y speed up in fabric Axes stop while the needle is in the fabric; X-Y motion is tied to the main shaft angle, so stitch length stays constant at any speed. © 2026 ONX Control. All rights reserved. This animation may not be copied or reused without permission. Source: https://www.onxcontrol.com/en/solutions/automatic-pocket-setter-sewing-automation ONX Control ONX Control · https://www.onxcontrol.com © 2026 ONX Control. All rights reserved. This animation may not be copied or reused without permission. Source: https://www.onxcontrol.com/en/solutions/automatic-pocket-setter-sewing-automation https://www.onxcontrol.com/en/solutions/automatic-pocket-setter-sewing-automation ONX-C9ACC8FD © ONX Control · onxcontrol.com
Principle animation: shows the logic of the motion, not to scale.

How it works

A pocket setting cycle runs like this: the operator places the trouser panel on the table and the pocket fabric on the mould, then presses the pedal. The folding valves (front, side and corner folders) turn the pocket edges around the mould; the inner and outer mould clamp the pocket and carry it to the stitch position on the panel, and vacuum and the presser foot hold the fabric. The order and timing of the folds decide how clean the pocket comes out; each valve waits for the previous step to be confirmed by a sensor.

While sewing, the mould holding the fabric or the sewing head follows the stitch path with X and Y servo axes. The path comes from the pocket model's template: straight edges, corner turns, bartacks at the pocket mouth and decorative patterns. The sewing machine's main shaft (the needle) and the X-Y motion must be synchronised: while the needle is in the fabric the axes stop or slow right down, and while it is up they move to the next penetration point. So the axis motion is coupled to the main shaft angle with an electronic gear or cam, and the stitch length stays constant whatever the speed.

When the seam is finished the thread trimmer and needle air run, the mould opens and the stacker picks the panel, drops it on the pile and presses it. The machine watches for thread breaks, fabric run-out, pressure loss and safety sensors all the time; when the thread breaks, the position on the stitch path is saved and after the operator rethreads, sewing continues from the same point. Pocket models, sizes and stitch patterns are stored as recipes and model changes are made on the screen.

  1. 1

    Loading

    The operator places the panel and pocket fabric; the pedal or start button starts the cycle.

  2. 2

    Folding and transfer

    Folding valves turn the pocket edges onto the mould and the mould carries the pocket to its position on the panel.

  3. 3

    X-Y sewing

    Servo axes follow the template stitch path in sync with the main shaft angle; corners and bartacks come from the program.

  4. 4

    Trim and stack

    The thread is cut, the mould opens and the stacker drops the finished panel on the pile.

Critical parameters

Parameter Why it matters Typical range / ONX field data
Cycle time (pieces / hour) Sets shift capacity together with stitch path length, sewing speed and folding and stacking times. Defined per project
Stitch length and main shaft sync X-Y motion is coupled to the needle angle so stitch spacing stays constant at any speed; axis motion is limited while the needle is in the fabric. Defined per project
Corner and bartack path Slowing at corners and bartack patterns decide how the pocket looks and how strong it is. Defined per project
Mould and folding order Mould size, valve order and dwell times per pocket model, confirmed by sensors. Defined per project
Fabric type Denim weight, stretch and number of plies affect presser foot force, vacuum and sewing speed. Defined per project
Number of models and recipes Combinations of pocket shape, size and pattern; recipe management and changeover time are designed around them. Defined per project

ONX architecture

In the ONX architecture the machine is controlled by CODESYS running on a compact industrial PC (Nexcom NISE series). The X and Y stitch axes are driven by EtherCAT servo drives (Estun ED3L) and auxiliary axes by stepper drives; folding, mould, vacuum, thread trimming and stacking valves and the sensors connect to Crevis EtherCAT I/O modules. The stitch path and synchronised motion are calculated in the same EtherCAT cycle.

The operator interface is an application on a separate panel PC that connects to CODESYS over the network: pocket models, stitch templates, counters and alarm history are managed there. Remote desktop access is available for service, and the control PC's disk image is protected so software can be updated safely in the field.

CODESYS and X Motion

CODESYS and X Motion

Stitch path, main shaft sync, folding sequence and recipes.

Industrial PC

Industrial PC

Compact industrial PC running CODESYS and a panel PC for the operator interface.

Servo drives

Servo drives

EtherCAT servo drives for the X and Y stitch axes.

Servo motors and sizing

Servo motors and sizing

Low-inertia motor selection from mould mass and the accelerations on the stitch path.

Remote I/O

Remote I/O

EtherCAT I/O for folding and mould valves, vacuum, thread trimming, stacking and safety sensors.

Field reference

Since 2021 ONX Control has done the control of back pocket, coin pocket, bellows pocket, kangaroo pocket, bathrobe pocket, belt and J-stitch machines for a sewing automation machine builder. Besides garment workshops in Türkiye, the machines were installed in Pakistan in 2026.

On these machines control runs on CODESYS on a compact industrial PC, with Estun ED3L EtherCAT servo drives on the X-Y stitch axes and Crevis I/O modules for folding and stacking; the operator interface runs on a panel PC. The videos below show field footage of these machines.

Automatic pocket setter, bathrobe pocket: mould folding, X-Y servo sewing and stacking (33 s)
Automatic pocket setter, bathrobe pocket: mould folding, X-Y servo sewing and stacking (33 s) Watch on its own page
Kangaroo pocket setter: CODESYS CNC control and thickness algorithm (Turkish)
Kangaroo pocket setter: CODESYS CNC control and thickness algorithm (Turkish) Watch on its own page

Retrofit scenario

A typical picture on older pocket setters: a discontinued control board, stitch templates only the machine builder can change, seams that drift because stepper motors miss steps, and a cycle that has to restart from the beginning when the thread breaks. In a retrofit the moulds and mechanics are kept; the X-Y axes move to EtherCAT servos, control moves to CODESYS and templates become editable on the operator screen.

  • Listing existing moulds, valves and sensors
  • Servo sizing of the X-Y axes for stitch path acceleration
  • Transferring stitch templates and setting up main shaft sync
  • Resuming from the stop point after a thread break, with alarm logging
  • Verifying stitch quality and cycle time with sample panels

Frequently asked questions

Which pockets can an automatic pocket setter sew?

By changing the mould and template, models such as jeans back pockets, coin pockets, cargo bellows pockets, sweatshirt kangaroo pockets and bathrobe pockets are sewn with the same control platform. Mould size, folding order and stitch path are kept in a separate recipe for each model.

Why doesn't stitch length change when the machine speeds up?

The X-Y axes are coupled to the sewing machine's main shaft, that is, to the needle angle. When the main shaft speeds up the axes speed up by the same ratio, and motion is limited while the needle is in the fabric, so the distance between two stitches stays the same at any speed.

What does a servo bring over a stepper motor?

A servo motor confirms its position with an encoder; it does not miss steps and shift the stitch path when the load rises. Higher accelerations can be used at corners and bartacks, and thick denim plies cause no position error.

What happens when the thread breaks?

The thread break sensor stops the machine and the position on the stitch path is saved. After the operator rethreads, the machine carries on sewing from the same point and the part is not scrapped.

What information is needed for a quote?

Machine type and the pocket models to be sewn, number of axes and strokes, target pieces per hour, the sewing head used and the existing control system are enough for a first assessment.

Discuss your sewing automation machine with our engineers

Share your pocket models, axis layout and capacity target; we will come back with servo sizing and a control architecture proposal.

Call

Cookie Preferences

We use essential cookies to run this site. Analytics and marketing cookies for visitor statistics and ad measurement are only used if you consent.

View Policy