Reference: Solver Variable
Command ElementModifies a variable element.
Format
<Reference_Variable
id = "integer"
{ type = "EXPRESSION"
expr = "motionsolve_expression"
| USERSUB
usrsub_dll_name = "valid_path_name"
usrsub_param_string = "USER( [[par_1[,...][,par_n]])
" } >
</Reference_Variable>
Attributes
- id
- Element identification number (integer>0). This number is unique among all Reference_Variable elements.
- type
- Select from EXPRESSION and USERSUB. Specifies how the variable expression is defined.
- expr
- Specifies a MotionSolve expression that defines the Reference_Variable. Use this parameter only when type = EXPRESSION. Any valid run-time MotionSolve expression can be provided as input.
- usrsub_dll_name
- Specifies the path and name of the DLL or shared library containing the user subroutine. MotionSolve uses this information to load the user subroutine VARSUB in the DLL at run time. Use this keyword only when type = USERSUB is selected.
- usrsub_param_string
- The list of parameters that are passed from the data file to the user defined VARSUB. Use this keyword only when type = USERSUB is selected.
Example
<Reference_Variable
id = "30700800"
type = "EXPRESSION"
expr = "sqrt(VX(30301011)**2+VY(30301011)**2)">
</Reference_Variable>
<Reference_Variable
id = "30100100"
type = "USERSUB"
usrsub_param_string = "USER(30102031,30101020,0.01,1)"
usrsub_dll_name = "NULL">
</Reference_Variable>
Comments
- Reference_Variable can be referenced using the function VARVAL(id).
- The Reference_Variable element can also be used to define the following elements: Control_PlantInput, Control_PlantOutput and Reference_Array.