Sensors
Use the Sensors tool to sense an event during simulation and to define a response to that event
Create Sensors
- From the Model Browser, select the system to which the sensor is to be added.
-
Right-click on a system in the Model Browser and select from the context menu.
ORRight-click on a sensor folder in the Model Browser and select Add Sensor from the context menu.ORFrom the Model ribbon, click the Sensors icon.The Add Sensor dialog is displayed.
- Specify a label for the sensor.
-
Specify a variable name for the sensor.
By default, variables names of entities in MotionView follow a certain convention. For example, all sensor entities have a variable name starting with “sen_”. This is the recommended convention to follow when building models in MotionView since it has many advantages in model editing and model manipulation.
-
Click OK to close the window or
Apply to continue creating entities.
Once a sensor entity has been added to the model, the panel for the sensor will automatically be displayed in the panel area.
Edit Sensors
Define the Signals of Sensors
The Signal tab allows you to define the event within the simulation that will trigger the sensor response.
-
If the Sensors panel is not currently displayed, select the desired sensor by
clicking on it in the Model Browser or in the modeling window.
The Sensors panel is automatically displayed.
- Select an option from the Expr: drop-down menu.
-
Define the properties associated with your choice.
If Linear is chosen, enter a constant value of displacement, velocity, or acceleration..If Curve is chosen:If Spline3D is chosen:If Expression is chosen, enter a solver expression for displacement, velocity, or acceleration.
Use User-Defined Properties for a Sensor
If desired, define the sensor equation using the User-Defined tab, which will allow you to specify the properties of the equation using user subroutines.
-
From the Signal tab, click the User-defined properties
check box.
The Signal tab automatically updates.
-
Define the user subroutine.
Define the Comparisons of Sensors
The Compare To tab allows you to define the value that the current signal will be compared to.
- Click the Compare To tab.
- Enter a value to compare the signal against in the Value text box.
- Enter a value in the Error text box to specify the tolerance applied to the value to create a numerical bandwidth.
-
Select one of options for triggering a response.
Option Description Signal is greater than VALUE - ERROR Select to make the response trigger when the signal is greater than the value. Signal is less than VALUE + ERROR Select to make the response trigger when the signal is less than the value. Abs(Signal) is less than or equal to VALUE + ERROR Select to make the response trigger when the signal is near equal to the value.
Define the Responses of Sensors
The Response tab allows you to specify the action (or actions) the solver should take when the signal is within the Compare To range.
- Click the Response tab.
-
Click any of the check boxes to activate the response.
Option Description Halt simulation The simulation will stop when the sensor is triggered. Restart simulation The simulation will start when the sensor is triggered. Print to output Results will be written to the output files when the sensor is triggered Evaluate expression Evaluate the expression provided when the sensor is triggered. New output step Activating this option allows you to provide a value which will result in the solver using a new output step from that point forward. Integration step size Reset the integration step size when the sensor is triggered. Return to command file Read the next command when the sensor is triggered. New pivot sequence Reset the pivot sequence for the solver when the sensor is triggered. Export state variable vector Write the state information to a file when the sensor is triggered -
If Evaluate expression is chosen, more options become
available. From the first drop-down menu, select USER and
enter a user expression, or select EXPR, select a type
from the second drop-down menu and define the corresponding properties.
If Linear is chosen, enter a constant value of displacement, velocity, or acceleration..If Curve is chosen:If Spline3D is chosen:If Expression is chosen, enter a solver expression for displacement, velocity, or acceleration.