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:
01_config_variables.html — The global settings, flags, setup steps, and drive lists defined at the very top of the script.
04_ui_html_builder.html — The massive subroutines that dynamically write the HTML interface to the screen.
05_event_handlers.html — The event loop that listens for button clicks and manages the state machine.
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 Index
Drive Output Name
Drive Type
1
Unwind
Winder
2
Draw
Line drive
3
Drum
Line drive (Drum)
4
DTR1wcr
Line drive
5
DTR2cork
Line drive
6
Rewind
Winder
7
UnwindLayarm
Layarm
8
RewindLayarm
Layarm
9
Draw2
Line drive
10
Draw3
Line drive
11
Drum2
Line drive (Drum)
12
Drum3
Line drive (Drum)
13
Draw4
Line drive
📜 Revision History context
The code frequently checks `ConfigVersion = "S53b"`. Over time:
S48 / S49: Added support for "Vector" mode drives vs "Servo".
S50 / S51: Expanded the drive list from 8 drives to 13 drives to support dual drums and extra draws.