Lab 10 – Creating an Hourly Average Shift Report

Create and Format a New Report

Step 1. Create a new workbook
Step 2. In cell A1, enter Hourly Average Data Acquisition IPS and press Enter.

Step 3. Click cell A3.
Step 4. On the Historian menu ribbon, click Tag Selection, and then click Tag Selection.

The Tag Selection dialog box appears.

Step 5. Locate and select the SysDataAcqOverallItemsPerSec tag.
Step 6. Click OK.

 
Create Shift Time Range

Step 7. In cell A5, enter a date and time that is at least seven hours prior to class time and press Enter to specify the start date and time.
Step 8. In cell A6, enter =A5+1/24 and press Enter.

Step 9. Click cell A6 and position the cursor over the lower right-hand corner of the cell. The cursor should turn into a + icon, indicating a handle.
Step 10. Drag the handle down to cell A12. This will increment each of the highlighted cells by 1 hour.

 
Insert the Aggregate Value Function

Step 11. On the Historian menu ribbon, click Tag Values, and then click Aggregate Values.

The Aggregate Values - Step 1 of 4 dialog box appears.
Step 12. Click in the middle of the Select cell(s) containing tag name(s) field, and then select cell A3. Ensure that the field’s cell reference is Sheet1!$A$3

Step 13. Click Next.
The Aggregate Values - Step 2 of 4 dialog box appears.
 
Step 14. Double-click in the middle of the Select cell for output field, and then select cell C5. Ensure that the field’s cell reference is Sheet1!$C$5.

Step 15. Click Next.
The Aggregate Values - Step 3 of 4 dialog box appears.
Step 16. Click the Calculations tab.
Step 17. In the Calculation type drop-down list, select Average, if necessary.

Step 18. Click the Resolution tab.
Step 19. Select the Values spaced every option.
Step 20. Set the number to 60000 ms.

Step 21. Click Next.
The Aggregate Values - Step 4 of 4 dialog box appears.
Step 22. Click the Absolute time option.
Step 23. Under the Absolute time option, click the first date and time option.
Step 24. In the field on the left, specify the cell reference as Sheet1!$A$5.
Step 25. In the field on the right, specify the cell reference as Sheet1!$A$6.

Step 26. Click Finish.
 The average value for the hour appears alongside the date and time cell.

 
Modify Cell Formulas

Step 27. Click cell C6.
The wwAggregate function string appears in the formula bar.

Changing the cell reference creates relative cell referencing and enables the average values to be
cascaded down the column.

Step 28. In the formula bar, modify a portion of the function string from Sheet1!$A$5,Sheet1!$A$6 to Sheet1!$A5,Sheet1!$A6.

Step 29. Press Enter to save the changes.
Step 30. Click cell C6 and position the cursor over the bottom-right of the cell. The cursor should turn into a + icon, indicating a handle. 
Step 31. Drag the handle down to cell C12.

The cell values are refreshed during the drag down. This is because the wwAggregate formula is being dynamically copied into each cell. 
You can now change the tag name reference or the date and time within the worksheet field and Wonderware Historian Client Workbook will calculate the new values. 
Step 32. Save the report as Hourly Average Shift.xlsx
 


Last modified: Thursday, 4 July 2019, 1:50 PM