You can enter the text for other MSC.ADAMS expression functions in the Expression text box.
The expression function of a motion driver (on a part or on a joint) must be a function of time. If you make your motion expression a function of displacements, forces, or any other variables in the system, ADAMS/Solver issues an error message and stops.
If you enter an incorrect expression, COSMOSMotion issues an error message indicating that your expression is incorrect. You cannot close the Joint dialog box until you correct the expression.
An expression function is a single C-like or FORTRAN-like expression that evaluates a single value. This value may be a function of system variables, such as displacements between markers, velocities, accelerations, and current simulation time.
An expression function may be composed of any valid combination of simple constants, operators, parameters, and available standard ADAMS/Solver functions.
Expression functions may only include integers and real numbers. Complex numbers are not supported. The expression function accepts any legal number. The definition of a legal integer and a legal real number is machine dependent, and may, therefore, change from system to system. Typically, in ADAMS/Solver, an integer is limited to having an absolute value less than 231 - 1. A real number in ADAMS/Solver is typically limited to having an absolute value less than 1026.
ADAMS/Solver allows the standard FORTRAN-77 set of operators. The operators and their sequence of evaluation are shown in the table below:
|
Symbol: |
Operation: |
Precedence: |
|
** |
Exponentiation |
1 |
|
/ |
Division |
2 |
|
* |
Multiplication |
3 |
An expression function can contain any number of blank spaces. They are often used to improve the readability of the function expression. The following are restrictions on using blanks:
You cannot put a blank space in the middle of a number.
ADAMS/Solver does not accept a blank space between a function and its left bracket.
ADAMS/Solver imposes some limitations in the definition of functions:
Nesting of functions - Functions, sub-expressions, or operations may only be nested ten levels deep. For example, FUNCTION = f1 (f2 (f3 (f4))), where f1, f2, f3, f4 are function sub-expressions, is a syntactically legal function definition. However, FUNCTION = f1 (f2 (... (f11 ) ...) is not a legal definition, since sub-expressions have been nested eleven levels deep.
Limitations on number of symbols in a function expression - A single function expression must not use more than 1,000 symbols. This includes operators, brackets, functions, number, and so on.
Limitations on number of elements to which a function can refer - A function is limited to being dependent on a maximum of 25 standard ADAMS/Solver elements of each type. Therefore, each expression may be a function of a maximum of 25 parts, 25 forces, and so on.
Many of the functions supported by MSC.ADAMS require the use of marker numbers. Markers are the means by which motion entities are attached to parts, internal to MSC.ADAMS.
Any of the entities that support functions, such as joints, forces, and moments, has a Function tab that display a dialog box similar to the one shown next:

Selecting the Marker
button
displays the following dialog box:

In this dialog box, you can browse all of the motion entities in the current model and access the marker numbers of any entity in the motion model. If you are using a function, such as AX, that uses at least one marker number as an argument, you can enter the AX portion of the function in the function text box (in the first dialog box shown above), select the Marker button, and then select a marker. The marker number is automatically added to the function statement.