Analysis of the control system design for S7-400 slitting and rewinding machine: how to synchronize tension, roll diameter, and speed (real engineering case)

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.


Preface: Why This Reverse Analysis Is Worth Reading

There are countless "Siemens PLC program packages" circulating online, butfew can actually be opened, understood, and referenced: either they only have compressed files without source code, or they are mislabeled and turn out to be for different models after being opened.Very few are of good quality: either they only come as compressed files without source code, or they don't live up to their name and, upon opening, are found to be for a different device model.

This project is different - it is areal, original English control program for a paper/film slitter-rewinder (also known as a Winder in the industry) S7-400, with complete and readable hardware configuration, symbol table, and all block source code. This article guides youthrough the disassembly of each file: is it really an S7-1200/1500? What's inside? How is tension/diameter/speed calculated? What exactly does OB35, a 100ms cyclic interrupt, do? And - how do you open, run, and migrate this project to TIA Portal?

After reading, you will obtain acomplete "machine function map"and a set ofReusable Rewinder Control Ideas.


I. Let's Pour Three Basins of Cold Water First: Folder Names vs. Engineering Truths

Many friends only realize after downloading that the "product" doesn't match the description. Based on file-by-file verification, let me clarify three facts to avoid you falling into traps:

#Folder Names / Promotional ClaimsActual Reading SituationImpact
1"S7-1200/1500"The internal structure of the project isS7Netze / sdb / pgs / BAUSTEIN.DBF / SUBBLK.DBTaSIMATIC Manager (STEP 7 V5.x)project; the CPU is actually measured as414-2 DP (S7-400)It cannot be directly opened using TIA Portal; it requires STEP 7 V5.x or undergoes "TIA Migration"
2"Chinese Comments"source code memo verification via GB18030/UTF-8 multi-encoding.The authentic Chinese comments are 0; the variable, network, and DB titles are alloriginal English factory comments(such as//16#13, Event class 1..., Tension setpoint selector) claiming that the "Chinese comments" are not authentic, but are purely original English factory engineering
3"complete and runnable project"containing complete block source code (SUBBLK.DBT), symbol table, hardware configuration, and MM440 parameter DB; however, the GSD for MM440/ABB and some third-party libraries need to be pre-installed on the local machine; the hardware configuration.PGcan be directly restoredand compiled and downloaded in an environment with STEP 7 + corresponding GSD installed, making it "runnable"

In a nutshell: This is a completeS7-400 classic project, with original English source code, for a rewinder program. If the title were written as "S7-1200/1500 + Chinese comments", it would mislead readers, so this article uses the actual naming format.The rewinder program. If the title is written as "S7-1200/1500 + Chinese annotation", it may mislead readers, so this article uses the actual naming format.


II. Hardware and Network Architecture (Illustrated in One Diagram)

2.1 CPU and Rack

  • CPU:CPU 414-2 DP(Site NameSIMATIC (Winder)) - S7-400 mid-to-high-end model, comes with 1× MPI/DP interface, DP port used for fieldbus.
  • Configuration files are insdb/00000001/*.PG(a total of 30+.PGsystem data blocks), including rack, power supply, interfaces, and distributed slaves.

2.2 PROFIBUS-DP fieldbus (core communication)

From sdbGSD reference can confirm the type of slave station on the bus:

slave station / deviceGSD / identificationpurposecommunication method
ET200 remote I/OTR06AAAB.GSE(PNO Class 2 32 Bit)distributed digital/analog quantity acquisition and execution (I/O address extends toI28.x / Q81.x) DP periodic I/O
ABB frequency converterABB_AC80.GSDunwind/wind/traction and other drives (PPO-05 telegram: 4 PKW + 10 PZD) DP process data
Siemens MM440MicromasterDB / Data transfer to DrivesAuxiliary drive (MICROMASTER 440 vector type)USS / DP
DP diagnosis059E.GSE(FB13 DP-Slave-System Diag)Slave offline/fault diagnosis

Engineering points: The I/O address far exceeds the local rack (up toQ81.x, I28.xat most), indicating that a large number of signals are distributed across various workstations of the machine viaET200 remote stations, which is a typical 'central CPU + distributed I/O' wiring for large dedicated machines.

2.3 HMI: WinCC host computer

  • Evidence includesWinCC Alarms(alarms),Lenght counter reset from WinCC(reset length from WinCC),M304.1: WinCC ...(WinCC bit),Tension < 60% ...alarm bit, etc.
  • The operation panel communicates with the CPU via MPI/DP, and is configured in thehOmSave7directory.

Overview of system architecture:

                    ┌─────────────────────────────┐
                    │   CPU 414-2 DP (S7-400)      │
                    │   SIMATIC (Winder)           │
                    │   OB1 主循环 / OB35 100ms     │
                    └──────────────┬──────────────┘
                                   │ PROFIBUS-DP
          ┌──────────────┬─────────┴──────────┬──────────────┐
          ▼              ▼                     ▼              ▼
     ┌─────────┐   ┌──────────┐          ┌──────────┐   ┌──────────┐
     │ ET200   │   │ ABB AC80 │          │ MM440    │   │ WinCC    │
     │ 远程I/O │   │ 变频器    │          │ 变频器    │   │ 上位机    │
     │ I28/Q81 │   │ PPO-05   │          │ USS/DP   │   │ MPI/DP   │
     └─────────┘   └──────────┘          └──────────┘   └──────────┘
   分布式信号      放卷/收卷/牵引          辅助传动        报警/配方/计长

III. Overall program structure: OB / FB / FC / DB

3.1 Organization block OB (event and scan scheduling)

The following OBs (standard STEP 7 event models) are confirmed to exist from the source code VAR_TEMP comments:

OBTypefunctions in this project (inferred from comments/calls)
OB1main loopcall sequence control (DB Sequence control), FB15/FB18, logic for each workstation
OB35cycle interrupt 100 mscore control loop: tension calculation, coil diameter/length measurement, speed ramp, interpolation, pressure roller calculation
OB40 / OB41hardware interruptHardware events such as encoder/zero speed (e.g.Zero Speed, Hardware Interrupt 2)
OB55status time base interruptstatus/communication related
OB81–OB87diagnostic/fault OBpower supply (81), rack/module (82–86),communication fault OB87(noteCommunication Fault)
OB100 / OB101 / OB102start OBfull restart / restart / cold restart (noteComplete Restart/Restart/Cold Restart)
OB121 / OB122Programming/IO Access ErrorsProgram Anomalies and Peripheral Access Protection

3.2 Function Blocks and Functions FB / FC

Clearly Appearing in Source Code:FB15, FB18, FB230(SeeFB230 DataDB),FC18, FC121, FC205(Help Flag/Edge Detection). The main control computation is encapsulated in the FB/FC called by OB35 (tension, length counting, speed ramp, etc.).

3.3 Data Block DB = Machine's Functional Map (Most Valuable Part)

From SUBBLK.DBTThe DB Title (TITLE) fully restores the machine functional modules, which is the "map" for understanding the entire equipment:

① Core Control

  • DB Sequence control(Sequential Control) - IncludingSet_Change_automatic(Automatic roll change/specification change), call FB15/FB18
  • Control DB, DB Project constants(Project constants: empty core diameter, maximum linear speed,speed limit of 500 m/min when safety door is open, maximum roll diameter, acceleration/deceleration time constant, etc.)
  • Tension DB(Tension) - Multi-segment tension setting, actual tension, tension ON/OFF
  • Rider Roll DB(Pressure roller) -RW_Diameter/RW_Dia_Filteredroll diameter, position, PID, load
  • Unwinder DB(Unwinding) - unwinding diameter, width, side shiftUW Side movement

② Motion/Length counting

  • Lenght Calculating DB(Length counting),Rewinder/Unwinder lenght calculating, Interpolation DB(Interpolation/winding curveWF Curves)
  • Speed setpoint ramp generator(Speed ramp)Crawling Setpoint(Crawling speed)

③ Slitting / Cutting tool

  • Knives statuses DB / Knives act pos DB(Slitting knife status / Actual position),Cutting Device DB(Slitting device),Trim Set DB(Trimming setting),Slitting Interface(Slitting interface)

④ Core tube / Unwinding logistics

  • Core Loading / Core Transfer / Core feeding calc. / Core Lock positioning / Core Guiders DB(Core tube feeding / Conveying / Feeding calculation / Locking / Guiding)
  • Roll Table DB(Roller table),Roll ejector DB(Unwinding),Tail Gluing DB(Tail glue)

⑤ Drive / Maintenance / Alarm

  • Data transfer to Drives, MicromasterDB, ABB Link help data, Drives Maintenance DB(Drive Data / Maintenance)
  • WinCC Alarms, Semi-auto alarms DB, Vibration DB(Vibration MonitoringRR_vibration)
  • Brake generator DB, Drums DB/Drums brakes(Drum Brake),Autostop DB
  • WF Recipies / RR Recipe DB(Winding Curve Formula / Rewinding Formula),Measured values DB, ControlsFromHMI

Conclusion: This is a high-end slitting and rewinding lineequipped with "automatic roll changing + automatic specification changing + multi-cutter slitting + automatic core tube loading and unloading + tail glue",rather than a simple single-axis winding system.


IV. Core Control Algorithm (The Soul of the Rewinder)

The following logic is derived from English comments and variable naming in theSUBBLK.DBTsource code, and is not speculated.

4.1 Tension Control: Multi-segment Tension Setting (Tension)

  • Tension Setpoint Selector: Different setpoints for different working conditions -
  • Threading tension Setpoint(threading tension)
  • Splice tension Setpoint(paper splicing/joining tension, corresponding toSplice Tension ON)
  • Standstill Setpoint(stationary tension)
  • Set Change tension level(roll changing tension)
  • The setpoints are sent to the frequency converter after being scaled and transformed byTension setpoint value scalingAfter scale transformationTension setpoint to Drives;
  • FeedbackActual tension from Siemens(actual tension) is involved in the closed loop;
  • Safety/diagnostics:Tension control ON/OFF request, Tension < 60% from setpoint(Tension insufficient, 60% alarm).

4.2 Roll diameter and length measurement: Diameter calculation using density method (Diameter / Length)

  • Length measurement:Calculate pulse widhtCalculate lenghtLenght Counter reset(Encoder pulse conversion length, can be reset by WinCCLenght counter reset from WinCC);
  • Roll diameter:Rewinder lenght calculating / Unwinder lenght calculatingCalculate real-time diameter,Rider Roll DB.RW_Diameter sutra RW_Dia_Filteredfiltering;
  • Key engineering method: UsePaper Dencity(paper density) to participate in roll diameter estimation (diameter calculation using mass method), which is more accurate than pure geometric method;
  • Limit:Unwinder Diameter stop selection, Maximum rewinder roll diameter, Winder stop limit just before the max diameter(Automatic stop when approaching the maximum winding diameter).

4.3 Speed Synchronization and Safety Speed Limit Chain (Speed)

  • Speed setpoint ramp generator: Speed ramp (soft start and stop to avoid impact);
  • Speed Setpoint to Siemens(sent to the drive),Crawling Setpoint(inching and creeping);
  • Safety Speed Limit Chain:
  • Safety Gate Open (If safety gate is closed ... do nothing. Otherwise): Linear speed limited to500 m/min;
  • , maximum linear speed limited to2400 m/min (If speed reference is more than 2400m/min... limit to 2400m/min);
  • Grading speed status:Web speed <30 / <150 / <600 m/min, Web speed at zero(zero speed).

4.4 Press roller / interpolation / vibration monitoring

  • Rider Roll: Press roller position + load +Rider Roll PID Data(PID adjustment);
  • Interpolation(interpolation): smooth transition according to theWF Curveswinding curve;
  • Vibration DB: rewinding vibration monitoring (includingRR_vibration, various measuring pointsv_8_0, etc.), for predictive maintenance.

V. I/O and symbol mapping (sampled from 1171 symbol tables)

The symbol table retains both English and German addresses (I 28.3 / E 28.3, Q 3.6 / A 3.6). Sampling key signals:

CategorySymbol (note)Address example
SafetySafety gate, emergency stopSL_SV_EMSTOP
Core tubeOS/DS core lock open/close, CP16: Core locks, Core guiders up/down, Core guiders relief pressureI/Q multi-byte
Press rollerRider roll down/up, Rider Roll PositionQ 3.6/3.7
SlittingMC8: Web cutting device turn forward/backward, Cutting device aux cylinder up/downI/Q
Tail glueTail gluing automatic button, Automatic Tail gluin selectionM/I
HydraulicHydraulic pump 41M314 / 41M414 buttonI
countingCore size counter, Lenght counter reset from WinCC, Zero SpeedM
communicationHardware Interrupt 2, variousCPxx:call points

I/O are distributed inI0.0–I28.x, Q0.x–Q81.xthrough ET200 remote stations, cooperating withPneumatic substation TB32(pneumatic station) and hydraulic pumps to form a complete execution layer.


VI. Project Highlights: 7 pieces of reusable practical experience

1. OB35 are used to form a closed loop: all real-time calculations (tension/coil diameter/speed/interpolation) are placed in a 100 ms cycle interrupt, and the main loop OB1 only performs sequence and logic, with clear structure and good real-time performance.Multi-segment tension + paper splicing tension: Setting the threading, paper receiving, standstill, and roll changing separately is crucial for the quality of the rewinding process.Set Change automaticHigh automation reduces downtime. Density method for calculating roll diameter + filteringIt is more stable than the pure geometric method and is worth learning from. A well-established safety chainSafety gate → 500 m/min, maximum 2400 m/min, graded zero/low speed status, emergency stop, vibration monitoring. Complete diagnosisOB81–87 covers power supply/module/communication faults,FB13Perform DP slave station diagnosis. WinCC deep integration: Alarm, reset length counting, and WF/RR Recipe are fully integrated.


VII. How to open, run, and migrate to TIA Portal

1. software: STEP 7 V5.x (SIMATIC Manager) + corresponding GSD (ABB_AC80, ET200 TR06AAAB, MM440); STEP 7 authorization is required.openSIMATIC Manager → Open → SelectP1289_QD.s7p. 3Make up for missing partsConfirm that the local machine has installed the GSD for ABB AC80, ET200, and MICROMASTER; otherwise, the hardware configuration will display a red error message. DownloadFirst, download the hardware configuration (including DP slave parameters), then download the blocks (OB/FB/FC/DB), and finally download the MM440 parameter DB. 5If you want to use TIA PortalImport using "Project Migration" in STEP 7 or "Migration from STEP 7" in TIA (note that only logic can be migrated from S7-400 to S7-1500, and hardware/GSD needs to be reconfigured).


8. Two Reminders for Engineers

  • Don't be Misled by Folder Names: This is a classic S7-400 project, not an S7-1200/1500; the comments are in English, not Chinese. If you intend to post it to a technical community or create a tutorial, the title should accurately be written as "S7-400 Slitter-Rewinder". Otherwise, if readers download it and find it doesn't match their expectations, they may leave negative reviews.
  • The Source Code is Readable but Not Standard AWL: The block source code is inSUBBLK.DBT(in STEP 7 internal memo format). Open it with STEP 7 to see the complete STL + comments; the extracted readable snapshot is suitable for quick keyword retrieval, but it cannot be directly compiled.

9. Frequently Asked Questions (FAQ) (Baidu Long Tail Demand)

Q1: What software should be used to open the Siemens S7-400 rewinder program?A: Use STEP 7 V5.x (SIMATIC Manager) to open the project; TIA Portal cannot directly open classic projects and requires a "migration from STEP 7"..s7pproject

Q2: How is the tension control of the rewinder implemented?A: This project implements closed-loop control in OB35 (100ms), selecting multiple tension settings based on working conditions (tape threading/paper splicing/stationary/roll changing), converting the scale and sending it to the frequency converter. The actual tension feedback participates in the closed-loop control, and there is an alarm for tension <60%.

Q3: How is the roll diameter (diameter) calculated?A: The length is calculated using encoder pulses, and the real-time diameter is estimated using the "Paper Density" method. After filtering (RW_Dia_Filtered), the machine automatically stops when it approaches the maximum roll diameter.

Q4: What is SUBBLK.DBT file, and can it be directly compiled?A: It is a STEP 7 block source code memo file that stores STL source code and comments. Opening the project with STEP 7 will display the complete block. It cannot be directly compiled as text, but can be searched.

Q5: Can S7-400 be migrated to S7-1500/TIA Portal?A: The logic (OB/FB/FC/DB) can be migrated using a migration tool; however, hardware configuration, GSD, and driver communication need to be reconfigured according to S7-1500 + new drivers.


X. Conclusion + Resources

This set of original programs for the S7-400 slitter-winder is a rare and comprehensible large-scale specialized machine samplethat can be read file by file. It uses OB35 for centralized real-time closed-loop control, multi-segment tension to ensure quality, density method to calculate roll diameter, and a complete safety chain and diagnostics to ensure reliable operation. It is of great reference value for engineers working in paper/film/printing/slitting equipment.It utilizes OB35 for real-time closed-loop control, employs multi-segment tension to ensure quality, calculates the winding diameter using the density method, and utilizes a comprehensive safety chain and diagnostics to ensure reliable operation. It is of great reference value to engineers working on paper/film/printing/slitting equipment.

*All conclusions in this article are derived from the analysis of engineering files file by file, without any external speculation. The accompanying readable source code snapshot (74,000 lines of STL text extracted from SUBBLK.DBT, and MM440 parameter AWL decoding) can be used for quick keyword search.*

Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.