From OpenSCADAWiki
< Documents‎ | How to
Revision as of 16:51, 14 February 2018 by FuzzyBot (Talk | contribs) (Updating to match new version of source page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Other languages:
Constr.png Generic revision and translation

Author: Roman Savochenko

If you strongly follow the main instruction, you won't encounter here any problems but if you make some doings for self, you may need also for some debugging for them. OpenSCADA provides wide possibilities to debug and observation for problems of programming into OpenSCADA of the regular user's space and for problems into same OpenSCADA and its parts.

Generic approaches for user space debugging, allowed for both LTS and Work versions, mean:

  • External attributes creation to see for the interim values and to observe for the current execution context.
  • Debug messages creation to see also for the interim values and to observe for the execution sequence.

The present debugging mechanisms were expanded into the Work version in the way:

  • User control for debugging by debug messages category, for the OpenSCADA parts and messages of the user space.
  • Specific debugging and diagnostic environment for some parts of OpenSCADA, that is: DAQ sources (controller objects) and VCA interfaces (VCA projects).

1 Current execution context debugging

The debugging method means observing for the execution context by values of the variables, interim values appending include for more details.

Current execution context of DAQ procedures you can observe into a proper page of the object of the execution context, like: the tab "Attributes" of the Logic Level parameter (Fig. 6.1), the tab "Calculation" of the Java-like based calculator (Fig. 6.2) and so on. To append some interim values you can temporary append (or set as an read-only attribute) and link some attributes to the template or append and link some IO to the function.

Fig. 6.1. Tab "Attributes" of the Logic Level parameter.
Fig. 6.2. Tab "Calculation" of the Java-like based calculator.

Current execution context of the VCA procedures (procedures of the widgets) you can observe on the tab "Attributes" of the proper page or widget of the session of the executed now project (Fig. 6.3). To append some interim values you can temporary append and link some attributes to the widget/page.

Fig. 6.3. Tab "Attributes" of a page or widget of the session of the executed now project.

2 Execution sequence debugging

The debugging methods means placing and/or enabling debugging messages and next its observing into the generic messages' archiving and observing interface (Fig. 6.4) or into the interface proper to the OpenSCADA part:

  • The tab "Diagnostics" of the controller's object of the data source (Fig. 6.5).
  • The tab "Diagnostics" of the project's object of VCA into the configurator (Fig. 6.6) or of the project's properties of the development mode of UI.Vision (Fig. 6.7).
Fig. 6.4. Generic messages archiving and observing interface.
Fig. 6.5. Tab "Diagnostics" of a controller's object of a data source.
Fig. 6.6. Tab "Diagnostics" of a project's object of VCA into the configurator.
Fig. 6.7. Tab "Diagnostics" of project's properties of the development mode of UI.Vision.

To append debug or other level's messages to self procedures you can use next functions:

  • Generic: SYS.message(), SYS.mess{Debug,Info,Note,Warning,Err,Crit,Alert,Emerg}() — To form generic messages with a custom category, then them mostly allowed to observe from the generic messages archiving and observing interface (Fig. 6.4).
  • Generic: SYS.*.messSys() — To form the system messages with the node path as a category and with the human readable path before the message. The messages will be allowed to observe into the diagnostics interface proper to the OpenSCADA part (Fig. 6.5, 6.6, 6.7).
  • VCA: this.mess{Debug,Info,Note,Warning,Err,Crit,Alert,Emerg}() — To form the system message with the category as the widget path. The messages will be allowed to observe into the VCA diagnostics interface (Fig. 6.6, 6.7).

At.png The same debug messages (the suffix is "Debug" or the level is 0), on Work version, will be allowed to observe only after the debugging enabled, the field "Least level" set to "Debug (0)" (Fig. 6.8), and category(es) of the messages checked (Fig. 6.9), for the details read here! But the debug messages enabling and disabling allows you to include the debug messages permanently into the procedures with the proper category of the place. All other, not debug, messages will show anytime, for levels more or equal to the globally set (Fig. 6.8).

Fig. 6.8. Field "Least level" set to "Debug (0)".
Fig. 6.9. Debug messages checking to debug.

At.png Internal or system parts of the controller's object of the data source enable for diagnostics from self interface by property "Level" set to "Debug (0)" (Fig. 6.5), irrespective.