Difference between revisions of "Extensions.EventHandling.ThresholdExceededEventSource"
Jump to navigation
Jump to search
Line 55: | Line 55: | ||
== See also == | == See also == | ||
[[Extensions.EventHandling.WaitForEvent|WaitForEvent]] <br/> | [[Extensions.EventHandling.WaitForEvent|WaitForEvent]] <br/> | ||
+ | [[Extensions.EventHandling.IsThresholdExceededEvent|IsThresholdExceededEvent]] <br/> | ||
[[Extensions.EventHandling.TimerExpiredEventSource|TimerExpiredEventSource]] | [[Extensions.EventHandling.TimerExpiredEventSource|TimerExpiredEventSource]] |
Revision as of 06:56, 12 December 2016
Contents
Classification
Name | ThresholdExceededEventSource |
Short Description | Create an Event Source for changes outside area |
Class | Term |
Extension | OTX EventHandling extension |
Group | Event source related terms |
Exceptions | - |
Checker Rules | Event_Chk001 Event_Chk002 |
Standard Compliant | Yes |
OTL Syntax
EventSourceTerm = EventHandling.ThresholdExceededEventSource(CountableTerm, CountableTerm, Variable);
Description
The OTX ThresholdExceededEventSource term creates an event source that monitors the value of a variable and an event triggers when the value goes outside a certain range. If the value of start is already outside the specified range, the event should be triggered. Event queue should start immediately as soon as the event source is created.
This event source is to apply only for the data types on which an order relation can be defined, namely the simple type data types.
![]()
A ThresholdExceededEventSource, which is applied to an uninitialized variable will count exceeded as a threshold and make no mistake.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
EventSource | The Event Source, the changes in the value of a variable monitored within the value range. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Variable | - | Variable | - | [1] | The variable which has to be monitored. |
LowerThreshold | CountableType | Term | - | [1] | A value to compare. If the value of the monitored variable is less than this value, the event is triggered |
UpperThreshold | CountableType | Term | - | [1] | A value to compare. If the value of the monitored variable is greater than this value, the event is triggered |
OTL Examples
Float LowerThreshold1 = 1;
Float UpperThreshold1 = 99.9;
EventHandling.EventSource EventSource1;
Float Variable1 = 8;
EventHandling.Event Event1;
EventSource1 = EventHandling.ThresholdExceededEventSource(LowerThreshold1, UpperThreshold1, Variable1);
parallel
{
lane
{
while (true) : WhileLoop1
{
Variable1 = Variable1 + 1;
}
}
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
terminate;
}
}
See also
WaitForEvent
IsThresholdExceededEvent
TimerExpiredEventSource