Event Detector¶
Introduction¶
The Event Detector monitors a chosen input variable and reports when it crosses a specified threshold value. It can record the time of the crossing, increment an event counter, and write a trigger signal to an output event variable.
It behaves like a simple threshold sensor or comparator in a real control system. It is often used to capture important milestones in a simulation, such as the time at which dissolved oxygen drops below a critical limit, when to trigger a feed addition, or how to count repeated oscillation cycles. By recording crossing times and counts, or by writing a trigger flag, the event detector provides a convenient way to link physical thresholds to logical actions.
Property Grid¶
General
¶
- Input
This setting specifies the global variable to be monitored.
- Threshold Value
This setting specifies the value of the input variable at which an event is considered to occur.
- Output Event
This specifies the global variable that is set or toggled when the event is detected.
- Is One Shot
This determines whether the event is allowed to occur only once or multiple times during the simulation.
- On
If set to On, the detector triggers only once (the first time the crossing occurs).
- Off
If set to Off, it continues to detect and log subsequent crossings.
- Crossing Type
This specifies which kind of crossing triggers the event.
- Rising
The event is only triggered when the input crosses the threshold upward.
- Falling
The event is only triggered when the input crosses the threshold downward.
- Any
The event triggers on either upward or downward crossing.
- Enable Event Time
This setting enables or disables recording of the time at which the crossing occurs. If enabled, the detected time is written to the selected Output Event Time variable.
- Output Event Time
This setting specifies the global variable where the time of the most recent event crossing is recorded (if enabled).
- Enable Event Count
This enables or disables counting of the number of threshold crossings. If enabled, the count is written to the selected Output Event Count variable.
- Output Event Count
If enabled, this specifies the global variable that stores the running count of detected events.
Event Detector Toolbar¶
Context-Specific Toolbar Options |
Description |
---|---|
|
The Help command launches the M-Star reference documentation in your web browser. |
See also Child Geometry Context Specific Toolbar.
For a full description of each selection on the Context-Specific Toolbar, see Toolbar Selections.