Request a quote
Benešl Automation / BaLib libraries
Siemens TIA Portal V17 – V21 · SCL

Ready-made SCL libraries for TIA Portal – communication, objects and control

BaLib is sixteen commercial libraries in SCL for S7-1500, S7-1200 and S7-1200 G2: communication (Modbus, IEC 104, MQTT, M-Bus), standard objects according to NAMUR NE 107, ISA-18.2 alarms, PackML, energy and metering. Configuration is data in data blocks, the know-how in the blocks is protected, and the licence is bound to a single CPU. You can try every product in demo mode before you buy.

products, each licensed separately
16
TIA Portal versions
V17–V21
CPU families: S7-1500, S7-1200 and S7-1200 G2
3
demo mode after CPU start, no code needed
10 min

What BaLib is

Ready-made function blocks and data types in SCL that you assemble into your own TIA Portal project. Each product is a separate library with its own licence and documentation, so you use only what you need.

Ready-made blocks in SCL

Function blocks and data types for S7-1500, S7-1200 and S7-1200 G2 (G2 from TIA Portal V20). There is a separate library package for each version from V17 to V21.

Configuration by data, not by code

Modbus jobs, IEC 104 points, MQTT topics or alarms are rows in a data block. Adding a device or a quantity does not change the program.

Know-how protected blocks

The blocks are protected with a know-how password in TIA Portal. We do not supply the source code to customers; the protection hides the source and prevents the blocks from being modified.

One licence per CPU

A permanent licence bound to the CPU serial number. No dongle and no internet: the code is verified in the PLC itself. You generate the code in the customer portal.

10-minute demo after CPU start

Without a code, every product runs in full for 10 minutes after the CPU starts. Then the blocks switch to a passive state; restarting the CPU (STOP – RUN) gives you another 10 minutes. So you can try it on your own CPU before you buy.

Documentation in Czech and English

A manual for each product and a complete manual in Czech and English: blocks and data types, wiring in the program, the HMI interface, licensing and verification status. It is part of the library package.

S7-1500S7-1200S7-1200 G2TIA Portal V17V18V19V20V21

16 products

Each product is licensed and deployed separately. You assemble only the ones you need.

Communication

Modbus Pro

Modbus TCP and RTU master and slave. Jobs, value types, byte order and scaling are rows in a data block, so another device does not change the program.

fbBaMp…

Communication

Device profiles

An add-on to Modbus Pro: a device profile is a table in a DB. Ready-made profiles for SunSpec inverters and Eastron electricity meters; you add a new device type with rows, not code.

fbBaPrf…

Communication

IEC 60870-5-104

The PLC acts as a controlled station (server) for a control centre or SCADA: states, measurements, counters, commands and time synchronisation. Points are arrays in a DB; version 1 has no TLS.

fbBaI104…

Communication

MQTT

MQTT 3.1.1 client (QoS 0 and 1, retain, last will) for Mosquitto, Home Assistant, Node-RED and cloud gateways. Topics are rows in a DB. Version 1 has no TLS and no QoS 2.

fbBaMq…

Measurement and energy

M-Bus

M-Bus master (EN 13757) for electricity, water, gas and heat meters via a CM PtP, a CB 1241 or a TCP gateway. It decodes the generic DIF/VIF records, so it needs no manufacturer register map.

fbBaMbs…

Measurement and energy

Energy and metering

A universal pulse meter (S0, HSC), consumption by hour up to year and by tariff, quarter-hour maximum demand, load shedding and staged switch-on, cost calculation and sub-meter balance.

fbBaEn…

Measurement and energy

Analog

A set of blocks for measured quantities: scaling with sensor diagnostics, filters, HH/H/L/LL limits, linearisation, selection from redundant sensors (2oo3), ramp, PWM and channel supervision with OPC-style quality.

fbBaAna…

Measurement and energy

Data logger

A ring buffer in CPU memory (256 records with a time stamp and 16 values), CSV writing to the memory card via DataLog and JSON for MQTT or REST.

fbBaLog…

Control and machines

NE 107 objects

Ten standard objects: motor, motor with drive, valve, control valve, analog and binary input and output, interlock and PID with auto-tuner. Common diagnostics according to NAMUR NE 107 and a single interface structure for the HMI.

fbBaObj…

Control and machines

PackML

A machine state machine according to ISA-TR88.00.02 / OMAC PackML: 17 states, commands and modes, state times, product counters and a PackTags image for MES and OPC UA.

fbBaPml…

Control and machines

Duty rotation and sequences

Alternation and cascade of 1 to 16 drives (pumps, compressors, fans) by run time and number of starts, plus a lightweight step sequencer of up to 32 steps as an alternative to GRAPH.

fbBaSeq…

Control and machines

Batching

Dosing by weight or by volume with a coarse and a fine valve, pre-act learning and a recipe of up to eight ingredients. In any unclear state the valves close immediately.

fbBaBat…

Operation and reporting

ISA-18.2 alarms

An alarm manager over an array in a DB with the ISA-18.2 state model: acknowledgement, shelving, suppression, event log and statistics. Plus PLC diagnostics (error OBs) and support for replacing I/O modules during operation.

fbBaAlm…

Operation and reporting

Schedules

Weekly schedules for up to 16 channels with exceptions and Czech public holidays, a cycle timer, and sunrise and sunset by geographic location.

fbBaSch…

Operation and reporting

Operating hours and service

Operating hours and number of starts of machines and drives, and monitoring of service intervals in hours, starts and calendar days since the last maintenance.

fbBaSvc…

Operation and reporting

