EventResponse¶
The EventResponse element is used to configure which events activate the response.
Events can be added in two ways:
Add individual events using the
Eventelement by using theNameattribute.Add all events configured for a different event response using the
PropagatingEventResponseelement.
By default, only the events and propagating responses present in the configuration will be configured to the response after the configuration is applied.
For example, if an event was previously connected to the response but that event is not present in the configuration, it will be removed unless the AppendOnly attribute is set to “True”.
See also
- Event response
Explanation of the general concept of event responses and their purpose in the motion software.
Example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <Controller Name="Arcas 5EG-0">
<AxisControl Name="X" Template="LogicalAxisControlStandard3rdOrderTemplate">
<EventResponse Name="ErrorResponse">
<Events>
<Event Name="Watchdog"/>
<Event Name="SampleOverload"/>
</Events>
</EventResponse>
</AxisControl>
<AxisControl Name="Y" Template="LogicalAxisControlStandard3rdOrderTemplate">
<EventResponse Name="QuickStopErrorResponse">
<Events>
<Event Name="Y/TrajectoryInterpolator/DemandPositionLimitExceeded"/>
</Events>
</EventResponse>
</AxisControl>
<AxisControlGroup Name="XY-group" Template="AxisControlGroupTemplate">
<AxisControl Name="X"/>
<AxisControl Name="Y"/>
<EventResponse Name="ErrorResponse">
<PropagatingEventResponses>
<PropagatingEventResponse Name="X/ErrorResponse"/>
<PropagatingEventResponse Name="Y/QuickStopErrorResponse"/>
</PropagatingEventResponses>
</EventResponse>
</AxisControlGroup>
</Controller>
|
XML schema¶
EventResponseType¶
EventResponseType¶1 2 3 4 5 6 7 8 9 10 11 12 | <xs:complexType name="EventResponseType">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Event" type="NamedReferenceType"/> <!-- Deprecated -->
<xs:element name="Events" type="RegisteredEventsType"/>
<xs:element name="PropagatingEventResponses" type="PropagatingEventResponsesType"/>
<xs:element name="Signal" type="SignalType"/>
<xs:element name="Variant" type="EventResponseVariantType"/>
<xs:element name="NamedMutation" type="NamedMutationType"/>
</xs:choice>
<xs:attribute name="Name" type="xs:string" use="required"/>
<xs:attribute name="AppendOnly" type="Boolean" use="optional"/>
</xs:complexType>
|
Attribute |
Description |
|---|---|
|
Used to specify the event response, which is required to be defined or modified. |
|
Optional. If set to “True”, events and propagating responses will not be removed if they are not present in the configuration. |
EventResponseVariantType¶1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <xs:complexType name="EventResponseVariantType">
<xs:complexContent>
<xs:extension base="BaseVariantType">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Event" type="NamedReferenceType"/> <!-- Deprecated -->
<xs:element name="Events" type="RegisteredEventsType"/>
<xs:element name="PropagatingEventResponses" type="PropagatingEventResponsesType"/>
<xs:element name="Signal" type="SignalType"/>
<xs:element name="Variant" type="EventResponseVariantType"/>
<xs:element name="NamedMutation" type="NamedMutationType"/>
</xs:choice>
<xs:attribute name="AppendOnly" type="Boolean" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
|
Deprecated since version 3.70.0:
Specifying an
Eventelement directly withinEventResponseto add the event to the response.Specifying an
EventResponseelement without child elements results in the removal of all existing events from the response event collection unless theAppendOnlyattribute of theEventResponseelement is set to “True”.
RegisteredEventsType¶
RegisteredEventsType¶1 2 3 4 5 | <xs:complexType name="RegisteredEventsType">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Event" type="NamedReferenceType"/>
</xs:choice>
</xs:complexType>
|
Note
Specifying an empty Events element within an EventResponse element removes all previously configured events from the event response unless the AppendOnly attribute of the EventResponse element is set to “True”.
PropagatingEventResponsesType¶
PropagatingEventResponsesType¶1 2 3 4 5 | <xs:complexType name="PropagatingEventResponsesType">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="PropagatingEventResponse" type="NamedReferenceType"/>
</xs:choice>
</xs:complexType>
|
Note
Configuring a PropagatingEventResponse on an EventResponse means that any trigger of the PropagatingEventResponse is propagated to the EventResponse on which it is configured.
Note
Specifying an empty PropagatingEventResponses element within an EventResponse element removes all previously configured propagating event responses from the event response unless the AppendOnly attribute of the EventResponse element is set to “True”.