From OpenSCADAWiki
Jump to: navigation, search

Other languages:

1 Political and conceptual

Q: OpenSCADA is unclear and hard to understand one. Why is this, and are available the manuals quickstart and advanced "How to ..."?
Re: OpenSCADA has described in detail, maximum structured and formalized. But the unclarity and the complexity impression is expected. Based on the project objectives, the program is extremely modular, which means that there are a lot of configuration and usage options. On the one hand, it complicates perception, but on the other - it increases the chances of "coverage" of your particular task. In addition, you must always remember that it is difficult and unclear what is still unknown, but not necessarily because it really is. And this psychological barrier must be overcome when studying anything new. The quickstart manual is available here and the advanced "How to ..." also here.

Q: Does OpenSCADA work under QNX, FreeBSD, MS Windows, ...?
Re: OpenSCADA is developed in accordance with the principles of multiplatformity, based on the recognized world standard of POSIX and multiplatform libraries. However, due to resource constraints and the interests of the author and developers, the project is being run only on Linux. Further adaptation to other platforms is scheduled after the release of version 0.9 and at this time OpenSCADA is running on the hardware platforms x86, x86_64, ARM and the software Android platform. Support for a platform will depend on the community's interest and the availability of a separate hardware and software platform maintainer.

Q: Is it possible to operate OpenSCADA by means of a usual WEB-browser?
Re: Yes, it is possible. For a configuration of OpenSCADA from a WEB-browser there were created the modules UI.WebCfg and UI.WebCfgD; for the operational interfaces execution there was created the module UI.WebVision and for users HTML pages creation there was created the module UI.WebUser. Which all are called by the module Protocol.HTTP of the subsystem "Protocol".

Q: Does the program support adding/removing/updating of modules while they are working (without a stop)?
Re: This feature is incorporated in the program and provided by the subsystem "Modules scheduler". In fact, updating modules can occur automatically after the detection of a new version of the module.

Q: Can I create my own module for any subsystem?
Re: Yes, certainly. For the help in this task the document was created, where the architecture of the program core is practically completely described, its functions and API of the modules of various subsystems. In addition, a manual of the modules of OpenSCADA creation was created and for each subsystem created a module template for you can quickly create a new module.

2 Architectural, using and short "How to ..."

2.1 OpenSCADA core

Q: How is multilingual support provided? Can I perform localization in my native language?
Re: Multilingual support is provided on the basis of the standard of internationalization I18n. And files of internationalization of the modules are separated from a file of internationalization of the program core. It provides high-grade support of independent distribution and development of the modules to OpenSCADA. Translation of the program as a whole and modules in particular can be performed regardless of the availability of their source texts. For translation it is enough to receive *.po or *.pot files of the necessary component and to make translation of messages in the files in usual text editors from English to the necessary language. The actual files you can get from the sources texts repository of the project.

Q: How is the sharing of access organized?
Re: A security scheme similar to the UNIX OS is used. Thus, the required components are the owner, members of the group and have access triad "rwxrwxrwx". In addition, this security mechanism is integrated in the OpenSCADA Control Interface, which in turn infiltrates the entire program.

Q: In which way in OpenSCADA possible to realize inter-modular connections?
Re: Inter-modular connections can be of the following types:

  • The standard interface of access — is made by means of the virtual interface of the modular subsystems.
  • The expanded interface of access — provides export of functions of the external interface by means of the exporter module, and the subsequent connection of the importer module to these functions by means of the functions "TModule::modFunc()".
  • The user functions — any component of the program can register its own user functions ("TCntrNode::objFuncCall()"), which can be used further in an environment of the user programming of OpenSCADA.

Q: How to build OpenSCADA from the source code?
Re: The compilation of any software project from source code, in systemic language like C/C++ and above the average complexity, is a non-trivial task, especially for specific environments and environments for which adaptation has not yet been completed. To do this, you need the appropriate training and previous compilation experience. If you have the opportunity to get OpenSCADA assembled and in the form of ready-made packages for your environment, be sure to use it! If there are no packages in your environment or you deliberately want to build the program from source to an adapted environment then use the manual for build from source. Adapting to assembly and work in other environments is a much more non-trivial task, especially for those very far away from POSIX or the concept of interplatform compatibility in general, it is a separate sub-project of OpenSCADA and involves a long process such as adaptation to Android, so you do not need to mix it confidently with the simple compilation under an adapted environment!

2.2 DB

Q: Can I get data from DB directly?
Re: Yes, you can. For data bases (DB) that support SQL you can use the function SQLReq() of the related DB. Generically and for not SQL DBs you can use the access API to the DB layer of OpenSCADA in functions fieldStruct(), fieldSeek(), fieldGet(), fieldSet(), fieldDel() of the table of the DB.

2.3 Physical and logical-virtual data acquisition

