Extracting Recipe Materials and Parameters in SIMATIC BATCH via Export and Batch API
In SIMATIC BATCH, extracting an isolated formula material list and recipe parameter list from master recipes or running control recipes cannot be performed through a single native reporting button in BatchCC. While standard BatchCC export generates a complete XML recipe container, engineers needing dedicated material summaries must utilize the SIMATIC BATCH API programming interface, query the SIMATIC BATCH SQL database via reporting tools, or leverage SIMATIC Information Server templates.
Table of Contents
- Master Recipe Structure and the Formula Material List Challenge in BatchCC
- Native Export Capabilities: XML and SBX Recipe Containers
- Method 1: Extracting Material Lists Using the SIMATIC BATCH API
- Method 2: Extracting Batch Material Data via SIMATIC Information Server
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Master Recipe Structure and the Formula Material List Challenge in BatchCC
In batch manufacturing facilities operating under ISA-88 (IEC 61512) guidelines, production planners require clear visibility into raw material requirements, targeted batch quantities, and setpoint tolerances before launching batches.
In SIMATIC BATCH:
* The Recipe Model: Recipes are structured hierarchically: Master Recipe -> Recipe Unit Procedure (RUP) -> Recipe Operation (ROP) -> Recipe Phase (RPH). Materials are declared as phase input parameters (e.g., Material_ID, Target_Qty, Tolerance).
* The Operational Limitation: BatchCC provides graphical recipe authoring and batch execution, but lacks a dedicated one-click button to export a flat, consolidated formula material list spreadsheet independent of the full hierarchical recipe structure.
Native Export Capabilities: XML and SBX Recipe Containers
BatchCC provides native export functions that capture entire recipe definitions:
1. In BatchCC, expand the recipe tree to locate the target Master Recipe.
2. Right-click the master recipe and select Export....
3. Choose the export format:
* SBX (SIMATIC BATCH XML): Proprietary XML schema containing the complete technological recipe, transition conditions, allocation criteria, and parameter structures.
4. Parsing Limitation: While SBX contains all material records, extracting a clean tabular list requires custom XML parsing scripts (such as Python or XSLT transformations) to filter phase parameters.
Method 1: Extracting Material Lists Using the SIMATIC BATCH API
For automated enterprise integration (ERP/MES), Siemens provides the SIMATIC BATCH API:
* The COM/ActiveX Interface: The Batch API exposes programming objects (SB_BatchAPI) accessible via C#, Visual Basic, or Python.
* Query Workflow:
1. Initialize the API session and authenticate against the SIMATIC BATCH Server.
2. Call GetMasterRecipe(RecipeName, Version).
3. Iterate through RecipeOperations and RecipePhases.
4. Query phase parameters where ParameterType = MATERIAL.
5. Aggregate material codes, quantities, and units of measure into a structured array or export directly to CSV.
Method 2: Extracting Batch Material Data via SIMATIC Information Server
For validated reporting without custom programming:
1. Connect SIMATIC Information Server to the SIMATIC Process Historian archive storing batch execution records.
2. Select the pre-configured Batch Material Consumption report template.
3. Define the filter parameters: target master recipe, batch ID range, or production timeframe.
4. Generate the report: Information Server compiles all raw material charge quantities, actual additions, and deviations into a signed PDF or Excel document.
Verification
- In BatchCC, export the master recipe to
Recipe_Export.sbx. - Run your extraction script or Information Server report against the file.
- Cross-check the output list against the recipe phase parameters: verify that all raw ingredient identifiers, setpoint quantities, and engineering units match exactly.
Limitations and Operational Precautions
- Do Not Modify Batch SQL Databases Directly: Never execute direct SQL
UPDATEorDELETEcommands against the SIMATIC BATCH database (SBData); modifying tables manually corrupts database integrity and voids software support. - Recipe Versioning: Ensure that queries specify both the recipe name and the released version number, as active production recipes may differ from drafted engineering revisions.
- API Licensing: Using the SIMATIC BATCH API for external MES connections requires valid BATCH API communication licenses.
Engineer FAQ
- Can BatchCC export only the material list to Excel directly?
No, native BatchCC export outputs the full SBX/XML recipe structure rather than a flat spreadsheet. - Which programming languages support the SIMATIC BATCH API?
Any language supporting COM/ActiveX or .NET interfaces, including C#, VB.NET, C++, and Python. - Where are active batch materials stored during production?
Active batch data is managed in runtime memory on the SIMATIC BATCH Server and logged to the local BATCH database. - Does exporting a master recipe interrupt active running batches?
No, exporting recipe definitions in BatchCC is an offline administrative task that does not affect running batches. - What is the difference between Master Recipes and Control Recipes?
Master recipes define standard manufacturing specifications; control recipes represent individual executed production batches. - Can material tracking be integrated with SAP ERP?
Yes, enterprise MES/ERP systems frequently use the SIMATIC BATCH API or Information Server to reconcile batch materials. - How are recipe parameters designated as materials in SIMATIC BATCH?
Parameters are configured as material data types in the BATCH engineering system during recipe phase definition. - Can XML transformations convert SBX files to CSV?
Yes, standard XSLT stylesheets can parse SBX files and output flat CSV tables. - Does SIMATIC Information Server require an additional license?
Yes, SIMATIC Information Server requires server and client reporting licenses in ALM. - Where should SIMATIC BATCH API order codes be verified?
Part numbers and software package options must be validated in the Siemens Industry Mall.
Technical References
- Siemens Manual: SIMATIC Process Control System PCS 7 SIMATIC BATCH (A5E39265215-AA).
- Siemens Manual: SIMATIC BATCH API Programmer's Reference Guide.
- ANSI/ISA-88.01: Batch Control Part 1: Models and Terminology.
Related Articles
- Sizing and Ordering Full SIMATIC PCS 7 V9.0 Software and Process Object Licenses
- Why a Second AS Station is Missing in SIMATIC BATCH Configure Process Cell and How to Add It
- Resolving Unresolved Process Tags in SIMATIC BATCH Recipe Transitions with TAG_COLL
Related Tags
PCS 7, SIMATIC BATCH, BatchCC, Recipe Management, Material List, Batch API, ISA-88, Process Historian