Simcenter Prescan How to run Prescan Standalone Target and Amesim FMU on Windows and Linux

2023-08-17T15:02:00.000-0400
Prescan

Summary

This article explains the steps needed in order to run the Prescan Standalone Target with an Amesim FMU on Windows and Linux


Details

If you have Amesim installed on both Windows and Linux

ON WINDOWS
From the Simulink model which uses FMIKit FMU block which points to an Amesim VD model FMU, generate code for Linux (PS Target)
Upload the generated code (zip fle) to the Linux machine
Switch to the Linux machine

ON LINUX
Configure the Amesim license:
if license type is rlm
SC1D_LICENSING_TYPE=rlm
LMS_LICENSE=<port>@<licenseSrver>
if license type is ugs
SC1D_LICENSING_TYPE=ugs
SPLM_LICENSE_SERVER=<port>@<licenseSrver>

Add the following Amesim library to the library path
LD_LIBRARY_PATH environment variable must refer to a directory containing a shared object called libLMSLicenseDLL_A_linuxem64t_a.so
LD_LIBRARY_PATH=$AME/lnx_x64/:$LD_LIBRARY_PATH

Generate the Amesim Linux FMU from the Amesim GUI starting from the <amesimVDModel.ame>
Copy the generated <amesimFMU>.so into the expanded folder containing the Windows FMU /binaries/linux64/<amesimFMU>.so

Build the Prescan experiment (PS Target) with prescanbuild
Run the Prescan experiment with prescanrun

---------------------------------------------------------------------------------------------------------------------------------

If you don't have Amesim installed on both Windows and Linux

ON WINDOWS
Requirements:
-Simcenter Amesim's minimal installation: The minimal installation of Simcenter Amesim can be generated by the by the generator of the Simcenter Amesim FMU. See here: https://support.sw.siemens.com/en-US/knowledge-base/KB000048491_EN_US
-IMPORTANT: ask to the generator to deliver also the *OASES_win64.lib libraries and put this library in /Minimal_Install/lib/utils/lib/win64/
-license to run Simcenter Amesim FMU (Runtime license)

Configure the Amesim license:
if license type is rlm
SC1D_LICENSING_TYPE=rlm
LMS_LICENSE=<port>@<licenseSrver>
if license type is ugs
SC1D_LICENSING_TYPE=ugs
SPLM_LICENSE_SERVER=<port>@<licenseSrver>


Add the following Amesim library to the path environment:
set AME= D:\Minimal_Install
set PATH=%AME%;%AME%\win32;%AME%\win64;%PATH%

Run the experiment:
Start a Prescanshell
Build the Prescan experiment (PS Target) with prescanbuild
Run the Prescan experiment with prescanrun

ON LINUX
Requierements:
-Prescan installation
-Prescan license
-Simcenter Amesim's minimal installation: The minimal installation of Simcenter Amesim can be generated by the generator of the Simcenter Amesim FMU. See here: https://support.sw.siemens.com/en-US/knowledge-base/KB000048491_EN_US
-IMPORTANT: ask to the generator to deliver also the *libOASES_lnx_x64*.so library and put this library in /Minimal_Install/lnx_x64/
-license to run Simcenter Amesim FMU (Runtime license)

Configure the Amesim license:
if license type is rlm
SC1D_LICENSING_TYPE=rlm
LMS_LICENSE=<port>@<licenseSrver>
if license type is ugs
SC1D_LICENSING_TYPE=ugs
​​​​​​​SPLM_LICENSE_SERVER=<port>@<licenseSrver>

Add the following Amesim library to the library path
LD_LIBRARY_PATH environment variable must refer to a directory containing a shared object called libLMSLicenseDLL_A_linuxem64t_a.so
LD_LIBRARY_PATH=$<amesimMinimalInstallation>/lnx_x64/:$LD_LIBRARY_PATH

Run the experiment:
Build the Prescan experiment (PS Target) with prescanbuild
Run the Prescan experiment with prescanrun

KB Article ID# KB000049031_EN_US

Contents

SummaryDetails

Associated Components

Documentation Installer License Software