Locating the SIMATIC BATCH COM API Smiley Tool and Integrating Custom Client Applications

Locating the SIMATIC BATCH COM API Smiley Tool and Integrating Custom Client Applications

In SIMATIC PCS 7 V9.0 SP2, the 'Smiley Tool' (a diagnostic sample application used to test the SIMATIC BATCH COM API interface) is no longer distributed directly on the core PCS 7 installation media or located within the local BATCH software directories. Following the release of SIMATIC BATCH V8.2, Siemens decoupled developer sample applications and source code from the standard installer to streamline product packages. The Smiley Tool executable and its complete Visual Studio C++ / .NET API source code are now distributed exclusively via Siemens Industry Online Support (SIOS) under Entry ID 92344632 ('Sample Application for SIMATIC BATCH COM API'). Although compiled originally with V8.2 references, this sample tool remains fully compatible with SIMATIC BATCH V9.0 and V9.1 COM interfaces.

Table of Contents

Executive Summary

Process manufacturing plants governed by ISA-88 batch standards often require integrating proprietary MES systems, custom lab information management systems (LIMS), or specialized scheduling tools directly with SIMATIC BATCH. Siemens provides the SIMATIC BATCH COM API to allow external software to query recipe parameters, release batches, and modify setpoints programmatically. During development, engineers frequently search for the official Siemens 'Smiley Tool' (historically bundled with the installer and named after its smiley-face icon) to validate API connectivity before writing custom code. Understanding where the sample tool resides and how its COM components register ensures rapid custom application development.

Architecture and Fundamental Mechanics

The SIMATIC BATCH COM API architecture and developer sample framework operate through standardized Component Object Model (COM) interfaces:

  1. The SIMATIC BATCH COM API Layer:
    * SIMATIC BATCH exposes its server data engine via high-level COM automation objects (sb_api.dll, BatchAPI.dll).
    * External software applications (written in C++, C#, Visual Basic, or Python via pywin32) instantiate these COM classes to interface with BatchCC and the active BATCH database (sb_data).
    * Key supported functions include: logging into the BATCH server, querying batch statuses, starting control recipes, allocating equipment units, and writing batch setpoints.
  2. The Purpose of the Smiley Tool:
    * The Smiley Tool (Smiley.exe / SimaticBatchComApiTest.exe) is an official reference application created by Siemens development teams.
    * It provides an interactive graphical interface to execute every COM API call sequentially, display returned XML payloads, and inspect BATCH server error codes in real time.
  3. Distribution Migration Post-V8.2:
    * Prior to PCS 7 V8.2, the Smiley Tool was placed in C:/Program Files (x86)/Siemens/BATCH/API/Samples.
    * In PCS 7 V9.0 and V9.1, Siemens removed developer sample projects from standard production installers to minimize attack surfaces and disk overhead.
    * The complete tool, along with Microsoft Visual Studio source solutions, is maintained centrally on SIOS under Entry ID 92344632.
    * Because COM interface GUIDs in SIMATIC BATCH maintain backward compatibility across major versions, the tool executes seamlessly against V9.0 and V9.1 BATCH servers.

Step-by-Step Implementation Procedure

Follow these procedures to acquire, configure, and execute the SIMATIC BATCH COM API Smiley Tool in PCS 7 V9.0 SP2:

  1. Download the BATCH COM API Sample Package:
    * Open a web browser and navigate to Siemens Industry Online Support (SIOS).
    * Search for Entry ID 92344632 ('Sample Application for SIMATIC BATCH COM API').
    * Download the sample archive (92344632_SimaticBatch_ComApi_Sample_App.zip).
  2. Extract and Verify Components on the BATCH Client/ES:
    * Extract the ZIP file onto your Engineering Station or BATCH Client PC.
    * The package contains:
    • The compiled test utility (Smiley.exe or BatchApiSample.exe).
    • The complete Microsoft Visual Studio source code project.
    • The SIMATIC BATCH COM API developer documentation.
  3. Register BATCH COM DLLs (If Required):
    * On a PC with SIMATIC BATCH already installed, the required COM libraries are registered automatically during setup.
    * If running on a remote developer machine, copy and register the core API DLLs using an elevated Command Prompt:
    regsvr32 "C:/Program Files (x86)/Siemens/BATCH/bin/sb_api.dll".
  4. Launch the Smiley Tool and Connect to BATCH Server:
    * Run the Smiley application (Smiley.exe) as Administrator.
    * In the connection dialog, enter the network computer name of the SIMATIC BATCH Server.
    * Enter valid Windows credentials for a user belonging to the local SIMATIC BATCH user group.
    * Click Login / Connect.
    * Verify that the status indicator illuminates green and the BATCH server version is reported.
  5. Execute Test API Calls:
    * In the tool, click Get Batch List to retrieve active and planned batches.
    * Select a specific batch and click Get Recipe Parameters to inspect phase parameters.
    * Test starting or pausing a batch from the tool interface to validate that external commands execute cleanly in BatchCC.

Verification

In the Smiley Tool interface, confirm that the batch grid populates with current plant batches matching those visible in BatchCC. Execute a test parameter read; verify that the tool displays parameter names, unit names, and setpoint values correctly without raising COM automation exceptions (0x8004...).

Limitations and Operational Precautions

The Smiley Tool is designed strictly as an engineering diagnostic and test application; it should never be used as an unattended production MES interface. Custom external applications connecting via the COM API must handle network reconnects and server redundancy switchovers gracefully.

Engineer FAQ

Why is the Smiley Tool missing from the PCS 7 V9.0 installation DVD?

Siemens decoupled developer sample code from standard PCS 7 production installation media after V8.2; it is now hosted exclusively on SIOS under Entry ID 92344632.

Can the V8.2-compiled Smiley Tool communicate with SIMATIC BATCH V9.0 / V9.1?

Yes. The underlying COM automation interfaces and GUIDs maintain backward compatibility across major PCS 7 releases.

What programming languages can use the SIMATIC BATCH COM API?

Any language supporting COM/OLE automation, including C++, C# (.NET via COM interop), Visual Basic, and Python.

Does using the SIMATIC BATCH COM API require a special license?

Yes. A SIMATIC BATCH API license (or BATCH Server package license enabling external API access) is required on the BATCH Server.

Technical References

Related Articles

Related Tags

  • SIMATIC BATCH
  • COM API
  • Smiley Tool
  • SIOS 92344632
  • BatchCC
20 respuestas