Variables

A variable is used to store information. In Antcas Control, data types do not need to be declared. You can therefore directly write a word as a variable. In addition to variables, there are also constants and other data types that can be entered directly. Everything else is recognized directly as a variable. Please note the colors in FUP programming for this.

Data Persistence

All values stored in the PLC are persistent. This means that when the server restarts, the previous states are restored. They are also retained when exporting a project.

Warning: All strings outside the UTF-8 range cannot be persistently stored. These are displayed in dark violet in the live view.

Colors

Type Color Example
Error Red invalid.
Variable Gray variable
Number Orange 10 10E3 10e-2 -1.2
Time, Date Green T#1m DT#2016-03-25-22:12:00 D#2016-03-25
String Blue 'This Is A String' "and this too" "this has a " in it!"
Constant Violet INT_MIN, INT_MAX
Boolean Value Violet NULL, TRUE, FALSE

Rules

The function blocks are calculated in reading direction according to the inputs. From left to right and from top to bottom. Variables are also written this way.

Constants such as boolean variables can be defined directly. To do this, write TRUE, FALSE or NULL. Where you do not use a value, NULL is also set. NULL stands for no value. So neither TRUE nor FALSE. The value NULL is only used internally in the program. The values NULL, 0 (as integer), '', as well as "" or "0" are evaluated as FALSE.

Make sure that output variables are never used twice, otherwise the upper variable will be overwritten and thus may be invalid. There are special exceptions, such as the Function Block MOVE. Variables in interfaces should also not be used multiple times. This is possible in a sense but can lead to unwanted behavior when restarting the PLC.

The databases for the function blocks must never be used twice. Otherwise, the last function block will always overwrite the value or the internal markers will lead to unwanted results.

Maximum Length

Each variable, including the subordinate names of the function blocks, may not exceed a length of 255 characters. The FUP editor therefore outputs an error if a variable is longer than 200 characters.

Namespaces

A namespace can always only be overwritten from bottom to top. The namespace can be easily defined by separating the variable with a dot, such as heizung.PID or heizung.modus.Fenster. Using smart namespaces greatly simplifies the overview in programming.