Project execution and Runtime designate the active stage where a project operates. This involves the utilization of functional Modules, data acquisition and processing, updating visual displays, and carrying out other tasks in accordance with the project's specified configuration. This stage is critical as it operationalizes the project's functionalities.
The runtime environment consists of all the Modules loaded and operating according to the project configurations. This setup is directed by Execution Profiles, which guide the project's connections and actions. These profiles enable the same project configuration to interface with various databases and devices, accommodating different phases such as Development, Validation, or Production.
A distinct feature of this runtime framework is its Online Configuration. This supports real-time adjustments to an actively running project without causing any disruption to its execution. Additionally, Hot Updates facilitate the seamless integration of offline project changes, ensuring flexibility and adaptability in the continuing runtime environment
On this page:
The purpose of the Runtime and Project Execution is to actively operate the configured projects, execute real-time data-acquisition, scripts, alarms, and all project configured items from all Modules.,t is an essential and final phase of the project development, effectively delivering its functionality.
The term Runtime, or Runtime environment, refer to the execution environment operates. It is used to do a differentiation from the Configuration (or Engineering, or Development) phase. The term Runtime is also use to refer the software components and computer processes in execution.
An execution profile is a set of configurable settings that allows customization during runtime of Database Connections, Device Network addresses, facilitating the management of different environment. It allows to setup the connections used during the Development, Validation and Production phases, to their settings, still having only project configuration file.
This feature enables real-time modifications to be made to a running project without stopping its execution. It allows users to adapt the project to changing requirements, improving flexibility and responsiveness.
Hot updates are a subset of online configuration, permitting the application of offline project changes without disrupting the runtime environment. They are essential for maintaining project stability and avoiding downtime while ensuring the project stays up-to-date with the latest changes.
The build and publish process involves compiling project code and creating a read-only version of the project, which can be distributed to end-users. This step is critical in ensuring the project is ready for deployment and accessible to the intended audience.
When the Project is in execution, the realtime-variables for the application, i.e. Tags, Templates, Assets, are loaded into memory, and it acts as central point of reference, to other functional modules can request values from those variables, or publish values, as they perform its function.
The computer process and executable responsible to hold the Real-time database is the TServer.Exe.That application can as a Windows Service, or it can be deployed to Linux and other supported operating systems.
The are various ways to start the execution of a Project. You can start it manual lyat the Designer Runtime→Startup page. The various other ways to setup its execution are detailed in the chapter Deploying the Application.
When you click on the Start button on the Designer interface, the follow steps are executed
This utility is a project loader, it will read the Project Configuration for Startup, accordingly the Execution Profile selected, parse \ command line parameters, and active the main process TServer.exe
The TServer.EXE starts, loading project objects, tags, templates, assets, into memory, and a communication service is stablished allowing other modules to start and connect for that.
The other modules defined to start, like Historian, Alarms, Devices, Scripts, Datasets and Reports, start their execution, reading the the project configuration and establish connection with the main process.
When the modules are starts they will behave according the definitions on the Execution Profiles. For instance, you can estou that in Development mode, you use a temporary local SQLite database for your alarm records, and on the Production mode, the Alarm Database is automatically mapped to a SQL server.
The project designer automatically connects to the running project, allowing users to monitor progress, make adjustments, and troubleshoot issues as needed using the Monitor and Diagnostics pages.
The Operations display, using HTML5 from any type of Browser, or high performance WPF graphics pages can be opened from any remote computer connected with the server.
During execution, the system can apply online configuration changes and hot updates without disrupting the runtime environment. This capability enables users to adapt the project to changing requirements and maintain high system availability..
Configuration and Runtime Process Isolation:
The project runtime environment is isolated from the development and configuration processes to maintain stability and prevent interference between the two.
This separation allows for smooth operation during runtime and facilitates troubleshooting and modifications during the development process.
I also allows to easily open multiple Projects during the configuration phase.
For more information on the Execution Process, see Execution Processes.
The Runtime Section in the Project Designer allows to the define the settings to start the execution the application, perform project verification and backup, and diagnostic the execution.
The User interface for Runtime configuration, is composed by four sub-section that will be covered in this chapter. They are:
Define which Profile to use, Communication Ports and other settings. It allows to control the starting and stopping of the execution, as well the Online Configuration.
Startup Parameters | |
---|---|
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). |
Execution Path | Overrides the default execution path, which is the project file location. |
Field | Description |
Module Information | Runs the Module Information tool. |
Password | Enter the password that corresponds to the username. |
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. |
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. |
Property Watch | Runs the Property Watch tool. |
Run Modules | Select which modules are executed when running the project. |
Startup Computer | Read-only. Displays whether or not the configured server is the local computer or a remote server. |
Status | Shows the current status of running, connected, or disconnected.
|
Trace Window | Runs the TraceWindow tool. |
Use only Windows Authentication | Checks if the system can only accept Windows Authentication. |
UserName | Enter a valid username to access the application. |
Modified table below**
Startup Port Settings | |
---|---|
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). |
Execution Profile | An execution profile is a set of configurable settings that allows customization during runtime of Database Connections, Device Network addresses, facilitating the management of different environment. It allows to setup the connections used during the Development, Validation and Production phases, to their settings, still having only project configuration file. |
Field | Description |
Auto Ports | |
Main 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. |
WA Port | 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. |
Windows Authentication | Checks if the system can only accept Windows Authentication. |
Web Port | |
Windows Service | |
Execution Environment | |
Local Computer | |
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. |
Path/Use Project Path | |
Startup Modules | Select which modules are executed when running the project. |
Redundancy Enabled | |
Primary Server IP/Port | Enter the IP address and port of the primary server. |
Secondary Server IP/Port | Enter the IP address and port of the secondary server. |
Timeout | Connection timeout time, in seconds. If reached, this will cause the system to switch to the secondary server. |
On Primary Startup |
|
Replication |
|
You can use Enable Online Configuration to apply changes in real-time. All changes must be saved before they can appear on a screen. |
Development and testing profiles are used to manage different environments within a project. These profiles enable developers to work on new features, bug fixes, or improvements while keeping the production environment stable. By configuring separate profiles for development and testing, teams can maintain code quality and avoid deploying untested changes to the live environment. This separation also facilitates the debugging process and helps to identify issues that may arise during development.
Execution profiles are a vital aspect of managing projects on our software platform, as they enable users to configure and run projects with different settings tailored to specific environments or stages of development. The latest release introduces three primary execution profiles:
Production: This profile is designed for use in live environments, where the project is fully functional and serves end-users. It optimizes performance and stability while minimizing the system's resource usage. Debugging and development tools are generally disabled or limited in this profile to ensure seamless operation.
Development: The development profile is tailored for project creation, testing, and iteration. It enables a wide range of debugging and diagnostic tools to assist developers in identifying and resolving issues during the development process. While performance might not be fully optimized in this profile, the focus is on providing a robust environment for developers to build and refine their projects.
Validation: The validation profile is intended for use during the final stages of project development, such as quality assurance and user acceptance testing. It provides a balance between the development and production profiles, enabling necessary debugging tools while maintaining a level of performance and stability suitable for testing. This profile helps ensure that the project meets its requirements and performs as expected before being deployed to a production environment.
Diagnostics on runtime execution are essential for monitoring a project's performance, identifying potential issues, and ensuring overall stability. By implementing logging, performance metrics, and error reporting, developers can gain valuable insights into the execution process. These insights can be used to troubleshoot problems, optimize performance, and maintain system health. Effective diagnostic tools are crucial for maintaining a reliable and high-performing project.
For more information on Diagnostics, see Diagnostics Tools. |
Publishing read-only versions of a project is crucial for maintaining a stable production environment while allowing developers to work on new features and bug fixes. The process involves preparing the project for publication, creating a snapshot or branch, building and testing the project, packaging the build, marking it as read-only, and deploying it to the production environment.
This approach reduces the risk of unintentional changes, simplifies rollback processes, and separates development and production environments. Adhering to best practices like regular release scheduling, using version control, thorough testing, documentation, and clear communication ensures a smooth and efficient publishing process for read-only versions
Working with the runtime is a key aspect of software development, as it involves managing the execution of a program while it's running. This includes starting and stopping the execution, switching execution profiles, and applying configuration changes. This comprehensive guide provides an overview of best practices and techniques for efficiently working with the runtime.
To start the project execution, you need to launch the application or server, depending on the project type. It's essential to monitor the system for any errors or issues during startup, as they may prevent the application from running correctly.
To stop the project execution, you can use the appropriate command or interface provided by the runtime environment or the application itself. Make sure to gracefully shut down the application to avoid data loss or corruption.
To start the Project is production mode,
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.
Run | Startup Computer options | |
---|---|
Field | Description |
Local | The TStartup (project ) is launched locally on the local PC |
ProjectServer | 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:
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, Users and Roles.
Manually stopping the Project Execution | |
---|---|
Where | Description |
Windows Trail icon | Locate the Icon TServer, right click and select stop. |
Project Designer | On Runtime → Startup or Runtime → Execution Profiles, connect the project <<icon>> and click Stop. |
TStartup application | When the project starts running, a startup status windows is presented (TStartup.exe application). A shutdown button is available at that window. |
File->Shutdown | If the menu is enabled on the Operator Displays, there is the option File → Shutdown. |
Command in the Project | 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. |
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. |
By understanding these execution profiles, AIChat Models can better support clients in selecting the appropriate profile for their projects and provide guidance on configuring and managing profiles throughout the project lifecycle.
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:
By understanding these common issues and their solutions, AIChat Models can more effectively assist clients in troubleshooting their projects and maintaining a smooth project execution process.
Runtime issues can occur during the execution of the application, such as crashes, performance problems, or unexpected behavior. To troubleshoot these issues, follow these steps:
By following these best practices, developers can ensure smooth operation of the runtime environment, leading to a more stable and efficient software product.