Support : Knowledge base

Knowledge Base

Welcome to OPAL-RT’s Knowledge Base

OPAL-RT offers a repository of support information for optimal use of its technology.

Loading…

Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.

For optimal experience, use a desktop computer.

Reference Number: AA-02035// Views: AA-02035// Created: 2021-09-03 15:15:31// Last Updated: 2021-09-03 15:38:09
HowTo
How to Configure the Target to Clean a Simulation after a Model Reset - Old version of RT-LAB

This guide shows you how to configure a target to clean the shared memory and kill all processes that were not running prior to loading the simulation for version of RT-LAB older than 11.3.

The python code in this article will execute the same steps as the one mentioned in this article. The python code attached bellow is compatible with older version of python (version 2.4 in this example) used by an older version of RT-LAB. 

Note: If you are running multiple models on a target with processes that need to be left running after a single model reset, then this is not recommended as it will clear out all processes that were not running prior to the load and that exist in shared memory.


To use this method you will need to be able to place files in specific locations on the target. To do so, it is recommended to use the application MobaXterm. Instructions can be found here: How to Install and connect with MobaXterm

Using MobaXterm to access the file structure on the target, perform the following steps:https://www.opal-rt.com/support-knowledge-base/?article=AA-01044

1. Place the scripts target_postreset.py and target_preload.py into the folder: usr\opalrt\[rt-lab version]\common\python\rtlab\global


Note that a version of these scripts will already exist in this folder, add and ‘_old’ extension to avoid overwriting them and to create a backup copy.

2. Place the script env.py into the folder: usr\opalrt\[rt-lab version]\common\python\rtlab\util


And that is it! Now each time you load a model, the preload script will take a snapshot of all processes and store them, then the post reset script will compare this list with the currently running processes after a model reset and kill any processes that are leftover.


 

env.py 1.4 Kb 1.4 Kb
target_postreset.py 1.8 Kb 1.8 Kb
target_preload.py 2.1 Kb 2.1 Kb