You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »


Scripts Module Overview

The Scripts module enables server-client programming and parallel execution using .NET (C#, VB.NET) and Python 3, providing the foundation for high-performance custom logic and data processing.

Scripts Module links: How-to Guide, Reference 

The Scripts Module enables the easy creation of server-client programming and parallel execution. Allowing interoperability of .NET (C#, VB) and Python 3, it it the foundation module to hight performance and flexible application. 

The Script MåΩodule implements:

  • Tasks: code execute in reaction to events, or time-based.

  • Classes: Library of methods for server and client execution 

  • Expressions: optimized event execution or tags changes, and other trigger conditions. 

On this Page:


Key Concepts

  • *ScriptTask*: Code that executes in response to events or time-based triggers
  • *ScriptClass*: Library of reusable methods for server and client execution
  • *ScriptExpression*: Single-line code for simple event responses
  • *References*: External DLLs included for script compilation

What It Does

  • Executes custom business logic and data processing
  • Provides server-side and client-side code execution
  • Handles event-driven and time-based automation
  • Enables data normalization and enrichment
  • Integrates with third-party .NET and Python libraries
  • Supports multi-threaded parallel execution

Configuration Workflow

Scripts Module Configuration Workflow

Step

Action

Description

Create ScriptClasses

Build function libraries

Define reusable methods for your solution

Create ScriptTasks

Implement business logic

Add data processing and automation code

Create ScriptExpressions

Add simple actions

Single-line responses to events

Add References

Include external libraries

Import DLLs for extended functionality



Runtime Behavior

Execution Environment

The server creates dedicated processes with multi-threading to execute tasks and expressions based on configured triggers. Each process runs in isolated application domains for security and performance.

Client-Server Architecture

A service enables client displays and distributed modules to request server-side class execution, providing centralized logic accessible from any client.

Performance Monitoring

Built-in diagnostics track execution time for each task, enabling performance optimization and troubleshooting.


Features Highlights

  • *Multi-Language Support* - C#, VB.NET, Python 3, and JavaScript in a single solution
  • *Integrated Code Editor* - IntelliSense, debugging, breakpoints, and step-through execution
  • *Server and Client Domains* - Scripts execute globally (server) or locally (client)
  • *Flexible Triggers* - Date, time, condition, calendar, tag change, or interval-based execution
  • *Native Object Access* - Direct IntelliSense access to tags, datasets, alarms as .NET objects
  • *Python Configuration* - Configure any Python interpreter version per project
  • *Isolated Execution* - Scripts run separate from real-time database for stability
  • *Code Translation* - Convert between C# and VB.NET anytime
  • *Third-Party Integration* - Import and use external .NET assemblies and Python packages
  • *Multi-Threaded Processing* - Parallel task execution for maximum performance




  • No labels