Display the Active SIMATIC BATCH Material from a PCS 7 SFC Type in WinCC

Display the Active SIMATIC BATCH Material from a PCS 7 SFC Type in WinCC

For a SIMATIC BATCH material input (PI) in an SFC type, use the generated material setpoint output <name>_MQ to carry the active material string to the OS. Siemens' SFC V9.0 manual defines this PI output as STRING[16]; the APL interface also provides a BatchName string input that can be exposed to the OS. Then show the compiled OS tag in a WinCC I/O field or an appropriate process-object display. Confirm the exact generated port name because the reported “MO” identifier is ambiguous.

Table of Contents

Identify the Correct SFC Material Signal

In Siemens SFC for SIMATIC S7 V9.0, a PI (Process Input, parameter for input materials) has a material setpoint input <name>_M and an active material setpoint output <name>_MQ. The manual specifies <name>_MQ as STRING[16] and an OS control/monitoring (OCM) interface. This is the material string signal to inspect for the selected PI. Do not substitute the numeric tracking identifier or assume that a port literally named MO is the same connector; confirm the full generated name and data type in the SFC interface.

Method 1: Show the SFC Material Output in an OS Field

Use this approach when the compiled SFC output is available as an OS tag in the project.
1. In the SFC type's standard interface, identify the PI and its <name>_MQ material output. Confirm it is a STRING[16] material signal.
2. In the CFC chart, identify the intended SFC type instance and trace its <name>_MQ output. Confirm that the instance is connected to the material PI used by the recipe.
3. Compile the SFC/AS and OS using the project's normal PCS 7 workflow. In WinCC Graphics Designer, place an I/O field in the process picture and connect its display value to the OS tag corresponding to that SFC output.
4. In runtime, start or select a test batch with a known PI material and compare the displayed string with the material shown for that SFC instance. Verify both a populated material and the behavior when the PI is unassigned.
This method avoids adding a display block if the generated SFC output is already exposed correctly to the OS.

Method 2: Route the String Through an APL Monitor Block

The source reply proposes connecting the SFC material output to the BatchName input of an APL MonDiL instance, hiding its block icon, and displaying the OS-visible BatchName tag with an I/O field. The APL interface style guide defines BatchName as a string and marks it with S7_m_c := 'true', making it an OS-relevant monitoring variable. The style guide is dated 2010, so verify this interface against the APL version installed in the project.
1. Place or use a MonDiL instance in the CFC structure associated with the SFC instance.
2. Connect the SFC PI's active material string output <name>_MQ to MonDiL.BatchName. Confirm that both pins are string-compatible in the installed library and that the source string has not been truncated.
3. Compile the AS and OS. Use an I/O field bound to the compiled OS variable for the monitor's BatchName input. If the standard block icon is not wanted in the picture, omit or disable that icon in the project's supported manner; retain the block instance and its OS tag.
4. Verify the displayed material against the active batch and SFC instance. Do not treat the MonDiL BatchName display as proof that the material PI or recipe mapping is correct.

Material Name, Tracking Identifier and Batch Name

These are different signals. The SFC PI's <name>_MQ is the material active setpoint string in the V9.0 interface. The PI also has BATCH tracking-ID-related ports such as <name>_B and <name>_BQ; those are DINT values, not the material text. The APL monitor's BatchName is the name of the running batch, not inherently the name of a recipe material. In the proposed workaround, BatchName is being reused as a string display carrier; label the WinCC field according to the actual source so operators do not confuse material identity with batch identity.

Verification

Check the SFC type interface and compiled chart to confirm the precise PI port, its direction and data type. In runtime, test a known material selection and verify the I/O field text matches the selected material in the active SFC instance. If using MonDiL, verify the compiled OS variable corresponds to BatchName and that the displayed value updates when the active material changes. Also test an unassigned or empty material so stale text is not mistaken for the current selection.

Limitations and Operational Precautions

The source does not specify the PCS 7/SFC/APL version, the full PI interface name, or whether “MO” is a literal port name or a truncated reference. The SFC source manual used here is V9.0; the APL style guide is an older interface-conformance reference. Exact OS tag generation and graphics steps can vary with the installed release and project settings. Because BatchName normally denotes the current batch name, using it to show material can mislead future maintainers unless the process picture labels the field clearly and the CFC wiring is documented.

Engineer FAQ

Which SFC connector carries the material text? For an SFC V9.0 PI, <name>_MQ is the active material setpoint output and is STRING[16].

Is _MQ the same as a tracking ID? No. Tracking-ID fields are separate DINT connectors; _MQ is the material string output.

Can the material be shown directly in a WinCC I/O field? Yes, if the compiled SFC output is available as an OS tag in the project. Bind the field to that tag and verify the value at runtime.

Why route the value through MonDiL? The source workaround uses MonDiL.BatchName as an OS-relevant string signal. That can provide a process-object tag, but it repurposes a field normally used for batch name and must be checked against the installed APL version.

What if the port is actually named MO? Confirm its full name, direction and data type in the SFC interface. The V9.0 PI interface documents _MQ; the text “MO” alone is insufficient to identify a connector.

Technical References

Related Articles

Related Tags

SIMATIC PCS 7, SIMATIC BATCH, SFC, PI material, WinCC, MonDiL, BatchName

20 respuestas