Reference: Solver Variable

Command ElementModifies a variable element.


       id                  = "integer"   
   {   type                = "EXPRESSION"
       expr                = "motionsolve_expression"     
     | USERSUB
       usrsub_dll_name     = "valid_path_name"
       usrsub_param_string = "USER( [[par_1[,...][,par_n]])" } >


Element identification number (integer>0). This number is unique among all Reference_Variable elements.
Select from EXPRESSION and USERSUB. Specifies how the variable expression is defined.
The EXPRESSION option specifies that the value of the Reference_Variable is a MotionSolve expression that can be evaluated at run-time. The USERSUB option indicates that the value of the event is specified in a user defined subroutine, VARSUB. The parameters "usrsub_param_string" and "usrsub_dll_name" are used to provide more information about the user defined subroutine.
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.
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.
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.


     id                  = "30700800"
     type                = "EXPRESSION"
     expr                = "sqrt(VX(30301011)**2+VY(30301011)**2)">
     id                  = "30100100"
     type                = "USERSUB"
     usrsub_param_string = "USER(30102031,30101020,0.01,1)"
     usrsub_dll_name     = "NULL">


  1. Reference_Variable can be referenced using the function VARVAL(id).
  2. The Reference_Variable element can also be used to define the following elements: Control_PlantInput, Control_PlantOutput and Reference_Array.