en
cz

Programming in ST

Domat IDE and Programming in Structured Text

In building automation technologies, we usually use the FUPLA programming language (“function plan”) with functional blocks connected through signal flows. This concept has many advantages: good readability, clear commissioning and diagnostics, a certain level of protection against creating faulty code, and more. However, many experienced programmers prefer Structured Text – ST. This language allows for constructions that would be very difficult, if not impossible, to implement in FUPLA. These include loops, conditions, array handling, and bulk editing for hundreds of repetitive loops, such as zone controllers.

But how can we take full advantage of ST while maintaining the clarity of the application program? One solution is to combine ST and FUPLA, where the basic program is composed of functional blocks, with some blocks written in ST. This is probably the most common case. Another popular approach is to create a standard functional block (for example, for zone control) and call this block repeatedly in the main program written in ST. This simplifies editing—rather than connecting hundreds of inputs and outputs of functional blocks, a part of the variable name can be replaced in bulk.

In the following texts, we will explore how to work with Structured Text. We will demonstrate how to solve basic tasks efficiently, without making the application program overly complex or unclear.