Fatigue User’s Guide > Module Operations > Modifying the MSC.Fatigue Environment (MENM)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Modifying the MSC.Fatigue Environment (MENM)
The MSC.Fatigue user environment manipulation module, MENM, can be used to create, edit, and maintain the environment under which MSC.Fatigue modules execute.
The environment records and sets default file names, save types, plot labels, and much more. This guide details which environment keywords are applicable in each module; they can all be set from MENM.
MSC.Fatigue modules function within the context of a user environment which determines their performance and behavior. For example, the name of the last time series (.dac) file used is saved in the environment and so when a particular module requires a .dac file as input, it can be offered as a default. In fact the entire MSC.Fatigue default handling system is implemented through the user environment.
Most modules routinely access the environment either to read or write information, this process is normally transparent to the user. However, users can deposit specific instructions within the environment which will force program modules to behave in specific ways. For example, the location of plotting labels output by the quick look display (MQLD) module can be moved from the side to the top by setting the environment keyword PLOTLABL to TOP. The MENM module can be used to manipulate the MSC.Fatigue user environment.
The Global, Home and Local Environments
The MSC.Fatigue user environment functions on three levels, the local, the home, and the global level. This program allows the user access to the MSC.Fatigue environment files, the local environment (envi.usr), the global, or central, environment (envi.sys) and the home environment (envi.hom). The global environment file is in the nssys directory on PC or UNIX systems and may be accessed by many users.
Instructions saved at the local level will normally override instructions saved at the home level which will override instructions at the global level, so that for example, setting PLOTLABL to TOP locally will override a global PLOTLABL set to SIDE. This feature can be particularly useful on multi-user systems where some functionality needs to be defined globally for all users, but nevertheless, individuals can still redefine some functions locally for themselves. The local file is accessed only by programs running in the directory where the file resides. The environment is used for default settings (e.g. pen colours) and to pass information from program to program (e.g. last used file).
Physically, the MSC.Fatigue user environment consists of three data files in which all the required information and commands are stored. The local environment file is called envi.usr and is always to be found in the user's current directory or subdirectory. Therefore, each directory from which any MSC.Fatigue module is invoked will have a specific copy of envi.usr which reflects the usage within that directory. The Home environment is called envi.hom, the global environment file is called envi.sys and is located within the central MSC.Fatigue system directory nssys.
The structure of the local, home and global environment files is identical and consists of a random access key-indexed format, which means that these files can only be accessed by the MENM module.
Information and instructions are stored within the environment files in the form of a keyword and an associated value. Modules access the environment by searching for keywords specific to them and then acting according to the associated value. The format of the keyword value combination, together with some examples, are detailed below:
 
KEYWORD
{8 characters max.}
VALUE
{120 characters max.}
MEANING
PLOTLABL
TOP
Plot Label position
$SIGNAL
TEST101.DAC
Last signal file accessed
$LASTPRG
MMFD
The last used program
$MINERS
1.0
Miners constant
Most of the keyword value pairs to be found in an environment file are of no direct interest to the user, they merely enable program modules to function in the expected way. However, as mentioned above, MENM can be used to deposit specific instructions, such as the value of Palmgren Miner's fatigue damage summation constant, in order to customize performance. The user definable keyword value pairs relevant to particular modules are detailed in the individual module documentation.
Module Operation
The MENM module can be run in one of the following ways:
In stand alone mode by typing menm at the system prompt.
By incorporating the MENM commands in a batch operation.
The first mode is interactive. Once running in interactive mode, MENM will display the following menu:
Figure 17‑6 The MENM main menu.
All of the three main options (Local, Home, or Central) have the same sub menu, illustrated to the right of the main menu.
The functions of these submenu options are described below. The required option is selected by pressing the appropriate hot key or using the cursor. Alternatively, the highlight bar can be moved over the option and ENTER pressed OR the menu option can be selected by pointing and clicking the mouse pointer.
Option 1 - List environment to screen.
Selecting this option will cause MENM to list the contents of the selected environment file. The listing is directed to the screen, and takes the form of the keyword - value pairs.
Figure 17‑7 A Listing of Keywords
Option 2 - Output Environment to File
If File is chosen as the listing destination then a screen similar to Figure 17‑8 below will appear.
Figure 17‑8 Listing destination is File
The fields are as follows:
 
Screen Part
Description
List File Name
The name of the ASCII file to which the keyword/value pairs will be written. Figure 17‑8 above shows one of the default names, and if envi.lst should already exists then MENM will overwrite it. Change the file name if this is not the desired result.
Overwrite
This option specifies whether the output file should be overwritten or appended to. If any option is selected and the file does not exist then the file will be created.
Separator
Keyword/value pairs must be separated from each other by either an equals sign, a space, or a TAB character. This field allows the character to be selected.
Keyword filter
To write a subset of keywords to the output file, a keyword filter may be used. An asterisk (*) may be used at the end of the filter string and means, “any keyword beginning with”. For example FRED* will list all keywords beginning with FRED. The default is that all keywords will be listed. Omitting the wildcard means that an exact match is required.
Option 3 - Add/Alter keyword
Selecting this option allows individual keyword value pairs to be added to or edited within the local environment file. After selection of this option MENM will display this screen:
Figure 17‑9 Add/Alter local entry screen.
If the specified keyword exists within the local environment (use the pick list facility to select one) then the currently associated value is displayed and an alternative value may be entered.
The form of the environment is a set of keyword/value string pairs. The keywords may be up to 8 characters in length, the value up to 120 characters.
If the specified keyword does not exist within the local environment, then the new keyword and the value entered will be added.
 
Note:  
Changes made to the local environment will only apply to the specific directory relevant to that environment.
Option 4 - Remove keywords
Selection of this option will cause MENM to ask for the name of keyword to be deleted.
If the specified keyword exists within the local environment then it together with its associated value will be deleted from the local environment file. If the specified keyword cannot be found then an appropriate error message will be output.
The asterisk (*) wildcard may be used. It must be the last character. For example FRED* will remove all keywords beginning with FRED.
The pick list can be used to tag a number of keywords for mass deletion.
Option 5 - Clear Environment
Selection of this option will cause MENM to prompt with a message such as this:
Are you sure you wish to overwrite the local environment
Yes/No?
The default to this option is N for No (retain the current local environment). Pressing the ENTER key will select this default. Pressing “Y “or clicking 'Yes' followed by ENTER will cause MENM to delete the local environment.
 
Note:  
Deleting the global environment file affects all users. Use this function with extra care!