Due to certain limitations, the Recipe Database within EasyBuilder Pro does not currently support boolean data in the form of an individual bit. However, boolean parameters can be stored as an integer with a value of either 0 or 1. This post contains step-by-step instructions that explain how to store and transfer boolean data within the Recipe Database.
EasyBuilder Pro 6.05.01.379+
While using EasyBuilder Pro 6.05.01.379+, utilize the following method to store boolean data within the recipe database:
Within your Recipe Database, create a field configured for 16-bit Unsigned data:
To change the value of this parameter, use a “Toggle Switch” object addressed to “RECIPE_Bit” 0 of the boolean parameter:
To add an item or update an item within the recipe set the corresponding “Command” value within the “Recipe.Command” register:
Example: A “Set Word” with this configuration will add a new item to the recipe.
Note: To transfer this data to an external device, a macro must be used to convert integer data to boolean format.
To transfer this data to an external device, select “Macro” within the “Project” tab:
Within the following menu, click “New…”:
To write this data to an external device, configure a macro similar to the following:
To read this data from an external device, configure a macro similar to the following:
Note: Since boolean data is stored as an integer with a value of either 0 or 1, only the first bit of the recipe item called “Data” is used in the both macros.
To trigger either macro, use the “Execute Macro” command within a combo button as shown:
Demo project: [Download]