Setting Up User-Defined Modeling Elements
In addition to writing your solver subroutine, you also have to modify the corresponding modeling element in your multibody model so that it receives output value(s) from the user subroutine.
This can be done in two ways:
- By editing the MotionSolve XML file.
- By modifying the entity in the MotionView interface and producing a new XML file.
<Motion_Joint
id = "101001"
type = "EXPRESSION"
val_type = "D"
expr = "-.2*TIME"
joint_id = "101002"
joint_type = "R"
motion_type = "R"
ic_disp = "0."
ic_vel = "0.">
</Motion_Joint>
<Motion_Joint
id = "101001"
type = "USERSUB"
val_type = "D"
usrsub_param_string = "USER(5,2)"
usrsub_dll_name = "C:/work/testsub.dll"
joint_id = "101002"
joint_type = "R"
motion_type = "R"
ic_disp = "0."
ic_vel = "0.">
</Motion_Joint>