E-mail and syslog

The PLC sends e-mails via an internal SMTP relay (queue, retry, no TLS) and syslog messages over UDP. Events from up to 16 binary signals with a description and a time.

fbBaNtf…

Below each product name is the prefix of its blocks in TIA Portal. All 16 products at once may not fit into the work memory of small CPUs, for example the S7-1200 1214C; measure the actual memory use on the target CPU.

How licensing works

The licence is permanent and bound to a single CPU. It is verified in the PLC itself, so you need neither internet nor a dongle.

  1. You try it in demo mode

    After the CPU starts, each product runs for 10 minutes without a code. Restarting the CPU (STOP – RUN) gives another 10 minutes.

  2. You order

    Tell us which products you need and for how many CPUs. After your order we assign the purchased units to you in the customer portal.

  3. You generate the code in the portal

    In the customer portal you register, enter the CPU serial number (the PLC ID from the block output) and select the products. The portal issues a licence code.

  4. You enter the code in the PLC

    You write the code into a parameter of the product's licence block. It is valid permanently for that CPU and those products, also for simulation with the same PLC ID.

The licence is verified offline, so it cannot be transferred to another CPU; contact us if you replace the CPU. We do not publish prices yet: we prepare a quote on request based on the products and the number of CPUs.

Portal login and registration Request a price

What is included

The library package, documentation and access to the customer portal. You can download the demo project in the portal after a free registration.

Library package

  • A global library of the product for TIA Portal V17 to V21
  • Folders for S7-1500, S7-1200 and S7-1200 G2
  • Blocks with know-how protection

Documentation

  • Product manual in Czech and English
  • A complete manual of all 16 products
  • Wiring, HMI interface, limitations and verification status

Customer portal

  • Overview of purchased units by product
  • Generating licence codes for your CPUs
  • History of issued codes
Open the customer portal

Demo project

A ready-made program to import into TIA Portal that uses all 16 products at once. It needs no real inputs and outputs: a small simulated plant produces the signals, and data blocks prepared for an HMI show every result.

A simulated plant

A mixing tank with pumps, valves, dosing and level control. A batch runs as a PackML state machine with a step sequencer.

Fault scenarios

Switches for a leak, an emergency stop, a wire break on the level or flow sensor and a motor protection trip show alarms, diagnostics and safe states in action.

Communication ready to switch on

Modbus, IEC 104, MQTT, M-Bus, e-mail, syslog and CSV are wired but switched off until you enable them. Without a code, the demo runs for 10 minutes after the CPU starts.

The demo project compiles without errors in TIA Portal V17 to V21. We are still verifying its run on a real CPU and in PLCSIM.

Download the demo project in the portal

Verification status

We would rather be open about what is verified and what is not yet. Status as of October 2026.

Compilation in TIA Portal

All 16 products and the demo project compile without errors in TIA Portal V17 to V21 for S7-1500, S7-1200 and S7-1200 G2 CPUs (G2 from V20), both before and after the know-how protection of the blocks.

Logic in a simulator

The logic is verified offline in an SCL language simulator with about 4,800 automated tests: scenarios, random tests with invalid inputs and reference models. The simulator replaces Siemens communication and system instructions with models, so it verifies the logic of the libraries, not the behaviour of a real CPU.

Real hardware

Verification on real CPUs and devices is in progress, mainly for the communication products (Modbus, IEC 104, MQTT, M-Bus, e-mail and syslog), reading the CPU serial number, logging to the memory card and the register maps of meters and inverters. Until the tests are finished, we do not present them as verified in operation.

Version 1 limitations: IEC 104, MQTT and e-mail have no TLS (e-mail only via an internal SMTP relay), MQTT has no QoS 2. A few blocks are marked as experimental in the documentation and must not be used for safety-relevant decisions.

Frequently asked questions

Didn't find your answer? Write to us.

Which TIA Portal versions and which CPUs do you support?

TIA Portal V17 to V21 and S7-1500, S7-1200 and S7-1200 G2 CPUs (G2 from V20). There is a separate library package for each TIA Portal version.

Do I have to buy all 16 products?

No. Each product is licensed separately, and you use only the ones you need. All 16 at once may also not fit into the work memory of small CPUs.

What happens when the demo mode expires?

The blocks switch to a passive state: objects stop, sequences stand still and outputs are off. The state lasts until the CPU is restarted or a valid code is entered. Therefore do not use demo mode in live operation.

How is the licence bound, and can it be transferred?

The licence is permanent and bound to the CPU serial number (PLC ID); the code has 24 characters and is verified in the PLC offline, with no server and no dongle. It cannot be transferred to another CPU; contact us if you replace the CPU.

Will I get the source code?

No. The blocks are protected with TIA Portal know-how protection and we do not supply the source code to customers. You call the blocks from your own program through the documented interface.

How much do the libraries cost?

We do not publish prices yet. We will prepare a quote on request based on the products and the number of CPUs; just write to us via the enquiry form.

Are the libraries verified in operation?

So far they are verified by compilation in TIA Portal V17 to V21 and by simulation of the logic. Verification of the communication products on real hardware is in progress; details are in the section “Verification status”. We recommend trying each library first in demo mode on your own CPU.

Try BaLib on your own CPU

Tell us which products you need. We will send the library to try in demo mode or the demo project, and prepare a quote.

Siemens, SIMATIC, TIA Portal, S7-1500, S7-1200 and STEP 7 are trademarks of Siemens AG. BaLib is a separate product of Benešl Automation and is not a product of Siemens. Other names are trademarks of their respective owners.