LConSMC LCON_DIAM_CALC_MODE_DIVISION Configuration Guide

David Krause11 min read
Motion ControlSiemensTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

LConSMC Winder Library Overview

The Library Continuous Strip Material Control (LConSMC) is the Siemens standard function library used to compute and control winder diameter, tension, and speed in SIMOTION and SINAMICS-based strip processing machines. It is delivered as a reusable library block set in SIMOTION SCOUT (and importable in TIA Portal for SIMOTION targets) and is the recommended starting point for unwind/rewind stations in foil, paper, wire, cable, and metal-strip applications.

The library exposes a set of data blocks and a user-defined tag table (LConSMC_Tags) that parameterize the winder. The most critical calculation performed by the library is the diameter calculation, because every downstream function (tension control, taper tension, speed ratio, dancer compensation, torque pre-control) depends on an accurate reel diameter. Diameter is computed by one of several selectable diameter calculation modes, and the mode is selected through the constant tag LCON_DIAM_CALC_MODE_DIVISION.

According to the official LConSMC V3.5.4.25 Tutorial Winder 1 Seed Project documentation, the library provides at least the following output structures for diagnostic purposes:

  • winderDiag of type LConSMC_typeWinderDiag — comprehensive diagnostic data of the winder (current mode, status bits, error codes, internal states).
  • winderDiameter of type LReal — the live diameter value that the rest of the application must read.
Note: The library version referenced in this guide is LConSMC V3.5.4.25. Earlier versions (V3.0, V3.2, V3.4) use a similar tag layout but the constants table location and data block member names are identical only from V3.4 onward. Always confirm the installed version under Project > Libraries > LConSMC > Version before commissioning.

Tag Provenance and the LConSMC_Tags Constants Table

The tag LCON_DIAM_CALC_MODE_DIVISION does not appear in the data block instances of the winder FB; it is a library constant. Constants in LConSMC are surfaced to the engineer through a dedicated user tag table that the library creates on import.

To inspect or change the value:

  1. In the SIMOTION SCOUT project navigator, expand the controller node.
  2. Open PLC Tags > Libraries > LConSMC_Tags.
  3. Open the child element LConSMC_Tags Table (the constants table compiled by the library import).
  4. Filter or scroll to the user-constants area. The diameter calculation mode is exposed as LCON_DIAM_CALC_MODE_DIVISION.

When the table is opened in SCOUT, the constant has the structure shown below.

Tag Name Data Type Initial Value Visibility Comment
LCON_DIAM_CALC_MODE_DIVISION DINT / INT Mode-specific (default <0 or >1 = division) User Constants Selects the diameter calculation algorithm used by the LCon FB
Note: Because the tag lives in the user-constants area, modifying the value and recompiling the project is sufficient to switch calculation modes at the next restart. No FB instance re-instantiation is required.

Diameter Calculation Modes in LConSMC

LConSMC supports multiple winder diameter algorithms. The mode constant selects between them. The numeric values and the behavior for each mode (as observed in field installations of LConSMC V3.4 and newer) are summarized below.

Mode Algorithm Source of Diameter Typical Use Case
Mode 0 — Division mode D = (V_line / ω_shaft) × K_gear, computed from a ratio of line-side and shaft-side feedback Encoder-derived (line encoder + shaft encoder) High-accuracy winders with both a line and a shaft encoder available
Mode 1 — Thickness mode D = D_initial + 2 × t × N_layers (closed-form integration of web thickness) Counted from input turns and stored material thickness Sensorless winders, foil/paper, line-speed-driven machines without a shaft encoder
Mode 2 — Ratio mode D = (ω_shaft_ref / ω_shaft_act) × D_initial using drive-side speed ratio Drive-internal speed reference vs. actual Drives with high-resolution internal speed observers, no line encoder
Mode 3 — Hold / Fixed diameter D = D_initial (constant) Operator entry / recipe Commissioning, single-diameter test rigs, dry-run

The division name in LCON_DIAM_CALC_MODE_DIVISION reflects the legacy naming for Mode 0 (division of pulses). In current LConSMC releases, setting the constant to a value that does not match Mode 1 (Thickness) returns the library to the division / encoder-ratio path.

LCon_TypeDiamConfig Data Block Structure

The library exposes the configuration data type LCon_TypeDiamConfig. This is the structure that must be populated by the user program and handed to the LCon FB instance. Its principal members are listed below.

Member Type Default Description
shaftSpeed LReal 0.0 Winder shaft angular speed in the engineering unit configured for the axis (typically 1/s or rpm). The LCon FB reads the actual speed from the TO axis; this member carries the filtered/processed value for the calculation.
lineFeedback LReal 0.0 Linear web speed in m/s. Connected to the line encoder or the line drive's actual speed (TO Axis.actualVelocity of a virtual line axis). In Mode 1 (Thickness) this value is used for the layer-time integration if turn counting is not available.
windingShaftFeedback LReal 0.0 Raw or scaled feedback from the winder shaft sensor (encoder pulses, resolver, drive speed actual). Used by the division algorithm and for cross-check in Mode 1.
windingShaftFeedbackScal LReal 57.296 Engineering scale factor applied to windingShaftFeedback to convert from raw feedback units to a consistent angle or distance value.
diameterInit LReal 0.0 Initial reel diameter at start of a new reel (entered by the operator or from a recipe).
thickness LReal 0.0 Material thickness per layer in mm (or µm) for Mode 1.
minDiameter / maxDiameter LReal 0 / 1500 Clamp range for the computed diameter. Values outside the range are clamped and a diagnostic bit is set in winderDiag.

