*SetMotion() - asymmetric motion pair with user subroutine
Sets the properties of an asymmetric motion pair with a user subroutine.
Syntax
*SetMotion(motion_name, , USER,
`solver_expr_l`,
`solver_expr_r`)
*Set(motion_name.l.use_local_dll, TRUE|FALSE)
*Set(motion_name.r.use_local_dll, TRUE|FALSE)
*Set(motion_name.l.local_dll, "string")
*Set(motion_name.r.local_dll, "string")
Arguments
- motion_name
- The variable name of an existing motion pair.
- USER
- This argument indicates that a user subroutine is used to compute motion pair properties.
- solver_expr_l
- A solver expression enclosed in back quotes to specify arguments for the user subroutine for the left motion.
- solver_expr_r
- A solver expression enclosed in back quotes to specify arguments for the user subroutine for the right motion.
- motion_name.l.use_local_dll motion_name.r.use_local_dll
- Specifies if a user subroutine DLL specific to the instance of one motion pair entity is to be used.
- motion_name.l.local_dll motion_name.r.local_dll
- The path and filename for the user subroutine DLL to be used with an instance of the user defined motion pair.
Example
*RevJointPair(j_crank_pivot, "Crank pivot",
b_crank,
B_Ground,
p_crank_pivot,
p_crank_pivot_axis)
*MotionPair(crank_rot, "Crank rotation", j_crank_pivot)
*SetMotion(mtn1, RIGHT, VEL, ds.real1.value +
ds.real2.value, 30)
*SetMotion(crank_rot, , DISP,
`30xsin(2*P1*TIME)`,
`30xcos(2*P1*TIME)`)
*MotionPair( mtn_wc, "Wheel center motion", j_wc_trans)
*Curve( crv_wc_mtn, "Wheel center mtn")
*SetMotion(mtn_wc, , DISP, crv_wc_mtn.interp(AKIMA, `TIME`),
crv_wc_mtn.interp(AKIMA, `TIME`))
*SetMotion(mtn_wc, , DISP, `USER({ crv_wc_mtn.id, %d })`,
`USER({ crv_wc_mtn.id, %d })`)
Context
Comments
The second argument (used to specify symmetry) is left empty when specifying asymmetric properties for a motion pair.
Templex syntax is used in solver expressions. All variables are
enclosed in braces {} and the rest of the expression is treated as literal. Solver
expressions are enclosed in back quotes. Curve data can be used to define a motion by
specifying an existing curve, interpolation method, and an independent variable. For
example,
curve_name.interp(CUBIC, `{DM}`)
where curve_name is the variable name of an existing curve. The interpolation method can be set to AKIMA, CUBIC, or PWL, and the independent variable is specified in Templex syntax.