Skip to main content

Variables in Structured Text

Structured Text variables are divided into two distinct types:

  • 1) Local variables that are declared in the Structured Text Program:

Figure 1: Local Variable Declaration

  • 2) Global variables are declared in Structured Text Variables:

Figure 2: Global Variable Declaration

Note that Figure 2 has two variables declared differently:

  • VARIAVEL_GLOBAL: non-addressed variable of type REAL.
  • VARIAVEL_GLOBAL_MBUSS: variable with Modbus address 0 of type REAL and initial value 150.