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.

How it works Prices and licences

Ethernet · TCP/IP PC + OPC not needed PLCSQL Link Siemens S7 PLC SQL Server MS SQL · MySQL · MariaDB ERP MES Web Log and test data to SQL Recipes and orders to the PLC
The PLC is the SQL client. No PC, no OPC server, no annual licence.
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.

PLCSQL Link in 1½ minutes – from machine to database. Click to watch with sound.Watch the full video
PLCSQL Link in 1½ minutes – from machine to database. Click to watch with sound.

How it works

  1. 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.
  2. 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.
  3. 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.
  4. 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.

Test results from screwdrivers, logged with PLCSQL Link and shown on a web page.Watch the full video
Test results from screwdrivers, logged with PLCSQL Link and shown on a web page.

What 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.
Grafana production screen with OK, NOK and yield per station – data logged with PLCSQL Link. Click to watch the full walkthrough.Watch the full video
Grafana production screen with OK, NOK and yield per station – data logged with PLCSQL Link. Click to watch the full walkthrough.
Siemens S7-1500 – PLCSQL Link runs directly in the PLC.
Siemens S7-1500 – PLCSQL Link runs directly in the PLC.

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
PLCSQL Link comes as ready-made function blocks for STEP 7 and TIA Portal.
PLCSQL Link comes as ready-made function blocks for STEP 7 and TIA Portal.

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.