Actions
<Actions>¶
An Action allows the user to trigger a configured function on a machine via the DataPortal or Rest API by sending numeric and float values, as well as strings, to the device. For example, they can reset the service counter or prevent the machine from restarting. To use the Action, <Actions> must be inserted after the <ValueDefinition>. Please also refer to <Permissions>. It must be defined which permissions are valid for the Action. The usage of <Actions> is optional.
ActionDefinition XML example (click to view)
<!-- ActionDefinition -->
<Actions>
<SetNumericValueActions>
<action key="ServiceCounter">
<objectDictionary index="0x4006" subIndex="0x02"/>
<title xsi:type="MessageReference" value="label.action.title.service.counter.reset"/>
<description xsi:type="MessageReference" value="label.action.description.service.counter.reset"/>
<valueLabel xsi:type="MessageReference" value="label.action.value.service.counter.reset"/>
<valueDefinition ref="value.common.machine.service.hourstonextservice"/>
<validations>
<valueRange min="0" max="1000"/>
</validations>
</action>
<action key="FastLoggingMode">
<objectDictionary index="0x4002" subIndex="0x05"/>
<title xsi:type="MessageReference" value="label.action.title.fastloggingmode "/>
<description xsi:type="MessageReference" value="label.action.description.fastloggingmode "/>
<valueLabel xsi:type="MessageReference" value="label.action.value.fastloggingmode "/>
<valueDefinition ref="value.custom.diagnostic.status"/>
<validations>
<discreteValues>
<discreteValue value="0">
<valueLabel xsi:type="MessageReference" value="label.action.fastloggingmode.deactivate "/>
</discreteValue>
<discreteValue value="1">
<valueLabel xsi:type="MessageReference" value="label.action.fastloggingmode.activate "/>
</discreteValue>
</discreteValues>
</validations>
</action>
<action key="PGrade">
<objectDictionary index="0x1234" subIndex="0x32"/>
<title xsi:type="MessageReference" value="label.action.title.p.grade"/>
<description xsi:type="MessageReference" value="label.action.description.p.grade"/>
<valueLabel xsi:type="MessageReference" value="label.action.value.p.grade"/>
<valueDefinition ref="value.common.p.grade"/>
<type value="float"/>
<validations>
<valueRange min="0.01" max="0.9"/>
</validations>
</action>
</SetNumericValueActions>
<SetStringValueActions>
<action key="Bluetooth">
<objectDictionary index="0x999" subIndex="0x05"/>
<title xsi:type="MessageReference" value="label.action.title.bluetooth.name"/>
<description xsi:type="MessageReference" value="label.action.description.bluetooth.name"/>
<valueLabel xsi:type="MessageReference" value="label.action.value.bluetooth.name"/>
<valueDefinition ref="value.common.bluetooth.name"/>
<validations>
<valueLength min="0" max="100"/>
</validations>
</action>
</SetStringValueActions>
</Actions>
The UUID and customerVersion are displayed in the PDC Management of the DataPortal.
| Description | Declaration |
|---|---|
<Actions> |
Opens the area in which actions can be defined. |
<SetNumericValueActions> |
Specifies that subsequent actions based on numeric values are defined (currently only numeric is supported). |
<action> |
Defines the name of the |
<objectDictionary> |
Definition of the variable in the device object dictionary, which will be written to the device. Index and subindex can be taken from the "Value type:" field in the Proemion Configurator. |
<title> |
Reference to the message in the "GlobalDictionary" in which the displayed name of the action in the portal is defined. |
<description> |
Reference to the message in the "GlobalDictionary" that defines the text of the action description. |
<valueLabel> |
Reference to the message in the "GlobalDictionary" that specifies the text in the input field of the action. |
<valueDefinition> |
[optional] Reference to the signal in the "ValueDefinition". If added, the current value of the signal listed is displayed in the Action UI. |
<validations> |
Opens the area in which the value interval to be transmitted is defined. |
<discreteValues> |
Opens the area in which a dropdown menu can be defined. |
<discreteValue> |
The <discreteValue> tag assigns a corresponding numeric value to the text in the dropdown menu. It is transferred when selecting the option. |
<valueRange> |
The <valueRange> defines the values of the interval. With min="x" and max ="y" the lower and upper limit is defined. The values are to be entered in integer format. |
<SetStringValueActions> |
Opens the area where strings for subsequent actions are defined. |
<Label> |
Defines the name of the respective action. |
lang |
This key, within <Label>, determines the language of the label. Examples are de for German and en for English. |
value |
The respective string is assigned to the label via the key. |
<valueLength> |
The <valueLength> defines the length of the string to be stored. With min="x" and max ="y" the lower and upper limit is defined. The values are to be entered in integer format. |
type |
Defines with the key value="float" that it can use floating point numbers for this action. "Value" can take the values integer and float. Integer is the default value. |