Bulk Importing Devices into Rapid SCADA 6 Excel and Database

Jason IP7 min read
Other ManufacturerSCADA ConfigurationTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

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

  1. Windows 10/11 or Windows Server 2016+ host with .NET 6/8 runtime installed, matching the Rapid SCADA 6 requirements.
  2. Rapid SCADA 6 Server and Administrator installed; verify build against the latest release tag in the scada-v6 releases page.
  3. Read/write permission on the configuration database, by default located at C:\Program Files\Rapid SCADA\Config\ScadaBase.sdf.
  4. 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.
  5. 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

Direct editing of 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.

  1. Define a single representative device on the Devices panel.
  2. Right-click the device row and choose Clone device. The dialog duplicates all input and output channels, incrementing the device name.
  3. 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.
  4. Update the Address field 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.

  1. Open SCADA-Administrator and choose File > Export > Tables. Select an empty folder; one XML file per table is written.
  2. Open Device.xml in Excel using Data > From XML or convert via a temporary CSV step.
  3. 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
  1. Save the spreadsheet to Device.csv and reconvert to Device.xml. PowerShell shortcut:
Import-Csv Device.csv | Export-Clixml Device.xml -Encoding UTF8
  1. Repeat for InCnl.xml and OutCnl.xml, ensuring all foreign keys (DeviceID, ObjNum, Signal) reference the new IDs created in step 3.
  2. Stop the SCADA-Server service.
  3. In SCADA-Administrator choose File > Import > Tables and select the modified XML folder.
  4. Click Save configuration and start the service.
  5. Verify via View > Devices; all imported rows must display without red highlighting.

The XML payload mirrors the 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.

  1. Stop the SCADA-Server service and confirm ScadaServer.exe is not holding the SDF.
  2. 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"
  1. Build a column for the auto-incrementing DeviceID in your staging spreadsheet using the formula =ROW()-1+1000, where 1000 is the next free base ID from SELECT MAX(DeviceID)+1 FROM Device.
  2. Construct the INSERT using Excel concatenation. Sample expression:
="INSERT INTO Device (DeviceID, Name, Code, Address, DriverID, NumCnl, Period, Delay) VALUES (" & A2 & ", '" & B2 & "', '" & C2 & "', " & D2 & ", " & E2 & ", " & F2 & ", " & G2 & ", " & H2 & ");"
  1. Pipe the result via sqlcecmd.exe:
sqlcecmd -d "Data Source=C:\Program Files\Rapid SCADA\Config\ScadaBase.sdf" -E -i bulk_insert.sql
  1. Insert matching InCnl and CnlBinding rows using the same generated IDs.
  2. 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

Do not bind SDF in two processes simultaneously. SQL Server Compact 3.5 uses an exclusive file lock; concurrent Administrator + 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

  1. In SCADA-Administrator, navigate to Devices and confirm row count equals the imported set.
  2. Open the Communicator view and verify that the statistic for active channels equals the sum of Device.NumCnl.
  3. Trigger Tools > Database > Check to run the consistency scan; resolve any reported FK mismatches before restart.
  4. Watch the ScadaServer.log for 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
  1. 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.

Back to blog