Data from a Niagara JACE can be seamlessly mapped to Sedona Framework when it is sent to a BASSG Edge Analytics Controller (EAC). In this demo of an application built to use the EAC as a pulse meter for solar panel energy monitoring, you can see how easy this is.

Goal :

Learn how to count bool changes in pulse meter data to calculate kW and kWH using SkySpark's Computed History function.

With this function, you can sense the bool pulse and create trends, converting to a value like kW or other with a predefined multiplier.

How did we create the demo?

Within Niagara, we generated demo data for a pulse meter.

Created a demo logic: Pulse.bog

SkySpark Steps:

Within SkySpark, we generated a record and mapped it to obix. Then we historized with COV.  

Real goal is to map within EAC.io device with sedona and historize it with cov.

  1. Generate Equip 
  2. Create Pulse Meter record 
  3. Create 3 records with computed history



  4. Create 2 Axon Functions

    meterCompKW2(rec, dates, opts, yield, mult:5, rollup: 5min) => do
      count: 0;
      prevVal: 0;
      
      history: read( pulse and meter and equipRef == rec->equipRef)
        .hisRead(dates, opts)
        .map( row => do
            v0: row["v0"]
            if (v0 == true) count = count + 1;
            val: mult * count;
            {ts: row->ts, v0: val}
        end)
        .hisRollup(max, rollup)
        .hisFindAll(val => val != null);
        
      if (rec.has("hisTotalized")) do
        history = history.map(row => do
          con: row->v0 - prevVal;
          prevVal = row->v0;
          return {ts: row->ts, v0: con};
        end);
      end;
      
      history.each(row => do
        yield(row->ts, v0: row->v0.as(1kW));
      end)
    end
     
    =====================================================
    meterCompKWh(rec, dates, opts, yield) => do
      read(power and equipRef == rec->equipRef)
        .hisRead(dates, opts)
        .hisRollup(avg,1h)
        .map( row => do
            v0: row["v0"]
            val: if (v0 == na()) na() else v0.as(1kWh)
            yield(row->ts+1hr, val)
        end)
    end

    Final result

BASSG's Edge Analytics Controllers with embedded SkySpark can perform sophisticated processing tasks at the edge, close to the equipment being managed for a tight feedback loop. This example showed how an EAC can be used as a pulse meter, to pulse and calculate kW and kWH directly from an on/off pulse.  You can implement this pulse meter code today.  Check out http://eac.io to learn about all the other ways that EACs can serve to bring edge computing to your building control system designs.

 

 

 

 

  • No labels