Geo SCADA Knowledge Base
Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.
Link copied. Please paste this link to share this article on your social media post.
Originally published on Geo SCADA Knowledge Base by Anonymous user | June 10, 2021 02:09 AM
📖 Home Back
ClearSCADA supports common programming within the core ClearSCADA product using IEC logic and scripting on mimic. These programming environments function very differently to each other and choosing one over the other can be an important decision in terms of stability, accuracy and functionality. This article details some of the common differences between the two.
Logic runs within the server and comes in a number of flavours such as function blocks, sequential function charts and structured text. Each flavour has its own strengths and weaknesses are discussed at Comparison of Logic Languages.
Scripting on mimics run at the client within ViewX and uses the Microsoft ActiveScript component to function. Various languages are supported however VBScript and JavaScript are the two common languages used and both available on most clients by default. Additional languages can be downloaded and installed, although for ease of maintenance/deployment not recommended.
Installing the Microsoft Script Debugger, available on the ClearSCADA ISO, is recommended to allow the debugging of scripting.
The following table covers various characteristics of programming and database design with an aim to guide users on the suitability of the environment for purpose:
Characteristic | Within Logic | Within Scripting |
---|---|---|
Execution | Server-side | Client-side |
Reliability | Always runs (whilst the logic driver is running) | Requires user to be logged in and to display a suitable mimic. Susceptible to network failure between client and server |
Permissions | Requires configuration permission to create and edit | Requires configuration permission to create and edit |
Security Context | Runs within the context of the ClearSCADA server | Runs within the context of the current user, both ClearSCADA and Windows environments |
Threading | Single thread running on the server, execution cannot be aborted however refer to Logic Execution for parallel handling of inputs and outputs | Single thread running on each client, execution can be aborted by other scripting or by the user |
Execution Performance | Extremely quick, although care should be taken with SQL queries as they may significantly impact server availability due to the query itself or the frequency of the query execution | Slower than logic, subject to bandwidth issues and latency on the network due to the server calls, and to both overall client and server performance |
User Interface | No interface, dialogue when manually executed asking for any input parameters | Basic form functionality and the ability to interact with mimics |
Ease of Learning | If you are used to PLC coding it is a similar concept; different to typical IT type coding | Uses Microsoft ActiveScript so a large choice of languages including VBScript and JavaScript. Plenty of resources online for reference |
ClearSCADA Documentation | Standard IEC 6-1131 language not documented, software engineering concepts not documented, extended blocks and usage within ClearSCADA is documented | Standard language and software engineering not documented, custom objects documented. Documented examples are in VBScript |
Data Type | Strongly typed | Weakly typed (language dependent) |
Error Checking | Syntax and object reference at compile time, no exception handling in code | Syntax checks are compile time, object references during runtime, exception handling in code (i.e. On Error in VBScript) |
File Handling | Limited ability to write to files (and COM ports) | Extensive functions using any installed COM libraries, for example FileSystemObject |
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.