The 57.296 Default Scale Factor

The default windingShaftFeedbackScal = 57.296 observed in LCon_TypeDiamConfig equals 180/π (≈ 57.29577951). This is the radian-to-degree conversion factor. It appears in the default scaling because the most common configuration in LConSMC's reference winders is a winder shaft feedback in degrees per encoder cycle that the library needs to convert to a linear-diameter ratio.

The scaling relationship is:

D = (V_line / ω_shaft) × (windingShaftFeedbackScal / 2π) × K_gear

where ω_shaft is the shaft feedback expressed in revolutions per unit time. Substituting the default 57.296:

windingShaftFeedbackScal / 2π = 57.29577951 / (2 × π) = 9.5493

This 9.5493 coefficient is the canonical conversion from 1/min (rpm) to rad/s. The 57.296 default therefore corresponds to a default unit system in which the shaft feedback is delivered in rpm and the diameter calculation is expressed in millimeters with a 1:1 gear ratio. If your machine uses a different unit system (e.g., 1/s, m/s, µm), you must re-derive and overwrite windingShaftFeedbackScal.

Field practice: Do not leave the 57.296 default in production if your encoder resolution, line speed unit, or gear ratio does not match the library reference. The most common cause of an "always-wrong" diameter in field service tickets is exactly this — a leftover 57.296 scaling applied to a winder that actually uses a different feedback scaling.

Configuring Mode 1 (Thickness Mode) for Sensorless Winders

Mode 1 is the correct choice when the machine has no line encoder and no shaft encoder, only a drive-side speed signal (e.g., the SINAMICS actual speed of the winder motor and a virtual line axis built from a master line drive). In this mode the diameter is integrated from the stored material thickness and the number of turns the winder has rotated since diameterInit.

Configuration values to set when using Mode 1 (Thickness):

  1. In the LConSMC_Tags user-constants table, leave LCON_DIAM_CALC_MODE_DIVISION at any value that does not select Mode 0 (Division). The exact value depends on library release; in V3.5.4.25, Mode 1 is selected when the constant is 1. Verify the active value in winderDiag.diameterMode after first download.
  2. Populate LCon_TypeDiamConfig.thickness with the actual material thickness in mm (or µm, consistent with the diameter unit).
  3. Populate LCon_TypeDiamConfig.diameterInit with the empty-core diameter (or current diameter if hot-starting a partly wound reel).
  4. Set LCon_TypeDiamConfig.windingShaftFeedbackScal to the actual feedback scaling of your winder shaft (not necessarily 57.296). For a SINAMICS drive with feedback in 1/min and the diameter expressed in mm, the library accepts 57.296 unchanged; for any other unit system, recompute.
  5. Set minDiameter and maxDiameter to the mechanical limits of the reel (typically empty core and full reel).
  6. Wire the winder drive's actual velocity into windingShaftFeedback via the TO axis. Even in sensorless Mode 1 the shaft feedback is used as a sanity check.

Input Signal Mapping (shaftSpeed, lineFeedback, windingShaftFeedback)

The three speed signals come from physically different sources depending on the machine layout. The table below shows the canonical mapping for a sensorless unwind/rewind configuration with SINAMICS S120 drives and a SIMOTION D controller.

Tag Member Source Engineering Unit TO / Signal
shaftSpeed Winder drive actual velocity 1/min (rpm) or 1/s depending on axis configuration <WinderAxis>.actualVelocity (TO Axis)
lineFeedback Virtual line axis (master drive actual velocity scaled by gear ratio) m/s <LineAxis>.actualVelocity (TO Axis of a virtual line axis)
windingShaftFeedback Winder encoder or winder drive actual velocity, depending on sensor availability pulses/s or 1/min <WinderAxis>.actualVelocity or a separate encoder TO ExternalEncoder

For a sensorless unwind/rewind (no physical line encoder, no physical shaft encoder), both lineFeedback and windingShaftFeedback are sourced from the corresponding drive actualVelocity values. The LCon FB will tolerate this; cross-checking of the two values against the diameter integration is performed internally and surfaces in winderDiag.

Step-by-Step Configuration Procedure

