Bundle
Bundle
Creating a bundle to use on another program is the best way for finding various result outputs from those records we are bundling. For example, bundling vav's to find the avg, min, max, sum and more.
With that said, there are two programs involved to make this work:
Bundle program - this runs on the equip(s) the user wants to bundle together. This program only includes the points/variables you wish to rollup and use in the result output program.
Result program - this runs on the equip(s) that will contain the logic for the result output. This program includes the bundle program and logical points to write the result outputs to.
How to create a Bundle
First the user will go to the DB Builder app.
Then, once inside the app, the user will navigate to the equips (vav's) they will like to bundle up and make sure they have a ref to the associated equip (ahu) they serve. You can find the all this on our demo project.
Then the user will have to either add new points on the associated equip (ahu) they serve to get the results. The points can be whatever the user is looking for. We recommend adding unique tags like “rollUp” and another tag based on that point.
Historize
It would be best to create new points if the user wishes to have histories for those logical points.
Once that is done, the user will navigate to one of the bundled equips via the Nav Tree (VAV-01 in our case).
Then select the Logic Builder app → New from the App Launcher Menu.
In the below pop up, the user would give the program a name and what it runs on. Then select the points to use, in our case it would be AirFlow, AirFlow Setpoint, Damper, Occ Mode, Room Setpoint, and Room Temp.
Then once the program is created and open, the user needs to add a two variables for the deltaTemp and deltaAirflow that we want to include. To add them, the user would select "+ Add Variables" in the right menu and select Var option.
Then for the new variable, give it a name and make sure its a program variable. The data type for this is going to be Number. Should look like below.
Then hit Okay, to enter a value for the point. Leave it as 0 since it will be written to based on some logic.
That should be it, do that for both variables.
Then create the below logic with the new variables. We want to include deltaTemp and deltaAirflow in our bundle so thats why we created them to use later on.
That would be it for this program. The user would then save it.
Using the bundle for result output
The user will now create a new program that is going to run on the equip (ahu) they will rollup the results to.
The user will navigate to the associated equip that the vav’s have a ref to (AHU-1 in our case).
Then select the Logic Builder app → New from the App Launcher Menu.
In the below pop up, the user would give the program a name and what it runs on. Then select the points to use, in our case it would be the new points we created AND the bundle found at the bottom of the list.
Then once the program is created and open, the user will need to create one extra variable called "it". If the user selects the output of routine start block and clicks anywhere on the space to open up the Suggestion Window, they will be able to see the "it" block they can add.
Then click on the space for block to add and you should see it available to select. If it for some reason it doesn't appear. The user can create a string variable and name it "it". It would be the same thing.
The IT variable is only needed if using certain logic. For example, if you want to find how many VAVs have the Occ Mode point as true. It would look like below.
Once we have that, we create the logic we want. Below is part of the program we made.
Then once done, save the program.
Quick rundown
Make sure VAVs have a ref to their AHU they serve.
Create program that runs on VAVs and add points to use. That's it and save it, no logic done here.
Create program that runs on AHUs and make sure to include bundle when selecting points to add when creating program.
Create the logic you want. Like getting the total VAV count, avg, min, max of VAVs. Or if any are X, do this or that etc.
Examples
Below are some common examples. They can be changed to find other values. At times it’s just changing the logical blocks to return a different value with the same setup.
Example of getting the average/min/max value
Below is an example of getting the average value of a variable of all the VAV’s. To find the min/max value, just replace the avg block with either min/max block. This is based on the above program set ups.
The below is getting the average of all the dampers in the VAV’s associated to their AHU. The avg block will look at all the damper variables and return the average.
First the user will link the bundle variable to the val input of the gridSelectCol block.
Then the user will specify the variable name of the point they would like to get the average of in the “colName” input. This is the exact variable name found in the bundle program. It’s case sensitive. In our case “damper”.
The user would then link the gridSelectCol output to the input of the avg block.
The avg block output would then be linked to the input of the writable variable to use for the average damper value. In our case “vavAvgDamper”.
Example of getting the total count value
Below is an example of getting the total count value of a grid. This is based on the above program set ups.
The below is getting the total count of all the VAV’s associated to their AHU. The gridSize block will read the size of the grid that the bundle variable is returning. This is based on how many VAV’s the “cityCenterVavProgram” is running on.
First the user will link the bundle variable to the val input of the gridSize block.
Then the user will link the gridSize output to the input of the writable variable to use for the total vav count value. In our case “totalVavs”.
Example of getting the total value
Below is an example of getting the total value of a variable of all the VAV’s. This is based on the above program set ups.
The below is getting the total vav airflow of all the VAV’s associated to their AHU. The add block will look at all the airflow variables and add them up to get the total airflow.
First the user will link the bundle variable to the val input of the gridSelectCol block.
Then the user will specify the variable name of the point they would like to get the total of in the “colName” input. This is the exact variable name found in the bundle program. It’s case sensitive. In our case “airflow”.
The user would then link the gridSelectCol output to the input of the add block.
The add block output would then be linked to the input of the writable variable to use for the total airflow value. In our case “vavTotalAirflow”.
Example of getting the count of a certain value
Below is an example of getting the count of a certain value of a variable of all the VAV’s. This is based on the above program set ups.
The below is getting the count of occupied VAV’s of all the VAV’s associated to their AHU. The count block combined with the cmpEq block will look at all the occMode variables and return the amount that are set to true.
First the user will link the bundle variable to the val input of the gridSelectCol block.
Then the user will specify the variable name of the point they would like to get the count of in the “colName” input. This is the exact variable name found in the bundle program. It’s case sensitive. In our case “occMode”.
The user would then link the gridSelectCol output to the val input of the count block.
The user would link the “it” variable to the first input of the cmpEq block.
Then type in “true” for the next input of the cmpEq block. In our example, “occMode” is a boolean type so the input value reflects that. If it’s a number, you can choose a number value and change the logical block accordingly etc.
Link the output of the cmpEq block to the iterator input of the count block.
The count block output would then be linked to the input of the writable variable to use for the occupied count variable. In our case “vavsOccupied”.
Example of getting the if any/all value
Below is an example of finding out if any of the VAV’s are occupied. To find the “all” value, just replace the any block with either all block. This is based on the above program set ups.
The below is finding out if any of the VAV’s are occupied of all the VAV’s associated to their AHU. The any block combined with the cmpEq block will look at all the occMode variables and return a true/false value depending if any are occupied or not.
First the user will link the bundle variable to the val input of the gridSelectCol block.
Then the user will specify the variable name of the point they would like to get the any result of in the “colName” input. This is the exact variable name found in the bundle program. It’s case sensitive. In our case “occMode”.
The user would then link the gridSelectCol output to the val input of the any block.
The user would link the “it” variable to the first input of the cmpEq block.
Then type in “true” for the next input of the cmpEq block. In our example, “occMode” is a boolean type so the input value reflects that. If it’s a number, you can choose a number value and change the logical block accordingly etc.
Link the output of the cmpEq block to the iterator input of the any block.
The any block output would then be linked to the input of the writable variable to use for the any value variable. In our case “anyOccupied”.