1 / 12

SECTION 3 EXPRESSIONS: FUNCTIONS

SECTION 3 EXPRESSIONS: FUNCTIONS. EXPRESSIONS: FUNCTIONS. What’s in this section: Function Overview Function: Location Functions: Orientation Functions: Modeling Functions: User-written Expressions: Saving Your Work. FUNCTIONS OVERVIEW. Database Facilitate your access to the database

Télécharger la présentation

SECTION 3 EXPRESSIONS: FUNCTIONS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SECTION 3 EXPRESSIONS: FUNCTIONS

  2. EXPRESSIONS: FUNCTIONS • What’s in this section: • Function Overview • Function: Location • Functions: Orientation • Functions: Modeling • Functions: User-written • Expressions: Saving Your Work

  3. FUNCTIONS OVERVIEW • Database • Facilitate your access to the database • File • Allow you to read information from and write information to files • Miscellaneous • Database functions • Interface (GUI) functions • String functions • System functions • There are several functions of each type. In this section, we’ll cover some of the common types. Note:The are several functions of each type. In this section, we’ll cover some of the common types. • Eight Categories of Functions: • Math • Apply to scalar numbers or matrixes. • Location/Orientation • Compute one or more locations or orientations from a variety of input parameters • Modeling • Return a requested displacement measurement between markers or parts • Matrix/Array • Allow you to easily perform common matrix operations • String • Allow you to manipulate character strings

  4. FUNCTIONS: LOCATION • LOC_RELATIVE_TO • Definition • Returns an array of three numbers, representing a location, by transforming a specified location that is relative to a coordinate system object. • Format • LOC_RELATIVE_TO (Location, Frame Object)

  5. FUNCTIONS: LOCATION (CONT.) • Example • LOC_RELATIVE_TO({16,8,0}, marker_2) Note: The Location is an array. In Workshop 6-Performing a Design Study, you will use another function to return an array. Using this method, you can nest functions.

  6. FUNCTIONS: ORIENTATION • ORI_ALONG_AXIS • Definition • Returns the alignment of a specified axis from one coordinate system object to another. ORI_ALONG_AXIS has an underlying parameter that allows it to express the resulting orientation in the correct coordinate system object. • Format • ORI_ALONG_AXIS (From Frame, To Frame, Axis Name)

  7. FUNCTIONS: ORIENTATION (CONT.) • Example • ORI_ALONG_AXIS(marker_1, marker_2, “y”) Note: From Frame and To Frame must be objects. They cannot be arrays.

  8. FUNCTIONS: MODELING • DM • Definition • Returns the magnitude of the translational displacement from one coordinate system object to another. • Format • DM (Object 1, Object 2) • Example • DM (marker_O1, marker_O2) • In this example, DM=13.

  9. FUNCTIONS: USER-WRITTEN • Two types of user-written functions • Interpreted Functions • Interpreted functions consist of text inserted into an expression when ADAMS/View evaluates the expression. • You can create these functions in the Command Window, using the FUNCTION command. • When you create them, you must specify the text of the function and the parameter names. • Example: • MIDPT (marker_2, marker_3) Note: For additional information on how to put a marker midway between two other markers, see the Knowledge Base Article 7219 available at: http://support.adams.com/kb/faq.asp?ID=7219.

  10. FUNCTIONS: USER-WRITTEN (CONT.) • Compiled Functions • These functions are written in C or FORTRAN and linked into ADAMS/View. • You can use these functions in the same way you would use the built-in functions.

  11. EXPRESSIONS: SAVING YOUR WORK • ADAMS/View command file (.cmd) • Command file format is the best way to archive and store models. It can be slower, but it’s not prone to corruption. • Expressions are at the bottom of the command file. • ADAMS/View database file (.bin) • Parameterized model resides in the ADAMS/View database. • Opens quickly. • ADAMS/Solver dataset file (.adm) • Parametric expressions are not stored in an ADAMS/Solver dataset. • Small size. Note: For additional information on the advantages and disadvantages of the various file types, see the Knowledge Base Article 7248 available at:http://support.adams.com/kb/faq.asp?ID=7248.

More Related