*Motion()

Applies a motion to a specified joint or constrains the motion between two markers.

Syntax

*Motion(motion_name,"motion_label",JOINT, joint_name, TRANS|ROT)
OR
*Motion(motion_name,"motion_label",MARKERS, i_marker_name, j_marker_name, direction)

Arguments

motion_name
The variable name of the motion.
Data type: varname
motion_label
The descriptive label of the motion.
Data type: label
JOINT|MARKERS
Type of motion applied to a joint or two markers.
Data type: keyword
joint_name
The joint to which the motion is applied.
Data type: CylJoint, RevJoint, or TransJoint
TRANS|ROT
This argument indicates whether the motion is applied to the translational or rotational degree of freedom when using a cylindrical joint.
i_marker_name
The first of two markers for which displacement is being controlled.
Data type: Marker
j_marker_name
The second of two markers for which displacement is being controlled.
Data type: Marker
direction
The direction of the constraint.
Data type: X, Y, Z, B1, B2, or B3

Example

*RevJoint(j_crank_piv, "Crank pivot", 
                          b_crank, 
                          B_Ground, 
                          p_crank_pivot, 
                          p_crank_pivot_axis)
*Motion(crank_rot, "Crank rotation", 
                      JOINT, j_crank_piv)
*SetMotion(crank_rot, DISP, '360D*TIME')
*Motion(motion_0, "Motion 0", MARKERS, marker_5, marker_6, B2)

Context

*BeginMdl()

*DefineAnalysis()

*DefineSystem()

Properties

Table 1.
Property Returns Data Type Description
label string The descriptive label of the motion.
state boolean Control state (TRUE or FALSE).
varname string The variable name of the motion.
id long integer The solver ID of the motion.
jt CylJoint, RevJoint, or TransJoint The joint to which the motion is applied.
im Marker The first of two markers for which displacement is being controlled.
jm Marker The second of two markers for which displacement is being controlled.
direction string The direction of the constraint.
type The type of motion specified: DISP, VEL, or ACCL.
value string The value or solver expression for the motion.

Comments

A *Motion() statement can be specified for any revolute joint, translational joint, or cylindrical joint. However, a motion cannot be specified for a joint in compliant mode.

The TRANS|ROT flag is required only when a motion is applied to a cylindrical joint.

If no *SetMotion() statement is present, the displacement of the joint is set to zero.