Difference between revisions of "PAB"

From wiki.netio-products.com
Jump to navigation Jump to search
(Created page with "The PAB (... Blocks) define sets of conditions for monitored quantities (current, voltage, S0 pulses etc.). Based on these conditions, various rules can be set. Rules can perf...")
 
(PAB - ZONES)
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The PAB (... Blocks) define sets of conditions for monitored quantities (current, voltage, S0 pulses etc.). Based on these conditions, various rules can be set. Rules can perform actions such as sending alarm to the Cloud service, restarting outputs, etc. 
+
The PAB (Power Analysis Block) is a function available for NETIO devices that periodically evaluates sets of conditions. Based on these conditions, subsequent [https://wiki.netio-products.com/index.php?title=Rules '''Rules'''] can be executed. These conditions can consist of one or more of following variables:
The PAB output is also available for use in selected protocols.
+
* Current [mA]
 +
* Energy [Wh]
 +
* Load [W]
 +
* Power Factor
 +
* S0 pulses
  
Existují dva typy PAB:  
+
Rules can then perform several actions described in section [https://wiki.netio-products.com/index.php?title=Rules '''Rules'''].
1) RANGE - vyhodnocení typu ANO/NE (true/false) 
+
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.
2) ZONE - vyhodnocení pomocí stanovených intervalů 
 
Každý typ používá specifické proměnné a jsou podrobně popsané níže.
 
  
PAB mohou pracovat s uvedenými veličinami:
+
There are two types of PABs available: '''RANGE''' & '''ZONES'''. Each type has different states and configuration options.
  * Proud: OUTPUTS/1/CURRENT **[mA]**
 
  * Příkon: OUTPUTS/8/LOAD **[W]**
 
  * Energie: OUTPUTS/4/POWER **[Wh]**
 
  * Stav výstupu č. 1: OUTPUTS/1/STATE **[int 0/1]**
 
Obecná struktura pro definici proměnné je: `<vstup/výstup>/ID/<sledovaná hodnota>`
 
  
## PAB typu RANGE 
 
Typ PAB s vyhodnocením ve stylu true/false. Pokud se sledovaná hodnota nachází v zadaném intervalu po dobu určenou v proměnné `timeHysteresis`, dojde k vyhodnocení PAB jako `true`. V opačném případě nabývá hodnoty `false`.
 
  
### Struktura 
+
= RANGE =
| Proměnná | Hodnoty | Popis |
+
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>.
| type | RANGE | Typ PAB |
 
| source | OUTPUTS/**x**/(LOAD/CURRENT/POWER) <br> INPUTS/**x**/STATE |  Měřená hodnota, kterou sledujeme. **x** udává číslo vstupu/výstupu.|
 
| timeHysteresis | int | [s] Časový interval, ve kterém se musí nacházet sledovaná hodnota. Př.: Pokud je hystereze rovná 5, musí se sledovaná hodnota nacházet v definovaném intervalu alespoň 5s. Až následně dojde k jejímu vyhodnoceí. |
 
| lowerBound | int |  spodní hranice sledované hodnoty |
 
| upperBound | int |  horní hranice sledované hodnoty |
 
  
## PAB typu ZONE 
+
== Configuration Structure ==
Typ PAB s vyhodnocením dle jednotlivých zón (1 a více).
+
{| class="wikitable"
Zóny se rozdělují s pomocí hodnot zadaných v proměnné `thresholds` následujícím způsobem: Pokud se sledovaná hodnota nachází v zadaném intervalu po dobu určenou v proměnné `timeHysteresis`, vyhodnotí se PAB jako číslo (integer) rovné pořadí intervalu. Při dvou zadaných intervalech tak může být hodnota PAB 0, 1 nebo 2.
+
|-
 +
! 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.
  
### Struktura 
+
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.
| Proměnná | Hodnoty | Popis |
+
|-
| ------ | ------ | ------ |
+
| lowerBound
| type | ZONE | typ PAB |
+
| int
| source | OUTPUTS/**x**/(LOAD/CURRENT/POWER) <br> INPUTS/**x**/STATE |  Měřená hodnota, kterou sledujeme. **x** udává číslo vstupu/výstupu.|
+
| lower bound of the monitored value
| timeHysteresis | int | [s] Časový interval, ve kterém se musí nacházet sledovaná hodnota. Př.: Pokud je hystereze rovná 5, musí se sledovaná hodnota nacházet v definovaném intervalu (intervalech) alespoň 5s. Až následně dojde k jejímu vyhodnoceí. |
+
|-
| thresholds | list[int] |  seznam spodních hranic intervalů pro přechod mezi zónami
+
| upperBound
 +
| int
 +
| upper bound of the monitored value
 +
|}
  
## Příklady
+
== Examples ==
Podmínka se vyhodnotí jako **true** okamžítě, jakmile se hodnota proudu objeví mezi 100 a 200 mA.
+
 
```
+
=== Immediate evaluation ===
 +
PAB evaluates to <code>TRUE</code> immediately as Output 1 '''Current''' value appears '''between 100 and 200 mA'''
 +
<nowiki>
 
{
 
{
 
   "type": "RANGE",
 
   "type": "RANGE",
Line 47: Line 57:
 
   "upperBound": 200,
 
   "upperBound": 200,
 
   "timeHysteresis": 0
 
   "timeHysteresis": 0
 +
}</nowiki>
  
}
+
=== Evaluation with delay ===
``` 
+
PAB evaluates to <code>TRUE</code> when Output 1 '''Load''' is '''between 200 and 300 Watts for 5s'''.
Podmínka se vyhodnotí jako **true** v případě, že se hodnota proudu bude nacházet mezi 100 a 200 mA po dobu 5s.
+
 
```
+
<nowiki>
 
{
 
{
 
   "type": "RANGE",
 
   "type": "RANGE",
 
   "source": "OUTPUTS/1/CURRENT",
 
   "source": "OUTPUTS/1/CURRENT",
   "lowerBound": 100,
+
   "lowerBound": 200,
   "upperBound": 200,
+
   "upperBound": 300,
 
   "timeHysteresis": 5
 
   "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"
 +
|-
 +
! Variable
 +
! Value
 +
! Description
 +
|-
 +
| type
 +
| ZONE
 +
| 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
 +
|}
  
Podmínka se vyhodnotí dle stanovených zón v případě, že se hodnota proudu bude nacházet v jedné ze zón po dobu 10s.
+
== Examples ==
Př.: Pokud bude proud 130mA po dobu alespoň 10s, vyhodnotí se podmínka jako 2 (číslo zóny).
+
 
```
+
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.
 +
 
 +
<nowiki>
 
{
 
{
 
   "type": "ZONES",
 
   "type": "ZONES",
Line 75: Line 124:
 
   ],
 
   ],
 
   "timeHysteresis": 10
 
   "timeHysteresis": 10
}
+
}</nowiki>
```
 
 
 
## Otázky / Připomínky
 
* Digital inputs - states?
 

Revision as of 12:01, 18 February 2022

The PAB (Power Analysis Block) is a function available for NETIO devices that periodically evaluates sets of conditions. Based on these conditions, subsequent Rules can be executed. These conditions can consist of one or more of following 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 ZONE 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
}