Knowledge Base
Welcome to OPAL-RT’s Knowledge Base
OPAL-RT offers a repository of support information for optimal use of its technology.
Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.
For optimal experience, use a desktop computer.
Reference Number: AA-01835// Views: AA-01835// Created: 2020-02-17 18:29:13// Last Updated: 2021-09-03 15:40:35 HowTo How to Configure the Target to Clean a Simulation after a Model Reset
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.
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:
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. If you are using version 11.3 or older, please read the following KB article.
|