Building a Compute Block Tutorial¶
In this tutorial, we will build a compute block in Arundo Edge to calculate the total power output of two wind turbines.
The tutorial is divided into the following sections:
- Learning Objectives - things you will know how to do after completing the tutorial.
- Setup - set up necessary before you get started.
- Instructions - instructions on how to complete the tutorial.
- Finishing Up - challenges and further reading for after the tutorial.
After completing this tutorial, you will know how to:
- Create simulators that stream sample data
- Build compute blocks that calculate custom values
- View the output of compute blocks
Before you start the tutorial, you must do the following:
Now let's get started...
1. Set up a Simulator¶
The first step is to set up a simulator to stream sample turbine data.
a) Download the Sample Data¶
Download the following sample data file.
Save the file on your local device.
The simulator will stream data from this file.
b) Add a Sequence Interface¶
Add a Sequence interface in Arundo Edge:
The Sequence interface will stream the sample data from Arundo Edge to Arundo Fabric on repeat.
- Double-click the Arundo Edge shortcut on the desktop.
- Log in as normal.
- Select Interfaces | + Add new.
- Select Sequence.
- In Name, enter "Turbine Simulator".
- Click Add interface.
c) Upload the Sample Data¶
Upload the sample data file to Sequence interface by clicking Upload CSV (highlighted below).
Then click the upload box and select the sample data file. The sample data now displays on the screen as follows:
2. Build a Compute Block¶
The next step is to build a compute block on the Compute Chain screen. To do this, select Compute Chain on the sidebar and click Add Compute Block.
a) Enter Basic Details¶
Enter basic details for the compute block, including the name, update criteria, and refresh interval.
b) Add Input Tags¶
Move down to the Inputs section and add the tags from the simulator we set up in Step 1:
c) Add an Output Tag¶
Next, move down to the Outputs section and add an output tag to store the value calculated by the compute block:
d) Define an Expression¶
Define the following expression to calculate the value of the Total_Output tag:
- Enter the output tag first in the expression.
- Click the i icon to view more information about defining expressions.
Finally, click Save to add the compute block.
3. View the Output¶
The final step is to view the calculated output for the compute block. To do this, complete the following:
- Select Viewer on the sidebar.
- Open the Graph tab.
- Select "Sent to Cloud" in Filter.
- Select Auto refresh.
The output displays on the Total_Output panel under Compute:
Congratulations! You've now built a compute block that performs a simple calculation. We hope you now understand how to use compute blocks to enhance your data analytics.
Want to expand your knowledge further? Try the following:
Build your own compute blocks to calculate custom tag values.
Download the sample data file used in this tutorial.