WCCOActrl

With the aid of the control language Control value changes of different data point variables can be combined with each other. Control scripts can be created in a script editor in the attribute editor of the module GEDI. These scripts combine changes of data point variables with changes of graphics elements.

Control scripts can also be created and executed independent from the user interface manager. An arbitrary text editor can be used when creating the scripts. When executing scripts the Control manager of WinCC OA is used.

The scripts triggered with the aid of the Control manager can run an unlimited time. Also the amount of scripts that can be executed this way is unlimited. As soon as the termination condition of a script is reached also the associated Control manager is closed. When the Control manager is called the scripts are tested for syntax errors by the manager.

CAUTION: The scripts started in Control manager may not contain any instructions, query or set the graphics attributes or affect other settings of the user interface of WinCC OA.

The following syntax is used to call the Control manager:

WCCOActrl [option] [filename]

The appropriate path name of the control script is specified as fileName.

Note: A CTRL manager can be triggered under Linux using the SIGUSR1 signal. This will reload all scripts/libs.
CAUTION: Note that a control script is terminated in case of the error: WCCOActrl (0), 2005.02.07 09:21:27.532, CTRL, WARNING, 79, Index out of range, testCTRLSeman tik: 2601, res, 14. This error occurs, for example, when you use arrays and initialize three values but want to read out five.
main()
{
  int i;
  dyn_int arrs;
  for (i = 0; i <= 2; i++)
  arrs[i] = i;
  for (i = 0; i <= 5; i++)
  {
    DebugN( arrs[i] );
  }
}

For a Control manager you can also specify parameters for the script you start:

WCCOActrl [option] [filename] {parameter}

You can enter the option -n.

EXAMPLE

You can specify two parameters for the following script:

main(string p1, string p2)
{
  DebugTN(p1,p2);
}

Call a Control manager as follows:

WCCOActrl -n myScript.ctl hello world

Specific options of the CTRL manager

Option Meaning
-f scriptListFile Loads and executes all scripts included in the file <scriptListFileL>. The file must reside in the /scripts directory of WinCC OA or of the project.
-loadCtrlLibs <library.ctl>

Loads the required library for a script, for example, myScript.ctl -loadCtrlLibs myLibrary.ctl

The function "print" from the library myLibrary.ctl is called in the script myScript.ctl.

-loadAllCtrlLibs Loads a CTRL script e.g. -loadAllCtrlLibs script.ctl
-loadNoCtrlLib Loads no CTRL library listed in the config file.
-proxy <HTTP-Proxy-Server-URL> The IP address (or server name) to the HTTP proxy, which is used together with the HTTP server option.
-n Starts the CTRL manager without a connection to the Event manager.
-regsub -config

-regsubf -config

Registers a sub project.

WCCOActrl.exe -regsub -config D:\Temp\MySubProject

WCCOActrl.exe -regsub -config D:\Temp\MySubProject\config\config

WCCOActrl.exe -regsub -proj D:\Temp\MySubProject
-syntax Checks the syntax of the script and stops the manager. For details see: Semantic Check of Scripts
script-filename CTRL script which shall be executed. If no path is specified, the script must be located in the scripts folder.

Debug levels of the CTRL manager

Number Meaning
CTRL_PERF Show statistic data of CTRL performance.
CTRL_WORK Temporal output of the CTRL interpreter.