VBScript to Documented HTML — Overview

This directory contains the fully documented and converted Siemens SINAMICS drive configurator VBScript. The original single 4400-line notes.txt file has been split into logical, easy-to-read sections.

Target Audience: These files are specifically designed for web developers and personnel familiar with HTML, rather than VBScript experts.

🗂️ File Index

Start reading in numerical order to understand how the script works from top to bottom:

  1. 01_config_variables.html — The global settings, flags, setup steps, and drive lists defined at the very top of the script.
  2. 02_utility_functions.html — The shared tools like SetParam, GoOnline, and logging features.
  3. 03_drive_configuration.html — The core automation that configures the CUs and Drive Technology Objects.
  4. 04_ui_html_builder.html — The massive subroutines that dynamically write the HTML interface to the screen.
  5. 05_event_handlers.html — The event loop that listens for button clicks and manages the state machine.
  6. 06_machine_data.html — How the script loads, saves, and parses the CSV-like machine data stored in the Starter project.

🔄 How the Script Works (Flow Summary)

1. Engineer runs the script inside Siemens Starter. 2. Script sets up global configuration variables (File 01). 3. Script launches an Internet Explorer window (File 04) and writes an HTML UI into it. 4. Script attempts to load existing Machine Data from the project (File 06). - If none exists, creates default data. 5. Script enters an endless loop waiting for user input (File 05). 6. Engineer clicks a button (e.g., "Step 4 - Config Drives"): - UI sends event to `DialogEvents` (File 05). - `DialogEvents` sets `PendingCommand`. - Main loop detects command, executes `ConfigureAllDrives()` (File 03). - Script uses `SetParam` (File 02) thousands of times to write drive parameters. - Saves project. 7. Engineer progresses linearly through Steps 0 to 10.

🔢 Drive Numbering Cheat Sheet

Throughout the script, the `Index` variable refers to these physical drives:

Array IndexDrive Output NameDrive Type
1UnwindWinder
2DrawLine drive
3DrumLine drive (Drum)
4DTR1wcrLine drive
5DTR2corkLine drive
6RewindWinder
7UnwindLayarmLayarm
8RewindLayarmLayarm
9Draw2Line drive
10Draw3Line drive
11Drum2Line drive (Drum)
12Drum3Line drive (Drum)
13Draw4Line drive

📜 Revision History context

The code frequently checks `ConfigVersion = "S53b"`. Over time:


Converted and documented for web accessibility. Proceed to 01_config_variables.html.