Example: Monitoring temperature and humidity

This task creates an algorithm to monitor temperature and humidity, including defining appropriate units, Metric or English.
  1. Create the algorithm, give it a name, and configure its properties.
  2. With the algorithm in the Algorithm Manager, select the Wire Sheet view, open the analytics palette, and add logic, including two DataSourceBlocks and a Psychrometric block.
    The algorithm should look something like this:
    Image
  3. Define the Data name when the Poll action is invoked either manually or automatically by the configured Poller for the first DataSourceBlock as hs:temp, and the Data property for the second DataSourceBlock as hs:humidity.
  4. Add a Psychometric block (under General Blocks) and select the units to use.
    Image

    The system converts the raw data to the units you require. For information about Metric and English temperature values refer to the Niagara Analytics Framework Reference manual.

  5. Configure the Psychrometric block’s Units property to the desired English or Metric value.
    Image
  6. Link the output and input slots, refresh cache, and save the station.
  7. To visualize the results, add a Bound Table with an Analytic Table Binding to a Px view.
    Image
  8. Configure the Analytic Table Binding with data = alg:Psychrometric_alg, set node to reference a component in the station with the required hs:temp and hs:humidity data available, and set timeRange = today.

    The data display in a list.

    Image