Overview
Rapid SCADA is an open-source industrial automation platform distributed under the RapidScada/scada-v6 repository. The platform targets distributed telemetry, energy accounting, and large-scale SCADA deployments where engineering effort scales directly with the number of devices, channels, and views that must be defined. For projects in the 100+ device range, configuring each line on the Devices panel of the SCADA-Administrator becomes impractical without a batch import path.
This reference covers the supported strategies for inserting a large device population into Rapid SCADA without typing each row manually: built-in administrative cloning, structured export/import of the configuration database, direct SQL manipulation of ScadaBase.sdf via SQL Server Compact 3.5, and the planned third-party database gateway module. All procedures target the v6 line of Rapid SCADA as published on GitHub.
Prerequisites
- Windows 10/11 or Windows Server 2016+ host with .NET 6/8 runtime installed, matching the Rapid SCADA 6 requirements.
- Rapid SCADA 6 Server and Administrator installed; verify build against the latest release tag in the scada-v6 releases page.
- Read/write permission on the configuration database, by default located at
C:\Program Files\Rapid SCADA\Config\ScadaBase.sdf. - For SQL route: SQL Server Compact 3.5 runtime plus a query tool such as
sqlcecmd.exe, CompactView, or any ODBC driver compatible with the SDF provider. - For Excel preparation: Microsoft Excel or LibreOffice Calc; the spreadsheet is used only as a staging area and never queried directly by the SCADA service.
Understanding the Configuration Database
Rapid SCADA 6 stores all device, channel, and view definitions in ScadaBase.sdf, a SQL Server Compact 3.5 file. The Devices panel in SCADA-Administrator is a thin presentation layer over this database. Bulk configuration is therefore a database-loading problem, not a UI copy/paste problem.
| Object | Table | Purpose |
|---|---|---|
| Device | Device |
Logical device with address code, name, driver, polling parameters |
| Input Channel | InCnl |
Tag mapped to a device register/signal |
| Output Channel | OutCnl |
Command channel sent to a device |
| Channel Bindings | CnlBinding |
Maps a channel to a device number, signal number, and object number |
| View / Schema |
View, Schema
|
HMI schema elements |
ScadaBase.sdf while the SCADA-Server service is running can corrupt the cache. Stop the ScadaServer service or click Save configuration in the Administrator before bulk updates.Method 1 - Built-in Clone and Auto-Create Channels
The SCADA-Administrator ships with two accelerators that already handle small batches of devices and a large number of channels per device.
- Define a single representative device on the Devices panel.
- Right-click the device row and choose Clone device. The dialog duplicates all input and output channels, incrementing the device name.
- For each cloned device, open its channels list and select Auto create. This generates the standard channel set (data, command, status) based on the active driver profile.
- Update the
Addressfield per row (Modbus slave ID, OPC path, or custom key) by editing only that column.
This pathway covers several dozen devices in minutes. Beyond ~50 devices the channel-level editing becomes the bottleneck and Methods 2 or 3 are required.
Method 2 - Export, Edit in Excel, Re-import
SCADA-Administrator can export its Tables directory to an XML archive and accept a modified archive on import. The XML interchange format is the supported round-trip method for batch configuration edits.
- Open SCADA-Administrator and choose File > Export > Tables. Select an empty folder; one XML file per table is written.
- Open
Device.xmlin Excel using Data > From XML or convert via a temporary CSV step. - Add columns and rows for each additional device. Maintain the schema exactly:
DeviceID, Name, Code, Address, DriverID, DeviceTypeID, Kp, TagCode, Description, ParentDeviceID, Period, Delay, CmdTimeout, NumCnl, NumCmdCnl, IsCalculated
- Save the spreadsheet to
Device.csvand reconvert toDevice.xml. PowerShell shortcut:
Import-Csv Device.csv | Export-Clixml Device.xml -Encoding UTF8
- Repeat for
InCnl.xmlandOutCnl.xml, ensuring all foreign keys (DeviceID, ObjNum, Signal) reference the new IDs created in step 3. - Stop the SCADA-Server service.
- In SCADA-Administrator choose File > Import > Tables and select the modified XML folder.
- Click Save configuration and start the service.
- Verify via View > Devices; all imported rows must display without red highlighting.
ScadaBase.sdf schema version; importing XML authored against a different schema can require schema upgrade via Tools > Database > Migrate.Method 3 - Direct SQL via SQL Server Compact 3.5
For projects in the 100+ device range, generating SQL statements in Excel and executing them against ScadaBase.sdf is the fastest controlled path.
- Stop the SCADA-Server service and confirm
ScadaServer.exeis not holding the SDF. - Back up the existing configuration:
copy "C:\Program Files\Rapid SCADA\Config\ScadaBase.sdf" "C:\backup\ScadaBase_%date:~-4%%date:~3,2%%date:~0,2%.sdf"
- Build a column for the auto-incrementing
DeviceIDin your staging spreadsheet using the formula=ROW()-1+1000, where 1000 is the next free base ID fromSELECT MAX(DeviceID)+1 FROM Device. - Construct the
INSERTusing Excel concatenation. Sample expression:
="INSERT INTO Device (DeviceID, Name, Code, Address, DriverID, NumCnl, Period, Delay) VALUES (" & A2 & ", '" & B2 & "', '" & C2 & "', " & D2 & ", " & E2 & ", " & F2 & ", " & G2 & ", " & H2 & ");"
- Pipe the result via
sqlcecmd.exe:
sqlcecmd -d "Data Source=C:\Program Files\Rapid SCADA\Config\ScadaBase.sdf" -E -i bulk_insert.sql
- Insert matching
InCnlandCnlBindingrows using the same generated IDs. - Start SCADA-Server and verify devices appear and poll.
| Column | Source | Notes |
|---|---|---|
| DeviceID | Excel formula | Integer PK; gap-free not required |
| DriverID | SELECT DriverID, DriverCode FROM Driver |
Use Code column for readability |
| NumCnl / NumCmdCnl | Derived | Maintains Device.NumCnl aggregation |
| Period | CSV | Polling period in ms |
sqlcecmd sessions will fail with 0x80004005.Method 4 - Third-Party Database Gateway (Planned)
The Rapid SCADA roadmap published in the scada-v6 repository includes a data source module capable of reading device/channel definitions from external relational databases. The connector will support Oracle, MS SQL, PostgreSQL, and MySQL on the server side and will expose a SQL-based request interface from inside the configuration.
Until the gateway ships, Excel remains a staging format only and must be flattened into XML or SQL before insertion. The maintainers have explicitly stated that Excel is not a stable input for the live SCADA service.
Verification
- In SCADA-Administrator, navigate to Devices and confirm row count equals the imported set.
- Open the Communicator view and verify that the statistic for active channels equals the sum of
Device.NumCnl. - Trigger Tools > Database > Check to run the consistency scan; resolve any reported FK mismatches before restart.
- Watch the
ScadaServer.logfor polling errors on the new IDs (typical sign of address translation issues):
2025/01/15 08:42:11 Error: device 1050 channel 1 request timeout
- Confirm the Schema Editor reflects the new devices under each View tree.
Troubleshooting Matrix
| Symptom | Likely Root Cause | Corrective Action |
|---|---|---|
| Devices show in DB but not in UI | Cache not flushed after SQL | Restart SCADA-Server; click Reload in Administrator |
| Channels disabled after import | DeviceID mismatch | Reissue CnlBinding rows with correct parent |
| 0x80004005 on sqlcecmd | Lock held by Administrator | Close all SCADA tools before SQL session |
| Duplicate Device Code warning | Non-unique Code column | Append site prefix SITE1_PLANT_A_ to codes |
| Period field ignored | Driver overrides per-tag period | Set per-channel Period in InCnl instead |
Performance Notes for 100+ Device Sites
For deployments between 100 and 500 devices on a single Server host, the SQL import should be wrapped in a transaction (BEGIN TRAN ... COMMIT) to minimize SDF growth. SQL Server Compact 3.5 writes a new page on each INSERT and will not reclaim until DBCC SHRINKDATABASE runs post-commit.
If the deployment exceeds ~5,000 channels, partition devices across multiple Communicator instances and route to a single Archive. The Configuration database remains a single SDF but the runtime polling load is distributed. Memory sizing rule of thumb: 256 MB plus 8 KB per channel above 5,000 for ScadaServer.exe working set.
Reference URLs
Can Rapid SCADA read device lists directly from an Excel file at runtime?
No. Excel is not a stable input for the live SCADA service. Use the Administrator Tables export/import, clone tools, or generate INSERT statements against ScadaBase.sdf using SQL Server Compact 3.5 for bulk device loading.
What is the path to the Rapid SCADA 6 configuration database?
The default path is C:\Program Files\Rapid SCADA\Config\ScadaBase.sdf. Back this file up before any bulk SQL operation and stop the ScadaServer service to release the exclusive file lock.
How many devices can the channel auto-create plus clone workflow handle?
Cloning plus auto-create covers several dozen devices quickly. For 50+ devices, switch to XML import via File > Import > Tables or generate SQL directly against ScadaBase.sdf.
What external databases will the upcoming Rapid SCADA 6 gateway support?
The planned data source module targets Oracle, MS SQL, PostgreSQL, and MySQL. It will expose a SQL request interface so configuration can be sourced from any relational store rather than from ScadaBase.sdf.
Why does SCADA-Administrator throw a lock error during SQL edit?
SQL Server Compact 3.5 uses an exclusive file lock. Close the Administrator (or its Communicator panel) and any sqlcecmd sessions that hold the SDF before opening another session.