CONTROL
Control Keywords
With version 3.16 some new control keywords are reserved (e.g.new
or delete
, refer to Variables and constants for further
information) or used (e.g.struct
or class
, refer to Control++) byWinCC OA and cannot be used e.g. as
variable names anymore. When updating older projects to 3.18, problems can arise if you have defined one of these keywords as
a variable name. In this case you have to replace the now invalid names in the respective scripts and panels.
Script Execution
As of version 3.18, functions throw a syntax error in the following cases, which prevents the script from being executed:
- Functions that are declared as
void
but still return a value. - Functions that have a declared return value but do not return anything.
Control Functions - Empty File Path
Since WinCC OA Version 3.15 P011 following CTRL functions translate the stating of an empty file path as path to the project directory:
getFileNames()
- dir
Parameter
Starting with WinCC OA version 3.16 P001 only a valid folder path can be stated
for the dir
parameter of the function getFileNames(). Stating an actual file path
will return an empty string as the file path is no valid directory.
CNS Functions with Wildcards
SQL Queries - . before UserName
Beginning with version 3.20 the syntax check for SQL queries has been improved, which results in an error message in case of invalid usage of user names (UserName without "." as prefix).
This behavior was not explicitly validated in previous versions.
Wrong usage of user name
sQuery = "SELECT 'UserName:_online.._value' FROM '*' WHERE _DPT = "_Ui"";
Correct syntax of the SQL query
sQuery = "SELECT '.UserName:_online.._value' FROM '*' WHERE _DPT = "_Ui"";