*Output() - output expressions
Creates output with expression components.
Syntax
*Output(out_name,"out_label",EXPR, expr1, expr2, expr3, expr4, expr5, expr6)
Arguments
- out_name
- The variable name of the output.
- out_label
- The descriptive label of the output.
- EXPR
- An argument that indicates the output type.
- expr1
- A number, MDL expression, or solver expression for the second component of the output.
- expr2
- A number, MDL expression, or solver expression for the third component of the output.
- expr3
- A number, MDL expression, or solver expression for the fourth component of the output.
- expr4
- A number, MDL expression, or solver expression for the sixth component of the output.
- expr5
- A number, MDL expression, or solver expression for the seventh component of the output.
- expr6
- A number, MDL expression, or solver expression for the eighth component of the output.
Example
*RevJoint "Steering wheel jt",
(j_st_wheel, b_str_wheel,
b_body,
p_str_wheel,
p_tilt_jt)
*Body(b_body, "Vehicle body", p_cg)
*Output(str_req, "Misc calculations",
EXPR,
`-AZ({j_st_wheel.i.id, %d},
{j_st_wheel.j.id, %d})*RTOD`,
`-TZ({j_st_wheel.i.id, %d},
{j_st_wheel.j.id, %d},
{j_st_wheel.j.id, %d})/1355.81`,
`DX({b_body.cm.id, %d })`,
`DY({b_body.cm.id, %d })`,
`DZ({b_body.cm.id, %d })`,
`DX({b_body.cm.id, %d })-1000.0`)
Context
Properties
Property | Returns Data Type | Description |
---|---|---|
varname | string | Variable name of the output. |
label | string | Output label. |
state | Boolean | Returns active state of entity (True or False). |
id | integer | ID number of the output. |
idstring | string | ID of output in string format. |
note | string | Descriptive note on the output entity (if any). |
cnames | string array | An array of 8 string values that sets component names for f1, f2, f3, f4, f5,
f6, f7, f8 expressions. Refer to Comments below. |
cunits | string array | An array of 8 string values that sets units for component names for f1, f2, f3,
f4, f5, f6, f7, f8 expressions. Refer to Comments below. |
f2_expr | string | Second component of the output. |
f3_expr | string | Third component of the output. |
f4_expr | string | Fourth component of the output. |
f6_expr | string | Sixth component of the output. |
f7_expr | string | Seventh component of the output. |
f8_expr | string | Eighth component of the output. |
Comments
This form of the *Output() statement can be used to request values of up to six solver expressions from the solver.
The expressions by default have components names as F2, F3, F4, F6, F7 & F8. MotionView currently does not support expressions with component names F1 & F5.
*Output( o_disp, "Output 0", EXPR, `DX({b_0.cm.idstring})`, `DY({b_0.cm.idstring})`,
`DZ({b_0.cm.idstring})`, `0`, `0`, `0` )
*Set( o_disp.cnames, {"Mag","Displacement X","Displacement Y","Displacement
Z","RMAG","Rot X","Rot Y","Rot Z"} )
*Set( o_disp.cunits, {"mm","mm","mm","mm","rad","rad","rad","rad"} )