Q: Where and how to perform additional logical processing of the attributes of parameters, including logical linking in one object?
Re: Any mathematical processing of the parameter attributes can be performed in the computing objects of the controller (modules of the "Data acquisition" subsystem), for example, in the block controller (DAQ.BlockCalc) and the object Controller based on the Java-like language (DAQ.JavaLikeCalc). In addition, the processing can be done at the logical level of the parameters (DAQ.LogicLev) in the subsystem "Data acquisition" modules specially designed for this (which work according to the parameter templates) or which contain the built-in realization of the mechanism of template parameters. That is, the user can form parameters with the required structure and algorithm of post-processing, forming logically related objects. The processing part can be executed directly at visualization (UI.VCAEngine). For data acquisition as a whole, see the document.

Q: Where are the scales of parameters and different signaling settings checked?
Re: Checking of scales and settings can be implemented by the controller itself, with signaling through the appropriate parameter attributes, as well as at the logical level of parameters, for "raw" data sources. In addition, this analysis can be done directly in the visual control area (VCA).

Q: Can I get (read and write) the value of the attribute of the data acquisition parameter, for example, from the UI procedure?
Re: The main interface for sharing the values of the data acquisition parameters with the elements or attributes of the corresponding part of OpenSCADA is the static link that is fastest. However, the internal language and the dynamic object model of the nodes of OpenSCADA allow you to dynamically access the objects of the attributes of the data acquisition parameters, for example, you can get the value of the attribute by the function get().

Q: How can I save-restore the modified data at the logical level?
Re: Indeed, it may sometimes be necessary to save and then recover, preferably at restart, some of the modified dynamic data, such as equipment mileage meters. In general, the processing of this type of data and equipment needs to be done on the logical level of the subsystem "Data acquisition", but it can be implemented in many ways, which involves storing data in a certain repository and further restoration of them, however, the more well-known methods are:

  • Periodic, or when stop, to save the context of the template parameters by requesting the OpenSCADA user API via cntrReq():
  • If the attribute of the template with the counter is archived then at the start of the parameter you can get the last value from this archive, for example, as follows:
if(f_start)    prevArchRestore = false;
if(!prevArchRestore && (archEnd=this.cntr.arch().end("FSArch.1s"))) {
    SYS.messInfo("testArch", "val="+this.cntr.arch().getVal(archEnd)+"; "
               "val1="+this.cntr.arch().getVal(archEnd,false,"FSArch.1s")+"; "
    cntr = this.cntr.arch().getVal(archEnd);
    prevArchRestore = true;
  • Create a custom database table and write/read this data directly into this table through SQL-queries by SQLReq().

Q: Is it possible, and how is the reservation of parameters implemented?
Re: Like any post-processing, parameter reservation is performed by the logical level by creating a parameter template that implements the ability to describe in a single parameter several typical sensors that will have their own attributes of values. The resultant value of the sensors will fit into the generalizing value attribute.

2.4 Archiving and history

Q: How is the value of archiving cycles determined?
Re: Archiving is an independent task from the controllers and their parameters, and it is executed by the modular subsystem "Archives-History". What and how to archive is determined personally for each attribute parameter. There are two archiving modes: passive and active. Passive archiving is determined by the cyclicity of obtaining data by the controller — the cycle of the data collection module. Active archiving is provided by the task of the archiving subsystem and regardless of the cycle and method of the data acquisition by the DAQ module.

Q: Is it possible to work with streaming data?
Re: Streaming and packet acquisition work in conjunction with the archive and its buffer. That is, the source, having received a packet/data block, directly places it in the parameter attribute archive, or receives the package from the buffer, in the stream output.

Q: Can I export archived data (history) to a different format, say — CSV, Excel?
Re: In general, you can export archived data, and here are three features, that is: location, formats and export mode. Since the end user for whom this data is being formed is the user of the end visual interface — operator, the built-in export function is provided by these interfaces for the data primitives of the diagram and the document where you can export to CSV, image file and HTML. With regard to other data formats, especially closed and one-platform formats, such as Excel, then their export can be implemented by a user procedure through the common user interface of the visualization as a direct formation, if the format is simple, and the call of the external transformation utility, if available. Exports generally can be in two modes: interactive and flowing. It is the interactive mode embedded in the user interface and it involves determining the range and quality of data (the primitives data) as the limiting factors of the advisable execution time of this operation. The flowing mode provides a background, possibly even with the main processes, exporting both current data and local archive data and is often used to export to a database table with the desired structure. Exporting from the developer environment, like the flowing mode, do not have embedded functions, except for experimental ones such as WAV exports. This can, if necessary, be implemented by service procedure or part of the code of the main process for the flowing mode.

2.5 User interfaces

Q: How is the speech signaling carried out?
Re: The speech signaling, as well as other methods of the signaling, is an element of the subsystem "User interfaces" and organized into the modules of visual control area (VCA), and exactly into VCA engine modules UI.VCAEngine and visualizers UI.Vision and UI.WebVision.

Q: How can I rapid and correct change aspect ratio of the screen of the user visual interface to different one, for example to 16:9?
Re: Yes, the main user visual interface of OpenSCADA based on a conception of signal objects, and its root page, means and was designed to the aspect ration 4:3. For generic VCA projects there have planed implementing for proper styles of the different aspect rations but mnemo-schemes should be left untouched. Then for manually, rapid and correct changing the aspect ratio to 16:9 you must now do following, into your VCA project tree:

  • Set, or multiply to original one, the attribute "Geometry: x scale" (geomX) to value (16/9)/(4/3) = 1.333, for:
    • the root page;
    • all template pages like "Graphics group", only into the page used as the template;
    • all pages of the documents and control panels, individually.
  • Due pages of mnemo-schemes rarely allow for changing the original aspect ratio by using true figures like to circles and squares there we must develop the cadres initially into the size [900*1.333 x 550] = [1199 x 550].

Q: How can I connect the visualizer UI.Vision to a remote visualization server or PLC with this function?
Re: Yes, you are allowed for creation of visualizer servers and PLCs based on the module UI.VCAEngine with all VCA data of the user visualization projects on their and obliviously with OpenSCADA installed there. Next you are allowed for a connection to the remote visualization servers or PLCs by the module UI.Vision for locally developing and visualization of the remote user visualization projects. The detailed instruction you can get into the Quick Start manual's part "Connecting and using remote and background configurations" and here you have get a short instruction. This short instruction also usable to get remote control of the visualizer servers and PLCs. To do that you must follow next procedure on a client station with the module UI.Vision and any configuration include pure-empty one:

  • Create a connection to the visualizer server or PLC as an OpenSCADA station on the transports page of any OpenSCADA configurator, into the "System" mode. If you will set also the "User" mode you will be allowed to control the remote station from the configurator and user, after the navigation tree updating.
  • Select on the visualizer page of any OpenSCADA configurator: a new connection, start user, user's password of the remote station and a project or projects for their automatic execution, else you will get into the developing mode. Next starting of the module UI.Vision should cause establishing of the remote connection to the visualizer server or PLC with their projects developing or execution.

Q: How can I start OpenSCADA automatically with a proper user operation interface — a project of supervisory control?
Re: Of course, after the developing process finish you must ensure the program starting together with the operational system starting and into full-screen execution of the result project of the user operation interface. For these you must follow next procedure:

  • Ensure system specific measures for same OpenSCADA starting with your project. There you must pre-create or find a desktop icon of your project of OpenSCADA from the manager of projects OpenSCADA and copy or place it to folder or list of auto-started programs of your desktop environment. See to documentation of the desktop environment for the details.
  • Select the module UI.Vision starting with OpenSCADA generic starting into the "Qt modules for startup" field of the module UI.QTStarter from any OpenSCADA configurator.
  • Select your project of VCA to automatic its execution into the field "Run projects list" of the module UI.Vision from any OpenSCADA configurator. Here we also recommend to set an user different from system ones for projects execution but in the permissions for the project of course.

Q: The user operation interface starts in full-screen and I am unable to close it for gain access to the system desktop environment!
Re: Of course, OpenSCADA protects the control system from closing and unprivileged access to the system desktop environment. Then, for gain access to the system desktop environment, you must be a privileged user into the user operation interface, change the interface user to your account and into the appeared global menu do needed one: disable the full-screen mode, close or quit the program.

3 Problems

Q: Why I lost the fractional part into all values of the loaded data of the real type?
Re: You use a locale different from "C" or most English one, which are directly set by the environment variable "LC_NUMERIC" or its generic variant "LC_ALL", which caused to use into system functions like to atof() and sprintf() the fractional part separator symbol different from "." (dot), it is mostly "," (coma). Then never set directly the environment variables "LC_NUMERIC" and "LC_ALL" but that overrides "LC_NUMERIC" correct setting to "C" internally! For the program language changing use only environment variables "LANG" and "LANGUAGE" which enough anytime.

Q: "No permission for create real-time policy for '****'. Default thread is created!"
Re: Such an OpenSCADA message is generated when an attempt is made to set a real-time policy for a thread-task, with a priority greater than 0, in the case of starting from the normal user. Potentially these rights can be provided by editing the file "/etc/security/limits.conf" in the following way:

user    hard    nice    -20 
user    soft    nice    -15 
user    hard    rtprio  99 
user    soft    rtprio  90

Q: I observe the lack of all text labels on the charts (primitive "Diagram") of the UI.WebVision module interfaces. Why so?
Re: This result is possible on interfaces constructed on the GD library, and if this library is compiled without using the FontConfig library. Currently only UI.WebVision module uses this library for the exclusive construction of the "Elementary Figure" and "Diagram" primitives. Therefore, to fix this problem, you must install the correct library package or build the library yourself with FontConfig. Currently, there is one such instance of the problem with the "libgd2-noxpm" package of the older versions of the Linux Debian distribution where you must install the correct "libgd2-xpm" package.