How to store boolean data within a recipe

How to store boolean data within a recipe https://forum.weintekusa.com/uploads/db0776/original/1X/e134c72e888acd0f85afe2a7c32cd69cfa0c4d9d.png
none 0.0 0

Introduction:
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.

Software Version:
EasyBuilder Pro 6.05.01.379+

Instructions:
While using EasyBuilder Pro 6.05.01.379+, utilize the following method to store boolean data within the recipe database:

  1. Within your Recipe Database, create a field configured for 16-bit Unsigned data:

  2. To change the value of this parameter, use a “Toggle Switch” object addressed to “RECIPE_Bit” 0 of the boolean parameter:
    image

  3. 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.

  1. To transfer this data to an external device, select “Macro” within the “Project” tab:

  2. Within the following menu, click “New…”:

  3. To write this data to an external device, configure a macro similar to the following:

  4. 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.

  5. To trigger either macro, use the “Execute Macro” command within a combo button as shown:

Demo project: [Download]