Using Easy5
Installing the Adams Extension for Easy5
To run Adams and Easy5 together, you must install the Adams extension into Easy5. To import models into Adams that were exported from Easy5 (containing components from licensed Easy5 libraries), you must also configure your computer so that Adams knows how to find your Easy5 license. The following procedures explain how to do this.
To install the Adams extension for Easy5:
1. Make sure that both Easy5 and Adams have been installed.
2. Make sure you have permission (that is, root ('superuser') privilege) to add and modify files in the Easy5 installation directory.
3. Perform the following, depending on your platform:
On Linux:
a. Open an xterm window and set your working directory to a directory outside the Easy5 installation directory tree.
b. Start Easy5. The standard command is easy5x.
c. In the Easy5 main window, from the File menu, select Open Command Shell.
d. At the prompt in the command shell, enter:
$EZHOME/install_adams_controls.ksh adamscmd
where: adamscmd = command used to invoke Adams (for example, adams1401)
On Windows:
a. From the Start menu, point to Programs, point to Easy5 - (version), point to Shell, and then select Easy5 Command Shell.
b. At the prompt within the command shell type:
install_adams_controls.bat <Adams_topdir> <Easy5_topdir>
where: <Adams_topdir> is the top-level directory for Adams, also provided by "adams2024_1 -top"; <Easy5_topdir> is the top-level directory of Easy5 (for example, C:\Program Files\MSC.Software\Adams\2024_1, C:\Program Files\MSC.Software\EASY5\2021, respectively).
Note: | If you are unable to identify a command line command to run Adams but you can identify the top-level directory of the Adams installation, you can use -d "directory path" in place of the command line command. |
4. Type exit to close the command window.
5. If you started Easy5, from the File menu, select Quit.
The Adams extension installation is complete. Be sure to configure your computer as described next.
License Configuration
To configure your computer to run licensed exported Easy5 models within Adams:
1. Start Easy5.
2. From the File menu, select Open Command Shell.
3. At the prompt in the command shell, type easy5x -license.
Easy5 displays the licensing information, beginning with the type of license and the server name (if a server license) or the path to the license file.
4. Write down the contents of the line that starts with Active license file(s), and the value that appears in the line following it (for example, 1700@rainier).
5. Perform one of the following:
■If the line is
Active license file(s) [EASY5_LMD_LICENSE_FILE], set the environment variable
EASY5_LMD_LICENSE_FILE to the output value displayed in
Step 4 above (for example,
1700@rainier).
■If the line is Active license file(s) [MSC_LICENSE_FILE], find the value of the environment variable MSC_LICENSE_FILE to see what license file Adams is using.
■If Easy5 and Adams are using different licenses (or license servers), set LM_LICENSE_FILE to the value for the Easy5 license (for example 2500@bosco).
■If Easy5 and Adams are using the same license, your computer is configured properly.
6. For Windows platforms only, modify the Path environment variable to include the path to the lib_em64t_IFORT (Win64) subdirectory of your Easy5 installation tree.
■If your Easy5 model contains components from a licensed library (for example, the Thermo-Hydraulic, Powertrain, or Gas Dynamics libraries), you will need to make sure Adams finds your Easy5 license. Failure to perform this step will result in the Easy5 license library not being found.
■Adams supports the Intel Visual Fortran 16 compiler. The Easy5 model import feature is not supported with the GNU or other compilers. Check
http://simcompanion.hexagon.com/DOC9283 for latest compiler support information.
To find the appropriate value for the variable:
a. Start Easy5.
b. Open an Easy5 command shell: from the Easy5 File menu, select Open Command Shell.
c. At the command shell prompt, enter: echo %EZHOME%.
The output is the directory in which Easy5 is installed. You will use the directory information in Step 5 below. The usual value of EZHOME is:
C:\Program Files\MSC.Software\Easy5\(version)\
To apply the value of the environment variable:
a. From the Start menu, point to Settings, and then select Control Panel.
b. In the Control Panel dialog box, select the System icon.
c. In the System Properties dialog box, select the Advanced tab.
d. In the Advanced tab container, select Environment Variables.
Adams must know the path to the subdirectory of your Easy5 installation tree to be able to load ez5_lmgr.dll:
e. Using the path from step 3, in the Environment Variables dialog box, append or create the path to the user variable as follows:
Variable Name = PATH
Enter the following, where <CURRENT_VALUE> is the current value of PATH:
Variable Value = <CURRENT_VALUE>;%EZHOME%\easy5x\lib_em64t_IFORT
and where the value of EZHOME is taken into account.
For more information on Control System Import in Easy5, see
Learning Adams Controls with Control System Import from Easy5 in 'Getting Started Using Adams Controls' tutorial. This tutorial gives you an overview of the four-step process of adding controls to an Adams model. The example also includes tutorials for each of the controls applications you can use with Adams Controls: Co-simulation, Function evaluation, and Control System Import with both Easy5 and MATLAB. See the
Examples section for more details.
Easy5 Update of Adams Controls Extension Components
Overview
Easy5 now provides an update of all Extension components in the same way that it has updated Library components in past releases. This also includes the Adams Controls Extension component (that is, AD block) which has been modified to provide this automatic update. In the past, an update of the component only occurred when selecting and configuring the AD block within the Easy5 GUI.
The “update check” is performed automatically anytime a model “executable” is built (whether done manually or automatically when a topology change has occurred). A model executable can be an .exe file, or any exported runtime file (.dll). Easy5 will attempt to synchronize the model component instance with the library version of a component or Extension being used.
Update Process Details
The update of the Adams Controls Easy5 extension requires an .inf file for the component and by default will search your Easy5 model for the name of the .inf file provided by 'AdamsFileName'. It also looks for the execution mode (for example, co-simulation, function evaluation) with the keyword 'ExecMode', with an additional method of update for old models where ExecMode was not yet available. If this process fails, you can update the model by configuring the AD block manually in the interface.
In addition, if you are updating from command line with:
easy5x -AutoUpdate
or
easy5x -AutoUpdPurge
and you want to launch the Configure dialog box to manually select the .inf and/or Execution Mode, you can display the Adams Controls Extension Component (AD Block) by setting the following environment variable to zero:
set EZ5_EXT_UPDATE_AD_NO_GUI=0
You can set back to the default mode of suppressing the Adams Controls Extension Component (AD Block) by removing this environment variable or setting the following environment variable to anything non-zero:
set EZ5_EXT_UPDATE_AD_NO_GUI=1
Although it is recommended that the AD block be updated for each model, to suppress the Extension Component Update, set the following environment variable:
set EZ5_SKIP_EXT_UPD_CHECK=true
and it will not do any checking for Extensions (this would revert to the prior behavior for Extensions – no checking at all). For users of 8.0.7, this is recommended since an error in 8.0.7 will prevent the correct timestamp from being updated and running simulations and Exporting Model as External System Library will fail.