Expression Function

Your Ad Here


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.

See the supported functions.

Expression Function Basics

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.

Syntax and Notation

An expression function may be composed of any valid combination of simple constants, operators, parameters, and available standard ADAMS/Solver functions.

Simple Constants

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.

Operators

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:

Limitations

ADAMS/Solver imposes some limitations in the definition of functions:

Markers

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.

Your Ad Here