Brain Frazzled - Input Processing

Hi, Ive been working on input logic today and I'm at a point where my brain is completely frazzled! Can somebody cast their eye over the code to see if there is any errors... This input is on the supply cable so a positive and negative value can be expected, depending on the solar pv.

1              Log to feed                        Node emonTx_Node9: Supply

2              Allow positive

3              Power to kWh                  Node emonTx_Node9: Supply Import

4              Power to kWh/d               Node emonTx_Node9: Supply Import KWh Day

5              x              0.09375

6              Power to kWh                 Node emonTx_Node9: Total Import Cost             

7              Power to kWh/d              Node emonTx_Node9: Daily Import Cost

8              Reset to Original

9              If <=, skip next  0

10           Reset to ZERO

11           + input                             Node emonpi:TotalGeneration Combined Solar PV

12           Power to kWh                  Node emonTx_Node9: Solar Power Used KWh  

13           Power to kWh/d               Node emonTx_Node9: Solar Power Used KWh Day

14           x              0.09375

15           Power to kWh                  Node emonTx_Node9: Solar Power Used Total Saving 

16           Power to kWh/d               Node emonTx_Node9: Solar Power Used Daily Saving

17           + feed                             Node emonpi: Combined FIT Costings              

18           Power to kWh                  Node emonTx_Node9: Total Savings Plus FIT 

19           Power to kWh/d               Node emonTx_Node9: Daily Savings Plus FIT 

20           Reset to Original

21           Allow negative

22           x              -1

23           Power to kWh                  Node emonTx_Node9: Supply Export 

24           Power to kWh/d               Node emonTx_Node9: Supply Export KWh Day

25           Reset to Original

26           + input                             Node emonpi:TotalGeneration Combined Solar PV

27           Log to feed                       Node emonTx_Node9: Local Demand

28           Power to kWh                   Node emonTx_Node9: Local Demand KWh

29           Power to kWh/d                Node emonTx_Node9: Local Demand KWh Day 

30           Reset to ZERO                                                  

31           + feed                                Node emonTx_Node9: Total Savings Plus FIT 

32           - feed                                 Node emonTx_Node9: Total Import Cost

33           Log to feed                         Node emonTx_Node9: Revenue Minus Import Costs

34           Max daily value                   Node emonTx_Node9: Daily Revenue Minus Import Costs

M0n0wall's picture

Re: Brain Frazzled - Input Processing

Also is it possible to set an input to a figure, in my case the electricity unit cost of 0.09375 within one input, reason being is that I can change it in one place and it will push the figure out to all processing feeds.

 

Regards

Dave

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.