PLCSQL Link – your PLC talks SQL
PLCSQL Link is a set of ready-made STEP 7 / TIA Portal blocks that let a Siemens S7 PLC write log data to, and read recipes from, an SQL database – directly over the network, with no PC, OPC server or drivers in between.
- PLC
- S7-300 to S7-1500
- Database
- MS SQL, MySQL, MariaDB
- Extra hardware
- None
- Licence
- One-off, per CPU
Imagine every process value from production being available in your spreadsheet, ERP system or intranet – and every machine on the floor automatically getting the order and recipe data it needs. PLCSQL Link makes the Siemens S7 PLC an SQL client, so data moves between production and office without a PC in between.
Watch the full videoHow it works
- Add the blocks to your PLC program. PLCSQL Link is supplied as a STEP 7 Classic or TIA Portal project with ready-made function blocks and examples.
- Point it at the SQL Server. The PLC connects over its normal Ethernet port – on the CPU or a standard CP card. No extra hardware.
- Write and read data. The PLC writes log and test data and reads recipes, set-points or order data. You can also run your own SQL queries from the PLC.
- Use the data anywhere. ERP, MES, Excel, Power BI, Grafana dashboards or an intranet page reads straight from the database.
Connection status and errors are reported back to the PLC, so the HMI can show communication alarms – and the configuration can be changed from the HMI or the PLC program.
Watch the full videoWhat you no longer need
| Goodbye to | Hello to |
|---|---|
| OPC servers and Windows drivers | Data transfer verified by the PLC |
| PC software and VB scripts on the shop floor | Easy diagnostics and alarms on communication faults |
| Annual licence fees | Ready-to-use blocks for the PLC programmer |
| Extra hardware modules | Reconfiguration from the HMI or PLC program |
| Time-consuming fault finding | One place – the PLC – to look when something stops |
Typical uses
- Test data and traceability. Every test result is stored with serial number, time and station – for quality documentation and certification.
- Recipes and orders. Machines fetch the right parameters for the variant being produced, directly from the order system.
- Process and energy logging. Raw material, energy and time consumption per product or per batch.
- ERP integration. Real-time capacity and status for planning, with systems such as SAP, Dynamics C5, Navision or Axapta.
Watch the full video
Compatibility
| PLC, TIA Portal | S7-1200, S7-1500 |
| PLC, STEP 7 Classic | S7-300, S7-400, ET 200S CPU, WinAC soft PLC |
| Network | Ethernet port on the CPU or a CP card (e.g. CP 343/443) |
| Databases | Microsoft SQL Server 2000, 2005, 2008, 2012, 2014, 2016, 2017, 2019, 2022, 2025 (also Express) |
| MySQL and MariaDB – full functionality | |
| Direction | Two-way: log data to SQL, recipe and set-point data to the PLC |

News
- Tested with Microsoft SQL Server 2025. PLCSQL Link works with every version from SQL Server 2000 to 2025.
- Full support for MySQL and MariaDB. All functions now also work with MySQL and MariaDB.
- TIA Portal version for S7-1200 and S7-1500.
- Lite version for reading and writing existing tables – up to 6 columns and max. 3 data types of each kind.
- ALSMATIK A/S has owned all rights to PLCSQL Link since April 2018. All sales, support and development take place at ALSMATIK.
- PLCSQL Link featured in Siemens Industry Information, December 2013 (pp. 7–9, Danish).
Questions and answers
Do I need a PC or an OPC server?
No. PLCSQL Link runs in the PLC itself and connects to the SQL Server as a client over the PLC's standard Ethernet port. There is nothing to install on a PC in production.
Which PLCs are supported?
Siemens S7-1200 and S7-1500 (TIA Portal), and S7-300, S7-400, ET 200S CPU and WinAC (STEP 7 Classic). No extra communication module is needed – a CPU or CP with an Ethernet port is enough.
Which databases?
Microsoft SQL Server 2000 to 2025, including the free Express edition, as well as MySQL and MariaDB – all with full functionality.
Can the PLC read data as well as write it?
Yes. Communication is two-way: the PLC writes log and test data, and reads recipes, set-points or order data from the database.
What is the Lite version?
A cheaper licence for writing to and reading from existing tables in a database you already have. It is limited to 6 columns and max. 3 data types of each kind.
