This topic describes the Output entity in MotionView and shows the various usage, creation, and editing methods.
The Output entity creates a Result Output Request to the solver which writes out the requested data for plotting. The main types of output requests are shown in the figure below:
The main types of outputs that can be defined using Output requests are Displacement, Velocity, Acceleration, and Force. In addition to these, more complex outputs can be extracted using the Expressions and User-defined (which use the Solver User-subroutine) output types. The output request plays a very important role in post processing the results from a solver run. Output requests also pave the way for signal processing of data that is generated by a Multi-body Simulation.
Outputs defined in MotionView are written to MotionSolve as a Post_Request statement and to Adams as a REQUEST statement.
Click on each Output type below to view the corresponding properties:
There are three main ways to define Displacement/Velocity/Acceleration outputs between any two bodies:
|
There are two methods of defining a Force output:
|
An Expression based output request has six components (labeled F2, F3, F4, F6, F7, and F8), each of which can have expressions (based on solver functions). The MotionView Expression Builder is a useful tool for creating complex expression involving systems states and mathematical functions. |
For more complex output requests, that cannot be defined using the methods described above, a User-subroutine REQSUB can be used. From the Outputs panel, the following information needs to be provided in order to create a User-defined subroutine:
|
To learn how to add an "Entity" to a model, please see the Entity Manual topic.
OR
The Add Output dialog is displayed.
Note - The selection of System collector for the entity can also be done after the entity has been added.
OR
Outputs Panel - Properties Tab |
|
The Output methods applicable for the Force result type are: Entity and Entity Set.
|
Outputs Panel - Properties Tab - Expressions Output Request
The Expression Builder provides access to all the solver function data members in the model, as well as the many math and signal processing functions available in HyperGraph.
Syntax: *Output(out_name, "out_label", EXPR, expr1, expr2, expr3, expr4, expr5, expr6, [TITLE], [title1], [title2],...[title6]) Example: *Output(o_expr, "Expression Output", EXPR, `AZ({j_balljoint.i.idstring},{j_balljoint.j.idstring})`, `TZ({b_0.cm.idstring}, {Global_Frame.idstring})`, `0`, `0`, `0`, `0`) Note - This form of the Output statement can be used to request values of up to six solver expressions from the solver. To understand the complete syntax of the MDL statement, please refer to the *Output() - output expressions topic (located in the MotionView MDL Reference Guide section of the HyperWorks Desktop Reference Guide).
Syntax: mdlmodel_handle InterpretEntity new_handle keyword varname label Example: mdlmodel_handle InterpretEntity oexpr Output o_expr "\"Expression Output\"" EXPR "\`AZ({j_balljoint.i.idstring},{j_balljoint.j.idstring})\`" "\`TZ({b_0.cm.idstring}, {Global_Frame.idstring})\`" "\`0\`" "\`0\`" "\`0\`" "\`0\`"; |
User Defined output requests are used for creating complex output requests which needs external programming.
Outputs Panel - Properties Tab - User-Defined Output Request
Note - The standard function name for the User-Defined output request is REQSUB.
Syntax: *Output(out_name, "out_label", USER, `usr_expr`, [TITLE], [title1], [title2],... [title6]) Example: *Output(o_udef, "User Defined Output", USER, `USER(803, {b_1.cm.idstring}, 200)`) To understand the complete syntax of the MDL statement, please refer to the *Output() - user-defined output topic (located in the MotionView MDL Reference Guide section of the HyperWorks Desktop Reference Guide).
Syntax: mdlmodel_handle InterpretEntity new_handle keyword varname label Example: mdlmodel_handle InterpretEntity oudef Output o_udef "\"User Defined Output\"" USER "\`USER(803, {b_1.cm.idstring}, 200)\`"; |
To understand the complete syntax of the MDL statements used for Outputs, please refer to the various *Output topics (located in the MotionView MDL Reference Guide).
Note - To learn how to create a complete model using MDL statements please refer to the MotionView tutorial MV-1060: Introduction to MDL.
Note - You can use the Filter Using Toolbar and Show "Entity" Only Context-Sensitive Menu options to filter and display only the Output entities in the Project Browser.
|
In MotionView, Tcl can be used to add any MDL entities to the model. There are two Tcl commands that can be used to add an Output:
Syntax: mdlmodel_handle InterpretEntity new_handle keyword varname label In case of the Output the statement will look as shown below: mdlmodel_handleInterpretEntity Output out_name “\”out_label\”” DISP|VEL|ACCL point_1 body_1 point_2 body_2 [ref_marker]; |
This command is not applicable for Outputs, as there are no set statements associated with it. |
The InterpretEntity command is used to add entities to the model and the InterpretSet command is used to set the entity properties. An Output is a request being applied onto an entity, therefore initial conditions and other properties are not applicable. To understand the complete usage and syntax of these commands, please refer to the following HyperWorks Desktop Reference Guide/Programming with Tcl/Tk Commands topics: InterpretEntity and InterpretSet.
Note - When using the InterpretEntity and InterpretSet commands, it is important to also use the Evaluate command in order for the changes to take effect immediately.
To learn how to create a complete model using Tcl commands, please refer to tutorial MV-1040: Model Building Using Tcl.
The Output when exported to the MotionSolve XML format is defined as a Post_Request statement:
Syntax: <Post_Request id = "integer" comment = "string" { type = "MARKER_DISPLACEMENT" i_marker_id = "integer" j_marker_id = "integer" ref_marker_id = "integer" | type = "MARKER_ VELOCITY" i_marker_id = "integer" j_marker_id = "integer" ref_marker_id = "integer" | type = "MARKER_ACCELERATION" i_marker_id = "integer" j_marker_id = "integer" ref_marker_id = "integer" | type = "MARKER_FORCE" i_marker_id = "integer" j_marker_id = "integer" ref_marker_id = "integer" | type = "EXPRESSION" expr1 = "motionsolve_expression" expr2 = "motionsolve_expression" expr3 = "motionsolve_expression" expr4 = "motionsolve_expression" expr5 = "motionsolve_expression" expr6 = "motionsolve_expression" expr7 = "motionsolve_expression" expr8 = "motionsolve_expression" | type = "USERSUB" usrsub_dll_name = "valid_path_name" usrsub_param_string = "USER( [[par_1][,...][,par_n]] )" usrsub_fnc_name = "custom_fnc_name" > | type = "USERSUB" script_name = valid_path_name interpreter = "PYTHON" | "MATLAB" usrsub_param_string = "USER( [[par_1 [, ...][,par_n]] )" usrsub_fnc_name = "custom_fnc_name" > } /> An example of such a statement is shown below: <Post_Request id = "70000012" comment = "Expression Output" type = "EXPRESSION" expr1 = "NULL" expr2 = "AZ(30102020,30101020)" expr3 = "TZ(30102400,30101010)" expr4 = "NULL" expr5 = "NULL" expr6 = "NULL" expr7 = "NULL" expr8 = "NULL" /> |
The following example shows the various Output types that are used in MotionView:
*BeginMDL( the_model, "Model", "12.0.0.71" )
*StandardInclude(FILE) *SetCurrentSolverMode(MotionSolve) *Point( p_a, "Point A" ) *Point( p_b, "Point B" ) *SetPoint( p_b, 20.0, 0.0, 0.0 ) *Body( b_a, "Body A", p_a, , , , ) *Body( b_b, "Body B", p_b, , , , ) *Set( b_a.usecm, true ) *Set( b_b.usecm, true ) *Marker( m_A, "Marker_A", b_a, p_a ) *Marker( m_B, "Marker_b", b_b, p_b )
#An example for Output request using Two Point. *Output( o_two_points, "Output_TwoPoints", DISP, p_a, b_a, p_b, b_b, Global_Frame, BOTH_MARKERS )
#An example for Output request using an Entity. *Output( o_entity, "Output_Entity", DISP, BODY, b_a, Global_Frame, BOTH_MARKERS )
#An example for Output request using an Entity Set. *Output( o_entity_set, "Output_EntitySet", DISP, BODIES, Global_Frame )
#An example for Output request for a Force. *Output( o_force, "Output_Force", FORCE, BODY, b_a, Global_Frame, BOTH_MARKERS )
#An example for Output request using Expressions. *Output( o_expr, "Output_Expressions", EXPR, `DX({m_A.idstring},{m_B.idstring},{m_B.idstring}]`, `DY({m_A.idstring},{m_B.idstring},{m_B.idstring}]`, `DZ({m_A.idstring},{m_B.idstring},{m_B.idstring}]`, `0`, `0`, `0` )
*EndMDL() |
See Also:
*Output() - output expressions (MDL Model Statement)
*Output() - output on entities (MDL Model Statement)
*Output() - output on entity sets (MDL Model Statement)
*Output() - output on two points (MDL Model Statement)
*Output() - user-defined output (MDL Model Statement)
Post_Request (MotionSolve XML Format Model Statement)
mdlIObject InterpretEntity (Tcl Command)
mdlIObject InterpretSet (Tcl Command)