Data types of Structured Text (ST)

Just like other programming languages, the IEC 61131-3 programming standard provides many different data types which include both elementary and complex ones. A data type defines how much memory capacity is needed by a variable value and by that, the largest and smallest value in the variable. 1 Elementary data types (INT, REAL, BOOL) The … Read more

Pump control with two pumps using Structured Text (ST)

Pump control with two pumps

This example describes a pump control with two pumps and three float switches in a well. The float switches are attached to cables and when the liquid rises in the well, the float switches will be activated and change their NC / NO position. The two submersible pumps M1 and M2 have been set to alternate operation mode, which … Read more

Simulation signals generated using Structured Text (ST)

Sine wave

This chapter describes simulation signals, which can be used during development and testing of the programming code. The machine or the hardware panel is often not available, when the PLC code and program needs to be tested. The hardware has possibly not arrived onsite, the machine is not built yet, or the PLC equipment is … Read more

Simple queue structure with Structured Text (ST)

ARRAY

This example describes the simplest implementation of a queue. A queue is used when e.g. there are many packages on a conveyer belt, waiting for treatment by a machine in a large plant. The packages often require information like weight, receiver, size or content. Weight gives information about a package which must be saved in … Read more