Difference between revisions of "PAB"

From wiki.netio-products.com
Jump to navigation Jump to search
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The PAB (Power Analyzing Block) define sets of conditions for measured variables (current, voltage, S0 pulses etc.). Various rules can be set based on these conditions. Rules can perform actions such as sending alarm to the Cloud service, restarting outputs, etc.
+
The PAB (Power Analysis Block) is set of Condition & Rules (CR). It's set of most common functions available for NETIO devices. Based on each '''Condition''', subsequent [https://wiki.netio-products.com/index.php?title=Rules '''Rules'''] can be executed.
The PAB condition output is also available for use in selected protocols.
+
User friendly examples are prepared as [https://wiki.netio-products.com/index.php?title=Rules_Complete_Examples '''CRxx Conditions & Rules - examples''']
  
== Types ==
 
There are two types of PAB available:
 
  
# '''RANGE''' - Evaluation YES/NO (TRUE/FALSE)
+
The '''Rules''' can be triggered based on a '''Condition''' - analysis of the state of one or more variables:
# '''ZONE''' - Evaluation using specified intervals 
+
* Current [mA]
 +
* Energy [Wh]
 +
* Load [W]
 +
* Power Factor
 +
* S0 pulses
  
Each type uses specific variables and is described in detail below.
+
Rules can then perform several actions described in section [https://wiki.netio-products.com/index.php?title=Rules '''Rules'''].
 +
Every PAB is internally evaluated as having a discrete state which can be used as an input to a Rule mentioned above. State value is different for each type of PAB (described below). This state is also available in JSON protocol and therefore can be read externally.
  
PABs can work with the specified quantities:
+
There are two types of PABs available: '''RANGE''' & '''ZONES'''. Each type has different states and configuration options.
* Current: OUTPUTS/1/CURRENT '''[mA]'''
 
* Load: OUTPUTS/8/LOAD '''[W]'''
 
* Energy: OUTPUTS/4/POWER '''[Wh]'''
 
* Output no. 1 state: OUTPUTS/1/STATE '''[int 0/1]'''
 
General structure for defining a variable is: <INPUT/OUTPUT>/ID/<monitored variable>
 
  
== PAB - RANGE ==
 
True/False-based evaluation. If the monitored value is in specified interval for a time period defined in <code>timeHysteresis</code>, PAB evaluates to <code>TRUE</code>. Otherwise it evaluates to <code>FALSE</code>.
 
  
=== Structure ===
+
= RANGE =
 +
True/False-based evaluation. Detects whether a monitored value lies in specified interval (range) for a period of time. PAB evaluates to <code>TRUE</code> or <code>FALSE</code>.
 +
Interval is specified by lower <code>lowerBound</code> and upper <code>upperBound</code> boundaries. PAB evaluates to <code>TRUE</code> if a variable defined in <code>source</code> lies within for a period of time defined in <code>timeHysteresis</code>.
 +
 
 +
== Configuration Structure ==
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 32: Line 32:
 
|-
 
|-
 
| source  
 
| source  
| OUTPUTS/'''x'''/(LOAD/CURRENT/POWER) <br> INPUTS/'''x'''/STATE
+
| OUTPUTS/'''x'''/(LOAD/CURRENT/POWER)
 
| The monitored variable. '''x''' indicates input / output number.
 
| The monitored variable. '''x''' indicates input / output number.
 
|-
 
|-
Line 50: Line 50:
 
|}
 
|}
  
== PAB - ZONE ==
+
== Examples ==
Zone-based evaluation. 1 or more zones can be set. Zones are divided using the values specified in the <code>thresholds</code> variable.
 
Monitored value must be present in defined interval for amount of time defined here. The PAB condition is evaluated as a number (integer) equal to the interval order.
 
  
Eg. At two specified intervals, the PAB value can be 0, 1, or 2.
+
=== Immediate evaluation ===
 +
PAB evaluates to <code>TRUE</code> immediately as Output 1 '''Current''' value appears '''between 100 and 200 mA'''
 +
<nowiki>
 +
{
 +
  "type": "RANGE",
 +
  "source": "OUTPUTS/1/CURRENT",
 +
  "lowerBound": 100,
 +
  "upperBound": 200,
 +
  "timeHysteresis": 0
 +
}</nowiki>
 +
 
 +
=== Evaluation with delay ===
 +
PAB evaluates to <code>TRUE</code> when Output 1 '''Load''' is '''between 200 and 300 Watts for 5s'''.
  
=== Structure ===
+
<nowiki>
 +
{
 +
  "type": "RANGE",
 +
  "source": "OUTPUTS/1/CURRENT",
 +
  "lowerBound": 200,
 +
  "upperBound": 300,
 +
  "timeHysteresis": 5
 +
}</nowiki>
 +
 
 +
= ZONES =
 +
Opposed from a previous type, ZONE-type PAB detects, whether a monitored variable finds itself in a specified zone. State of PAB indicates what zone number (index) is the measured variable currently in. Zones are defined by their <code>thresholds</code> (lower bounds) and there must be at least one threshold specified.
 +
Monitored value must be present in a defined interval for period of time defined in <code>timeHysteresis</code>.
 +
 
 +
== Structure ==
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 64: Line 87:
 
|-
 
|-
 
| type  
 
| type  
| ZONE
+
| ZONES
 
| PAB type
 
| PAB type
 
|-
 
|-
 
| source  
 
| source  
| OUTPUTS/'''x'''/(LOAD/CURRENT/POWER) <br> INPUTS/'''x'''/STATE
+
| OUTPUTS/'''x'''/(LOAD/CURRENT/POWER)
 
| The monitored variable. '''x''' indicates input / output number.
 
| The monitored variable. '''x''' indicates input / output number.
 
|-
 
|-
 
| timeHysteresis  
 
| timeHysteresis  
 
| int  
 
| int  
| [s] Monitored value must be present in defined interval for amount of time defined here.
+
| '''[s]''' Monitored value must be present in defined interval for amount of time defined here.
  
 
Eg: If the time hysteresis is equal to 5, monitored value must be within a defined interval for at least 5s. Only then it will be evaluated.
 
Eg: If the time hysteresis is equal to 5, monitored value must be within a defined interval for at least 5s. Only then it will be evaluated.
 
|-
 
|-
 
| thresholds
 
| thresholds
| list[int]
+
| list of integers
 
| lower-bounds of individual zones intervals
 
| lower-bounds of individual zones intervals
 
|}
 
|}
  
 
== Examples ==
 
== Examples ==
The condition evaluates to <code>TRUE</code> immediately as the current value appears between 100 and 200 mA
 
<nowiki>
 
{
 
  "type": "RANGE",
 
  "source": "OUTPUTS/1/CURRENT",
 
  "lowerBound": 100,
 
  "upperBound": 200,
 
  "timeHysteresis": 0
 
}</nowiki>
 
  
----
+
PAB is evaluated according to the specified zones when the Output 2 '''Current''' value is in one of the zones for 10s.
 +
Zone numbers are as following:
 +
* '''0''': 0 - 49 mA
 +
* '''1''': 50 - 99 mA
 +
* '''2''': 100 - 149 mA
 +
* '''3''': 150 - 199 mA
 +
* '''4''': 200+ mA
  
The condition evaluates to <code>TRUE</code> when the current value is between 100 and 200 mA for 5s.
+
Eg: If the Current value is 130mA for at least 10s, PAB is evaluated as 2.
 
 
<nowiki>
 
{
 
  "type": "RANGE",
 
  "source": "OUTPUTS/1/CURRENT",
 
  "lowerBound": 100,
 
  "upperBound": 200,
 
  "timeHysteresis": 5
 
}</nowiki>
 
 
 
----
 
 
 
The condition is evaluated according to the specified zones as soon as the current value is in one of the zones for 10s.
 
 
 
Eg: If the current is 130mA for at least 10s, the condition is evaluated as 2 (zone number).
 
  
 
  <nowiki>
 
  <nowiki>
Line 124: Line 129:
 
   "timeHysteresis": 10
 
   "timeHysteresis": 10
 
}</nowiki>
 
}</nowiki>
 +
 +
= DAYLIGHT (sunrise / sunset) <sup><code>FW 4.0.0+</code></sup> =
 +
Enables launching actions based on sunrise / sunset of current place.
 +
 +
== Structure ==
 +
{| class="wikitable"
 +
|-
 +
! Variable
 +
! Value
 +
! Description
 +
|-
 +
| type
 +
| DAYLIGHT
 +
| PAB type
 +
|-
 +
| longitude
 +
| str "14.4129433E" OR int -73.8390597
 +
| East/West coordinates
 +
|-
 +
| latitude
 +
| str "50.0058144N" OR int -16.5237353
 +
| North/South coordinates
 +
|-
 +
| altitude
 +
| Number of meters above sea level
 +
| 8848
 +
|-
 +
| sunriseDelay
 +
| int [min]
 +
| Delay of PAB activation/deactivation to sunrise
 +
|-
 +
| sunsetDelay
 +
| int [min]
 +
| Delay of PAB activation/deactivation to sunset
 +
|}
 +
 +
== Examples ==
 +
 +
=== PAB ===
 +
 +
<nowiki>
 +
{
 +
  "type": "DAYLIGHT",
 +
  "longitude": "14.4129433E",
 +
  "latitude": "50.0058144N",
 +
  "altitude": 247,
 +
  "sunriseDelay": 240,
 +
  "sunsetDelay": -180
 +
}
 +
</nowiki>
 +
 +
or
 +
 +
<nowiki>
 +
{
 +
  "type": "DAYLIGHT",
 +
  "longitude": -16.5237353,
 +
  "latitude": 28.4162475,
 +
  "altitude": 247,
 +
  "sunriseDelay": 240,
 +
  "sunsetDelay": -180
 +
}
 +
</nowiki>

Latest revision as of 00:53, 14 August 2023

The PAB (Power Analysis Block) is set of Condition & Rules (CR). It's set of most common functions available for NETIO devices. Based on each Condition, subsequent Rules can be executed. User friendly examples are prepared as CRxx Conditions & Rules - examples


The Rules can be triggered based on a Condition - analysis of the state of one or more variables:

  • Current [mA]
  • Energy [Wh]
  • Load [W]
  • Power Factor
  • S0 pulses

Rules can then perform several actions described in section Rules. Every PAB is internally evaluated as having a discrete state which can be used as an input to a Rule mentioned above. State value is different for each type of PAB (described below). This state is also available in JSON protocol and therefore can be read externally.

There are two types of PABs available: RANGE & ZONES. Each type has different states and configuration options.


RANGE

True/False-based evaluation. Detects whether a monitored value lies in specified interval (range) for a period of time. PAB evaluates to TRUE or FALSE. Interval is specified by lower lowerBound and upper upperBound boundaries. PAB evaluates to TRUE if a variable defined in source lies within for a period of time defined in timeHysteresis.

Configuration Structure

Variable Value Description
type RANGE PAB type
source OUTPUTS/x/(LOAD/CURRENT/POWER) The monitored variable. x indicates input / output number.
timeHysteresis int [s] Monitored value must be present in defined interval for amount of time defined here.

Eg: If the time hysteresis is equal to 5, monitored value must be within a defined interval for at least 5s. Only then it will be evaluated.

lowerBound int lower bound of the monitored value
upperBound int upper bound of the monitored value

Examples

Immediate evaluation

PAB evaluates to TRUE immediately as Output 1 Current value appears between 100 and 200 mA

{
  "type": "RANGE",
  "source": "OUTPUTS/1/CURRENT",
  "lowerBound": 100,
  "upperBound": 200,
  "timeHysteresis": 0
}

Evaluation with delay

PAB evaluates to TRUE when Output 1 Load is between 200 and 300 Watts for 5s.

{
  "type": "RANGE",
  "source": "OUTPUTS/1/CURRENT",
  "lowerBound": 200,
  "upperBound": 300,
  "timeHysteresis": 5
}

ZONES

Opposed from a previous type, ZONE-type PAB detects, whether a monitored variable finds itself in a specified zone. State of PAB indicates what zone number (index) is the measured variable currently in. Zones are defined by their thresholds (lower bounds) and there must be at least one threshold specified. Monitored value must be present in a defined interval for period of time defined in timeHysteresis.

Structure

Variable Value Description
type ZONES PAB type
source OUTPUTS/x/(LOAD/CURRENT/POWER) The monitored variable. x indicates input / output number.
timeHysteresis int [s] Monitored value must be present in defined interval for amount of time defined here.

Eg: If the time hysteresis is equal to 5, monitored value must be within a defined interval for at least 5s. Only then it will be evaluated.

thresholds list of integers lower-bounds of individual zones intervals

Examples

PAB is evaluated according to the specified zones when the Output 2 Current value is in one of the zones for 10s. Zone numbers are as following:

  • 0: 0 - 49 mA
  • 1: 50 - 99 mA
  • 2: 100 - 149 mA
  • 3: 150 - 199 mA
  • 4: 200+ mA

Eg: If the Current value is 130mA for at least 10s, PAB is evaluated as 2.

{
  "type": "ZONES",
  "source": "OUTPUTS/2/CURRENT",
  "thresholds": [
    50,
    100,
    150,
    200
  ],
  "timeHysteresis": 10
}

DAYLIGHT (sunrise / sunset) FW 4.0.0+

Enables launching actions based on sunrise / sunset of current place.

Structure

Variable Value Description
type DAYLIGHT PAB type
longitude str "14.4129433E" OR int -73.8390597 East/West coordinates
latitude str "50.0058144N" OR int -16.5237353 North/South coordinates
altitude Number of meters above sea level 8848
sunriseDelay int [min] Delay of PAB activation/deactivation to sunrise
sunsetDelay int [min] Delay of PAB activation/deactivation to sunset

Examples

PAB

{
  "type": "DAYLIGHT",
  "longitude": "14.4129433E",
  "latitude": "50.0058144N",
  "altitude": 247,
  "sunriseDelay": 240,
  "sunsetDelay": -180
}

or

{
  "type": "DAYLIGHT",
  "longitude": -16.5237353,
  "latitude": 28.4162475,
  "altitude": 247,
  "sunriseDelay": 240,
  "sunsetDelay": -180
}