rasProject_01 / weSweetHome  R. 240
process control       /     RasPi software         by   weinert-automation
Loading...
Searching...
No Matches
weAR_N4105.c File Reference

support for VDE-AR-N 4105 More...

#include "weAR_N4105.h"
#include "weStateM.h"
#include "weUtil.h"

Functions

void arn4105TimChg (state_t *const me)
 AR-N 4105 control timer state change function. More...
 
void setARN4105state (uint8_t const state, uint8_t const select)
 Set AR-N 4105 frequency and voltage states. 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...
 

Detailed Description

support for VDE-AR-N 4105

Copyright (c) 2019 Albrecht Weinert
weinert-automation.de a-weinert.de
/ / /\
/ /___ / \ |
\ /____\ /____\ | _|__
\ /\ / \ / \| |
\/ \/ \__/ \__/|_

Revision history

Rev. 234 20.01.2021
Rev. 195 01.03.2019 : new
Rev. 202 28.04.2019 : minor (timer macro change)

Function Documentation

◆ setARN4105state()

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.

Parameters
statestate_t.status of the five band checker in question
selectselection mask

◆ arn4105TimChg()

void arn4105TimChg ( state_t *const  me)

AR-N 4105 control timer state change function.

It signals the timer state to the function arn4105TimChg.

Parameters
mepointer to the AR-N 4105 control timer

Variable Documentation

◆ checkLineFrq

state_t checkLineFrq

The (one) five band checker for line frequency.

See newLineFcheck

◆ checkL1_U

state_t checkL1_U

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

◆ checkL2_U

state_t checkL2_U

The (one) five band checker for line L2 voltage.

See newLineUcheck

◆ checkL3_U

state_t checkL3_U

The (one) five band checker for line L3 voltage.

See newLineUcheck

◆ arn4105state

uint8_t arn4105state

AR-N 4105 frequency and voltage states.

If all is OK this status byte is 0. The meaning of bits set is

| 7 | 6 | 5 | 4 || 3 | 2 | 1 | 0 |
| L3 | L2 | L1 | f || L3 | L2 | L1 | f |
| voltage error | error || voltage warning | warning|

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.

◆ arn4105Timer

state_t arn4105Timer

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.