Table - Fixed Sample Size

You can use the Sample Size and Aggregation Mode on the Tag History binding type to fix the number of records that are retrieved. This will ensure that the number of rows will remain the same without regard to the size of the data-set.

Selecting the Min/Max aggregation mode returns two rows of data for every row requested. Each pair represents a minimum and a maximum result from the underlying data. Therefore, a table with a fixed length, would return double the requested amount with Min/Max aggregation mode sele cte d. With Min/Max aggregation mode selected, and with a fixed row length of one, the data set returns the oldest tag value of the time range.

To fix the number of retrieved records

  1. Drag a Table (or a Power Table) from the Component Palette into your window.

  2. In the Property Editor, go to the Data property, and click the binding icon.
    The Property Binding window is displayed.

  3. Select the Tag History option.

  4. From Available Historical Tags, find the desired historical tags by selecting and expanding the historical providers.

  5. Once you have found the tag, drag it into to the right into Selected Historical Tags.

  6. Enter a desired start and end date in the Start Date Binding and End Date Binding text boxes.
    To allow the user to change the date range, bind these to the Start Date and End Date properties of a Date component.

  7. Select the appropriate Aggregation Mode.

  8. For the Sample Size, select Fixed from the drop-down and enter the desired number of rows to be returned.

  9. Set Polling Mode to Relative to see table update at the project's Base Rate.

  10. Click OK.