How to configure Bit Selector item
This example explains how to select a bit in an value and check it the bit is set or not. The variable type which support this functionality is the item type BitSelect on the ApisWorker module.
Add worker module
Follow the guide Add Module to Apis Hive to add a module of type ApisWorker to an Apis Hive Instance.
- After adding the module, select the new module named "Worker" 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
- Follow the guide Add Items to a Module, but this time select item type "BitSelect".
- Add two items by setting Count to 2
- Click Ok
Connect Bit select item to source item
- Right click on the item and select Connect
- Select the source of the bit select item to connect
- Click Connect and then Ok
Configure which bit index to check of source item
- Select the bit select item to get the property view of the item
- Set the value of the BitPosition to check if the bit is set or not
- Click Apply
Result
- The bit select item should become true when the bit in position 1 is set and false if not.