The following procedure brings up a Mode 1 (Thickness) winder in a sensorless configuration using LConSMC V3.4 or newer.

  1. Verify the library version. In SCOUT open Libraries > LConSMC > Properties > Version. Confirm V3.4 or newer.
  2. Open the user-constants table. Navigate to PLC Tags > Libraries > LConSMC_Tags, open the LConSMC_Tags table, and locate LCON_DIAM_CALC_MODE_DIVISION. Set the value to 1 for Mode 1 (Thickness). Compile and download.
  3. Create the configuration instance. Declare an instance of LCon_TypeDiamConfig in the user program (e.g., dbDiamConfig). Initialize it in the startup OB.
  4. Populate the data block. In the startup logic, set:
    // dbDiamConfig members
    dbDiamConfig.diameterInit          := 0.0;        // mm — empty core
    dbDiamConfig.thickness             := 0.050;      // mm — material thickness
    dbDiamConfig.minDiameter           := 75.0;       // mm
    dbDiamConfig.maxDiameter           := 600.0;      // mm
    dbDiamConfig.windingShaftFeedbackScal := 57.296;  // 180/pi, only valid for rpm-to-rad
    dbDiamConfig.shaftSpeed            := 0.0;        // updated cyclically
    dbDiamConfig.lineFeedback          := 0.0;        // updated cyclically
    dbDiamConfig.windingShaftFeedback  := 0.0;        // updated cyclically
  5. Wire the input signals. In the cyclic OB, copy the TO axis velocities into the data block:
    dbDiamConfig.shaftSpeed           := winderAxis.actualVelocity;
    dbDiamConfig.lineFeedback         := lineAxis.actualVelocity;
    dbDiamConfig.windingShaftFeedback := winderAxis.actualVelocity;
  6. Call the LCon FB with the data block reference and read the diameter from the FB's winderDiameter output.
  7. Download and run. Observe winderDiameter in the watch table. After one full revolution the diameter must have increased by exactly 2 × thickness.

Diagnostic Tags and Verification

After download, perform the following verification steps to confirm Mode 1 is active and the diameter is integrating correctly.

Check Method Expected Result
Active mode is Thickness Inspect winderDiag.diameterMode Equals 1 (or library-specific Thickness identifier)
Diameter updates Force windingShaftFeedback to a constant value and watch winderDiameter Diameter increases linearly with time at rate 2 × thickness × n where n is the revolutions per second
Clamping behavior Watch winderDiameter against minDiameter / maxDiameter Clamp at limits, winderDiag.diameterClamped bit set
Cross-check vs. drive speed Compare winderDiameter to (v_line / ω_shaft) × (57.296 / 2π) Values agree within 1 % in steady state
Mode constant value Watch LCON_DIAM_CALC_MODE_DIVISION Equals the value written at configuration time

Troubleshooting Matrix

Symptom Likely Root Cause Corrective Action
Diameter stuck at diameterInit Mode 0 (Division) active, but no encoder feedback connected Verify LCON_DIAM_CALC_MODE_DIVISION = 1 in the user-constants table; recompile; check winderDiag.diameterMode
Diameter jumps by random amount at start Wrong windingShaftFeedbackScal (default 57.296 carried over from reference project) Recompute windingShaftFeedbackScal for the actual unit system of windingShaftFeedback
Diameter drifts up faster than the actual reel Thickness entered in µm but diameter in mm, or vice versa Confirm thickness unit vs. diameterInit unit; re-enter with consistent unit
Diameter saturates immediately minDiameter / maxDiameter reversed or set incorrectly Set minDiameter to the empty core and maxDiameter to the full reel
Tag LCON_DIAM_CALC_MODE_DIVISION not visible in the tag table Older LConSMC version (< V3.4) where the constant lives in the data block Upgrade LConSMC, or — if migration is not possible — set the equivalent data block member directly
Mode change has no effect Stale compiled program still using the old constant value Full project recompile, full controller download, restart; verify with watch table

FAQ

Where exactly is the LCON_DIAM_CALC_MODE_DIVISION tag located in the project?

In SIMOTION SCOUT, expand the controller node, open PLC Tags > Libraries > LConSMC_Tags, and double-click the LConSMC_Tags Table. The tag is in the user-constants area of that table. It is also accessible from TIA Portal once the LConSMC library has been imported into the SIMOTION target.

Which value of LCON_DIAM_CALC_MODE_DIVISION selects the Thickness mode (Mode 1)?

Set the constant to 1 in LConSMC V3.4 and newer. The active mode can be read back from winderDiag.diameterMode after download to confirm the value was applied.

What does the 57.296 default in LCon_TypeDiamConfig.windingShaftFeedbackScal mean?

57.296 equals 180/π. It is the radian-to-degree conversion factor and is the default for systems where the winder shaft feedback is delivered in rpm and the diameter is expressed in mm with a 1:1 gear ratio. For any other unit system the scale must be re-derived from the actual feedback units.

Can Mode 1 (Thickness) be used when the winder has no physical shaft encoder?

Yes. In that case, source windingShaftFeedback from the winder drive's actualVelocity via the TO axis. The library performs the thickness integration from this drive-side speed and the configured material thickness. Cross-checking against an encoder is disabled in this configuration.

Where is the live diameter value read by the rest of the application?

From the LCon FB output winderDiameter of type LReal, as documented in the LConSMC V3.5.4.25 Tutorial Winder 1 Seed Project. Diagnostic data is available in winderDiag of type LConSMC_typeWinderDiag.

Back to blog