Extensions.EventHandling.Event
Jump to navigation
Jump to search
Classification
Name | Event |
Short Description | Event, which has been generated by an event source |
Class | Complex Data Type |
Base Data Type | ComplexType |
Default Value | Empty |
Provide a Literal | No |
SpecifiedBy | ISO 13209-3 |
Standard Compliant | Yes |
Description
The event data type identifies in OTX an event by an event source (event source was generated). The data type contains information about a single event.
Events can not explicitly (programmatically) are generated by activities or term. They are only implicitly via so-called event sources (event source generated).
On events may in the end with the waitforevent activity to be maintained.
![]()
Variables of type event can not be initialized. It can no constants of type event be declared.
![]()
Other libraries can define other event sources, eg HMI: Screen Event Source
Core Conversion
The following table shows the rules for conversion to another data type:
Conversion | Result | Sample |
ToBoolean | Undefined (should not be used) | |
ToInteger | Undefined (should not be used) | |
ToFloat | Undefined (should not be used) | |
ToString | Returns the type of the event source generated | EventSource eventSource = TimerExpiredEventSource(100); Event event = WaitForEvent(eventSource); String s = ToString(event); // Returns "TimerExpiredEvent" |
ToByteField | Undefined (should not be used) |
Sample
EventHandling.Event EventVariable;