HTML |
---|
<style>
.text-span-6 {
background-image: linear-gradient(99deg, rgba(170, 163, 239, .5), rgba(125, 203, 207, .5));
border-radius: 50px;
padding-left: 15px;
padding-right: 15px;
}
#title-text {
display: none;
}
.panelgradient {
background-image: linear-gradient(180deg, #d5def0, whitesmoke);
border-radius: 8px;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 4rem;
display: flex;
position: relative;
}
</style>
<div class ="panelgradient">
<h1 style="text-align: center;">Runtime<br>(Solution Execution)</h1>
</div> |
Introduction to the Runtime
The Runtime Environment is the active stage where a Solution starts and operates.
Executing a Solution, or starting the Runtime, involves:
- Loading all functional modules for execution
- Acquiring and processing data and updating visual displays
- Performing all tasks based on the Solution's configuration
When the Runtime Environment loads the module's configuration. Some settings, such as network addresses and database connections, can be applied according to the execution profile. Profiles enable the same solution configuration to interface with various databases and devices, accommodating different phases of the solution life cycle, such as Development, Validation, or Production.
On this page:
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Key Concepts and Terms
The purpose of the Runtime Environment is to actively operate configured solutions, executing real-time data acquisition, scripts, alarms, and all items from all modules. It represents the essential final phase of solution development, delivering the application's functionality.
Runtime
The term "Runtime" or "Runtime Environment" refers to the execution environment when the solution is running, distinguishing it from the Configuration (or Engineering, or Development) phase. "Runtime" also denotes the software components and computer processes that are in execution when the solution is started.
Execution Profile
An Execution Profile consists of settings that allow customization of database connections and device network addresses. This enables the management of different environments.
Online Configuration
This feature allows real-time modifications to a running solution without stopping its execution. Users can adapt the solution to changing requirements, enhancing flexibility and responsiveness.
Hot Updates / Hot Reload
Hot Updates are a subset of online configurations that allow the application of offline solution changes without disrupting the runtime environment. They maintain solution stability and prevent downtime, ensuring the solution remains up-to-date with the latest changes.
Build and Publish
The Build process involves compiling the solution code. The Publish process creates a read-only version of the solution for distribution in regulated sites.
Understanding the Runtime Environment
Real-Time In-Memory Database
When the solution is in execution, variables like Tags, Templates, and Assets are loaded into the memory. These variables act as a central point of reference, allowing other functional modules to request or publish values as they perform their functions. The computer process and executable responsible for maintaining the real-time database is TServer.exe. This application can run as a Windows Service or be deployed to Linux and other supported operating systems.
Startup Procedure
→ For details on the startup procedure review the Runtime Startup page.
→ For details on setting up the execution review the Solution Deployment page.
- Launching TStartup.exe
- Loads the Solutions
- Reads the Solution Configuration
- Parses Command Line Parameters
- Activates the Main Process TServer.exe.
- Starting the Real-Time Database
- TServer.exe starts by loading solution objects, tags, templates, and assets into the memory. A communication service is established, allowing other modules to start and connect.
- Modules Startup
- The other modules, such as Historian, Alarms, Devices, Scripts, Datasets, and Reports, then start their execution by reading the solution configuration and establishing a connection with the main process.
- Applying Execution Profiles
- As the modules start, they behave according to the definitions in the Execution Profiles. For instance, in Development mode, a temporary local SQLite database might be used for alarm records, while in Production mode, the Alarm Database is automatically mapped to a SQL server.
- Solution Designer Automatic Connection
- The Solution Designer automatically connects to the running solution, enabling users to monitor progress, make adjustments, and troubleshoot issues as needed using the Monitor and Diagnostics pages.
- Opening Client-Side Displays
- Operations displays, using HTML5 from any browser or high-performance WPF graphics pages, can be opened from any remote computer connected to the server.
- Applying Online Changes and Hot Updates
- During execution, the system can apply online configuration changes and hot updates without disrupting the runtime environment. This capability allows users to adapt the solution to changing requirements while maintaining high system availability.
Configuring the Runtime Environment
When developing a software solution, maintaining stability and preventing interference between various stages and components is crucial. To ensure the configuration and development aspects do not negatively impact the solution's runtime environment, use "Configuration and Runtime Process Isolation."
The Configuration Process involves setting up parameters, profiles, and other settings that define how the solution should operate.
Isolating these processes allows developers to modify configurations and test new features without disrupting the running solution, defining how the solution should opportunity depending on the Execution Profile you are running.
Runtime Configurations
Runtime Startup
The Runtime Startup section allows you to Start and Stop the execution of the Solution, specify the Execution Profile you want to use, and customize all settings connected within that execution.
The settings defined here are also applied when the Startup is executed by the StartSolution command line, or starting the solution as a Windows Server. This section focuses on the various settings you have available and starting and stopping manually.
→ Read more about Runtime Startup.
Execution Profiles
Execution Profiles enable distinct configurations for a single project, facilitating a seamless and swift transition between devices and databases.
Development, Validation, and Production are the scenarios in which the solution must operate over its lifecycle. Occasionally, these scenarios may overlap, posing risks to the entire operational environment. In this version, we introduce an intuitive method to separate these stages, enhancing both security and reliability.
→ Read more about Runtime Execution Profiles.
Build and Publish
The software platform offers support to manage solution versions, allowing the creation of a read-only version and a published version. The Build feature compiles the solution's displays and scripts for final verification before deployment in production. It ensures complete verification of an application's scripts in preparation for production. The Publish command generates a read-only protected version of a solution ready for field deployment. This command produces a new Solution file (".dbsln") with the chosen version number. The Published Solutions (".dbrun") mirror the current solution but are accessible only in read-only mode, offering a secure backup of published applications.
→ Read more about Build and Publish.
Runtime Diagnostics
This page provides a comprehensive guide on how to use diagnostic tools for project applications. These tools include the Property Watch, Trace Window, and Module Information, which offer insights into the status and operation of different modules within your application.
Property Watch is a tool designed to access and modify the system's tags and internal properties. With an Intellisense feature, it also provides a list of available objects related to a specific object type.
→ Read more about Runtime Diagnostics.
Server And Client Namespaces
There are a few runtime objects that provide information about running the solution.
The Info namespace is the main location for the runtime status. The main objects on the namespace are:
Info.Solution: information about the solution that is running
Info.License: information about the license
Info.Module: information and start/stop command to Modules
Info.Trace(): displays a message on the TraceWindow
Info.TestMode: shows if the solution is running in Test Mode
The Server namespace has information about the server computer. The Client namespace has information about each client compute that runs a graphical interface. See Namespaces for the complete programming reference on runtime objects.
Working with the Runtime
Starting and Stopping the Solution Execution
To start the solution execution, you need to launch the application or server, depending on the solution type. It is essential to monitor the system for any errors or issues during startup, as they may prevent the application from running correctly.
To stop the solution execution, you can use the appropriate command or interface provided by the runtime environment or the application itself. Make sure to shut down the application to avoid data loss or corruption.
To start the solution in production mode:
- Go to Runtime / Startup.
- Click the Run Startup button
Applying Configuration Changes
Configuration changes can be applied to the runtime environment to modify the behavior of the application. These changes can include modifying settings, adding or removing modules, or adjusting resource allocation. To apply configuration changes, follow these steps:
- Identify the configuration file or settings for your application.
- Modify the configuration settings as needed.
Restart the application or reload the configuration to apply the changes, depending on the capabilities of the runtime environment.
Best Practices and Troubleshooting
Best Practices for "Runtime Isolation"
- Use Separate Environments: Using separate environments for development, testing, and production allows working on solution configurations and features without affecting the runtime environment. Changes made during development are not reflected in the runtime environment until they have been tested and deployed.
- Use Containers: Technologies like Docker enable developers to create isolated containers for different parts of the solution. This approach ensures that modifications in one container do not impact the runtime environment in other containers.
- Use Version Control: Implementing version control helps manage solution configurations and code changes. This method allows developers to experiment with configurations, roll back to previous versions, and track changes without affecting the runtime environment.
- Use Access Control: Access control mechanisms restrict modifications to the runtime environment and configuration settings. This ensures that only authorized personnel can make changes, reducing the risk of accidental disruptions or unauthorized access.
Runtime issues can occur during the execution of the application, such as crashes, performance problems, or unexpected behavior.
Troubleshooting Runtime Issues
- Review the application logs for any error messages or warnings.
- Use debugging tools to inspect the state of the application at runtime.
- Monitor system resources, such as CPU, memory, and disk usage, to identify potential bottlenecks or resource constraints.
- Consult the documentation or support resources for known issues and solutions.
- Make sure you're using appropriate execution profiles for different stages of the development lifecycle.
- Apply configuration changes carefully, always testing before deploying to production.
- Document any custom configurations or modifications for future reference.
- Keep the runtime environment up to date with security patches and software updates.
Troubleshooting Common Issues
Performance bottlenecks: Slow solution execution can be caused by a variety of factors, such as inefficient code or inadequate hardware resources. To resolve this issue, optimize your code, allocate more resources, or employ parallel processing techniques.
Configuration errors: Incorrect settings in the solution configuration can lead to unexpected behavior or failure. Review your configuration files, verify the parameters, and ensure they adhere to the documentation.
Runtime environment mismatch: Incompatibilities between development and production environments may cause issues during runtime. To address this, ensure that all dependencies are consistent across environments and use containers or virtual machines for environment isolation.
Module conflicts: Conflicts between modules can lead to unexpected behavior or crashes. To resolve this, check for duplicate or outdated modules and ensure that your modules are compatible with each other.
Database connectivity issues: Problems connecting to the real-time database can be caused by network issues, incorrect credentials, or misconfigured database settings. Verify the database connection settings, ensure the database server is accessible, and check the credentials.
Client-side display errors: Issues with client-side displays can stem from incompatible browser versions, outdated JavaScript libraries, or improperly configured display settings. To fix this, ensure your solution supports the target browser versions, update your libraries, and double-check display settings.
Hot updates not applied: If hot updates are not being applied correctly, confirm that your solution is configured to accept online changes and verify the update mechanism is functioning as expected.
Build and publish failures: Errors during build and publish processes may be due to incorrect settings, code issues, or dependency problems. Review the build and publish configuration, fix any code issues, and ensure all dependencies are resolved.
In this section:
Easy Heading Macro | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
What is the Project Runtime
The term runtime is used to refer when a Project Configuration is in execution.
For instance, when you fill the configuration of Alarms Limits, write scripts, if the Project is not running, you only change the project configuration file. When starting the execution, that configuration is loaded to memory and the various Modules start their processing.
There are many features in our platform to assist to Run, Test and Track the modifications on your Project:
- The Run Test Mode that allows to run project in an isolated sandbox from the production execution.
- Do online modifications on the application, and Hot-swap to a new configuration without stopping the execution.
- Built-in diagnostics tools included: Module Information, Trace Window and Property Watch.
- Easily run the projects locally on a remote project server, on a remote Embedded device.
- Find all Tags and objects used by Project, and verify where and how they were used with one click.
- Locate and remove if necessary all unused objects in the Project.
- Track automatically any changes in the Project Configuration, adding custom comments and notes.
- Build process runs a deep verification and all scripts, pack the project size, and add automatically a Build Number.
- When working with critical system, like FDA regulated plants, Publish a project release with a version number and locked.
Key Concepts
Runtime
Refers to the Project when it is in execution. Project runtime can also refer to the set of programs that are loaded when a Project Configuration is loaded and running.
Application
In many contexts, Project and Application are used as synonyms, but in some cases the term Application is used to focus on the functionality that is being delivered when the Project is running, as Project would refer to its configuration.
Runtime Startup
The process of starting the application. The Project configuration is loaded by the programs (Runtime Modules) that will execute its configuration.
Real-time Database or TServer
The most important program when the Project is running is called TServer, which holds an in-memory database with the Tags defined in that Project.
Engineering vs Runtime
Engineering refers to the project Configuration. The term can be applied when writing about Licenses, software tools, and User Interfaces. As Runtime, as seen, is related to the execution of the Project.
Online Configuration
In some cases, the distinction of engineering and runtime is essential to make some solutions viable. In some cases, it is preferred to just keep the Project running all times.
The Online Configuration enables it. When the project is running, the changes you do in the configuration are immediately applied to the execution environment.
Runtime connection with the configuration
In order to allow the Online Configuration, the Runtime execution and the configuration tool (ProjectDesigner) need to have a communication connection.
When the Project is running, you can easily connect or disconnect the two environments. <<<<.image of buttons>>>>
Hot Start
If you modify the Project configuration off-line (not using the Online Configuration), when the ProjectDesigner connects with a Runtime, a Hot Start button is enabled.
The Hot Start button allows you to apply all the off-line Project modifications to the running system without stopping it.
This process of dynamically applying a new configuration without stopping the execution is called Hot Start or hot-swapping,
Test Mode and Startup Mode
The project can be executed in two isolated environments: Test and Startup.
The Startup Mode is the production environment, running with the same settings that will be used to deploy to the field or production environment.
The Test Mode allows to automatically modify database connections, scripts, debugging tools, to run the project in a development and test environment.
How to start the Project execution
You do not need to open the configuration tools, Project Designer, to run the project,. You can run directly by using the Project Management tool.
When deploying your Project in product in its final location, you can setup automated procedures to start the execution, as described in Deploying the Application.
This manual section will focus on Starting the Project execution from within the Project Designer, as it is typical to do during the development and test phase of the project.
Run Startup
To start the Project is production mode,
- Go to Run → Startup
- Click the Run Startup button
There are a few customizations you can do on how the project shall be executed, such as if the project will run in your local computer or start in a remote Server computer, which modules will be loaded, and some other settings described in this section.
Startup Computer
The TStartup (project) is launched on a connected Server PC.
This option is only enabled if the project was opened from a remote ProjectServer.
On Run → Modules, you should see two options regarding the displays affected by this setting:
- If Displays is selected — A RichClient is opened on the project server when the project is started
- If LocalDisplays is selected — A RichClient is opened on local PC when the project is started
<<<<.add title to the table>>>>
Field
Description
UserName
Enter a valid username to access the application.
Password
Enter the password that corresponds to the username.
Project Server
Read-only. Displays the IP address or the name of the computer where the project is, which is based on the configuration in the Server tab.
Port
Displays the port that FactoryStudio uses for access. For test, it uses 3201. For startup, it uses 3101. These ports must be open on the server.
PortWA
Displays the port that FactoryStudio uses for access with Windows Authentication. For test, it uses 3202. For startup, it uses 3102. These ports must be open on the server.
Use only Windows Authentication
Checks if the system can only accept Windows Authentication.
Startup Computer
Read-only. Displays whether or not the configured server is the local computer or a remote server.
Execution Path
Overrides the default execution path, which is the project file location.
Module Information
Runs the Module Information tool.
Property Watch
Runs the Property Watch tool.
Trace Window
Runs the TraceWindow tool.
Run Modules
Select which modules are executed when running the project.
Status
Shows the current status of running, connected, or disconnected.
- Click Try to Connect to connect to the running application. This is required in order to immediately apply any of your changes to the test or the startup runtime.
- Click Disconnect if you do not want your changes to immediately apply to the test or startup runtime.
Click Stop to stop the execution of the application.|
Enable Online Configuration
Select in order to your changes to immediately apply to the test runtime. You must also be connected to the running project (see status setting above).
Info |
---|
You can use Enable Online Configuration to apply changes in real-time. All changes must be saved before they can appear on a screen. |
Run Test
To start the Project is Test Mode,
- Go to Run → Test
- Click the Run Test button
The settings for the execution in Test Mode are essentially the same of the Run Startup mode, with a few extra fields.
When checked, instead of using the Database configured on Dataset → DBs→ AlarmHistorian,
the SQLite <ProjectName>.dbAlarmHistorianTest is used instead.
Note: this configuration will NOT affect the storage defined using Tag Providers.
<<. fields for other modules >>
How to Stop the Project Execution
There are a few ways to stop the running Project. All those options assume the current user has Security Authorization to shutdown the project. For information on Security, refer to Security and Users.
On Run → Startup or Run → Test, connect the project <<icon>> and click Stop.
When the project starts running, a startup status windows is presented (TStartup.exe application). A shutdown button is available at that window.
If the menu is enabled on the Operator Displays, there is the option File → Shutdown.
The property Server.Shutdown, can trigger the application to shutdown. Usually, there is a button in one of the pages, security protected, to allow operators to stop the execution when necessary.
Info | ||
---|---|---|
| ||
Closing the Window running the displays DOES NOT stop the project execution. All Modules (alarms, devices, etc.) keep running in background; only the Display Module is closed. Closing the Windows is equivalent to trigger the property Client.Shutdown, in opposition to Server.Shutdown. |
The MQTT Broker and Simulator
Our platform includes many tools to expedite your development when using MQTT. The complete overview of our Integration with MQTT is available on the MQTT documentation.
This section we will cover on how to execute two of those tools: The MQTT Broker and the MQTT Simulator.
Running the MQTT Broker
Our platform includes a built-in MQTT Broker compatible with SparkPlug B.
There are many open source and commercial MQTT Brokers available that you can use. But every time you to search and install additional tools, that weights against your development time and effort.
The embedded MQTT Broker — zero configuration required — is the perfect tool for using during the project development phase, or even in Edge or other applications that you do not need an enterprise level broker, nor administration tools.
To run the MQTT Broker:
- Go to Run → MQTT
- Click Run MQTT Broker
Running the MQTT SparkPlug B client simulator
Our platform includes a built-in MQTT SparkPlug B client simulator
<<<< some info on how is it is self and applied. >>>>
To run the MQTT SparkPlug B client simulator:
- Go to Run → MQTT
- Click Run MQTT Simulator
MQTT Simulatorn Settings
<<<< inför on how to customize the configuration and execution >>>>
The OPC UA Server simulator
Our platform includes an OPC UA server simulator to simplify the development of application when the OPC Server that shall be used for production isn't available to connect, or even it is available you prefer to do your Project development connecting with the simulator as a testing tool. For more information on using OPC with our platform, go to the OPC documentation.
To run the OPC UA Server Simulator:
- Go to Run → OPC UA Simulator
- Click Run OPC UA Server Simulator
OPC UA Server Simulator Settings
<<<< inför on how to customize the configuration and execution >>>>
<<<< note: create a new child page with the Info and Server namespaces. The client namespace shall be in Displays Code Behind.>>>>
Linux RuntimeHaving supported projects that run in Linux environments for years, we continue to make improvements to ensure your project experience in the Linux environment will be as close to the .NET experience as you can get.
You can design your projects once and ensure your end users will get the same experience regardless of which platform they use.
If opening a ProjectServer from a Linux computer, all described procedure are the same, whatever the remote computer is Windows or Linux.
For information of specific Linux Platforms, refer to the Linux Platform documentation.
In this section...
Page Tree | ||||
---|---|---|---|---|
|