rasProject_01 / weSweetHome
R. 240
process control / RasPi software by weinert-automation
|
Definitions for VDE-AR-N 4105. More...
Macros | |
#define | L1Msk |
arn4105state L1 voltage mask | |
#define | L2Msk |
arn4105state L2 voltage mask | |
#define | L3Msk |
arn4105state L3 voltage mask | |
#define | LeMsk |
arn4105state line status error mask | |
#define | LfMsk |
arn4105state line frequency mask | |
#define | LwMsk |
arn4105state line status warning mask | |
#define | newLineFcheck(N, C) |
Define a five band checker for line frequency. More... | |
#define | newLineUcheck(N, C) |
Define a five band checker for line voltage. More... | |
Functions | |
void | setARN4105state (uint8_t const state, uint8_t const select) |
Set AR-N 4105 frequency and voltage states. More... | |
void | switchARN4105 (uint8_t const cutOff) |
AR-N 4105 implementation function. More... | |
Variables | |
uint8_t | arn4105state |
AR-N 4105 frequency and voltage states. More... | |
state_t | arn4105Timer |
AR-N 4105 control timer. More... | |
state_t | checkL1_U |
The (one) five band checker for line L1 voltage. More... | |
state_t | checkL2_U |
The (one) five band checker for line L2 voltage. More... | |
state_t | checkL3_U |
The (one) five band checker for line L3 voltage. More... | |
state_t | checkLineFrq |
The (one) five band checker for line frequency. More... | |
Definitions for VDE-AR-N 4105.
Revision history
#define newLineFcheck | ( | N, | |
C | |||
) |
Define a five band checker for line frequency.
A state machine of this type is to be fed with the actual line frequency (nominal 50 Hz) as an analogue (float) value sampled regularly. This value is compared to four thresholds namely
47.7 49.5 -OK- 50.5 51.5 Hz
defined by VDE-AR-N 4105 as good / warning / bad criteria for the grid frequency separating those five bands:
...badLO | critLo | OK | critHi | badHi...
On badHi or badLo distributed small generators must be cut off reliably from public power lines. For being switched on to the grid at OK often at least 10 minutes out of bad ist required.
For state values and parameters see newFiveBand
This macro is the initialisation expression for a five band checker requiring the unique name and the fitting onStateChange function.
N | name as string literal |
C | onStateChange function |
#define newLineUcheck | ( | N, | |
C | |||
) |
Define a five band checker for line voltage.
A state machine of this type is to be fed with the actual line voltage (nominal 230 V) as an analogue (float) value sampled regularly. This value is compared to four thresholds namely
184 207 -OK- 253 264 V
defined by VDE-AR-N 4105 as good / warning / bad criteria for the grid frequency separating those five bands:
...badLO | critLo | OK | critHi | badHi...
On badHi or badLo distributed small generators must be cut off reliably from public power lines. For being switched on to the grid at OK often at least 10 minutes out of bad ist required.
For state values and parameters see newFiveBand
This macro is the initialisation expression for a five band checker requiring the unique name and the fitting onStateChange function.
N | name as string literal |
C | onStateChange function |
void setARN4105state | ( | uint8_t const | state, |
uint8_t const | select | ||
) |
Set AR-N 4105 frequency and voltage states.
This function is called internally by the respective five band checker's state_t.onStateChange function.
Parameter selection mask must be one of LfMsk, L1Msk - L3Msk.
state | state_t.status of the five band checker in question |
select | selection mask |
void switchARN4105 | ( | uint8_t const | cutOff | ) |
AR-N 4105 implementation function.
This is the VDE-AR-N 4105 cut off function to be provided site specific by user / application software. It does the cut off respectively switch back on the generators and optionally log the event.
cutOff | not 0: do the cut off, 0: switch generators back on |
|
extern |
The (one) five band checker for line frequency.
See newLineFcheck
|
extern |
The (one) five band checker for line L1 voltage.
In a one phase system this will be the only one fed with values by fiveBandTick.
See newLineUcheck
|
extern |
The (one) five band checker for line L2 voltage.
See newLineUcheck
|
extern |
The (one) five band checker for line L3 voltage.
See newLineUcheck
|
extern |
AR-N 4105 frequency and voltage states.
If all is OK this status byte is 0. The meaning of bits set is
If any error bit is set the respective generators has to be cut off.
Ten minutes after the last warning bit is gone the respective generators may be put back to power line.
The timer arn4105Timer will be handled accordingly.
User software should not touch this variable (except when knowing the consequences.
|
extern |
AR-N 4105 control timer.
When this timer is running distributed small generators must be cut off. When this timer stops the respective generators may be put back to power line.
User software must provide a function switchARN4105 doing the cutoff and switch back plus optionally logging. It will be called by this timer and, hence, in the end by the frequency and voltage checkers.
The user/application software must check (timerTickCheck) regularly to enable switch back.