Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

One of the following types is specified in the the Eventobject configuration:

  • Trigger event - the script is executed when a specified condition occurs - a value changes, a process alarm occurs on the trigger object, the required value limit occurs, and others.
    Note: with the EVENT action, the trigger event can be started from another script (synchronously or asynchronously - in this case even more than once).
  • Server event - the script executes its initialization part (between BEGIN and END) after starting (by default after the start of the D2000 Event Handler process, or after it is started by the OPENEVENT action, or after its transition to the active instance state in redundant systems). Subsequently, it is possible to call the RPC procedures that the event server implements (by using the CALL action) and, reciprocally, the event server can call the RPC procedures of other server events. Using the ON CHANGE action, the server event can be registered to be notified of a change in the value of any object - then the specified procedure is invoked.
    Note: with the OPENEVENT action, the event server can be started not only on any D2000 Event Handler process but also on the D2000 HI process. In addition, it is possible to specify the instance of the server event and thus achieve multiple openings of the Server Event within the given process.
  • Client and server event - has similar properties to the Server event, but if it is opened by the OPENEVENT action on the D2000 HI process, then the client part of the script is run in the D2000 HI process and the server part of the script is run in the D2000 SES process (which by default is run on the server). Splitting the script into two parts enables both performance optimization and combining access to the client computer and the server.
  • Unit event - such a script is a "library" that can be inserted into another event (or into a scheme) by the UNIT declaration and its PUBLIC procedures can be called by the CALL action.



Examples of scripting are included in the documentation of individual actions, however, there are also examples related to different topics:

An example of working with XML export/import, structures, and files can be found in the XML Tool.


Info
titleTip

The ESL Diagnostic Pack can be opened in the D2000 Cnf and D2000 GrEditor tools. It is used to diagnose scripts , and find out the resources used (e.g. sizes of local variables, sizes and numbers of of data containers, database transactions, connections, open JSON handles, open XML documents, and others). It is also possible to display the details of individual scripts, including the duration of individual script actions (maximum duration, total duration, number of executions), which can be used to tune the performance of scripts.

DbManager Diagnostic Pack is also available for debugging database actions.

...