How to configure Variable item with reset value

This example explains how to add automatically reset an item to a user defined value after a given period. The variable type which support this functionality is the item type Item type: Item Attribute Items on the ApisWorker module.

Add worker module

Follow the guide Add Module to Apis Hive, but this time select a module of type ApisWorker from the Module type drop down list.

  • After adding the module, select the new module named "ApisWorker1" from the Solution Explorer.
  • Set the "ExchangeRate" property to e.g. 1000 ms. This is the update rate when this module exchanges data with other modules.

  • Click on Apply

Add items

  • Click Add items(s)
  • Select the items (in the item list) and change the Valuetype to 8 byte float (in the property view)

  • Click Ok

Configure Value reset functionality

  • In the items list view (All Items), select item ApisWorker1.Variable1 to get the item property
  • Set the AutoResetTimeout to '5000' millisecond

  • Click Apply
  • Do the same operation for ApisWorker1.Variable2 but set the AutoResetValue to -1

  • Click Apply

Change the value of the item.

  • Select item 'ApisWorker1.Variable1' and set the value to 60. After 5 seconds the value should be reset to 0
  • Select item 'ApisWorker1.Variable2' and set the value to 30. After 5 seconds the value should be reset to -1