Owain Posted March 19, 2015 Report Posted March 19, 2015 Now, I know this is simple... kW * H = kWh... My problem is different... I have a power monitoring device (Diris A40) with a 4-20mA module giving me instantaneous power in kW, and from that I need to generate the previous 7 days kWh. Can it be done? I have a function block that takes a pulse to generate totals, and if I can generate this pulse from another bit of code I would sleep a lot better at night. I'm thinking of taking a rolling average over an hour and generating a pulse every ( 1 / AveragekW ) hours, or ( 60 / AveragekW ) minutes. Would this work? My brain is fried right now which I why I'm asking for help. I'm not asking for anyone to write my code, just outline how I might go about this or tell me I'm stupid and you simply can't do it. Before anyone says, this is for use over hundreds of aging sites, so it's cheaper and easier to develop a function block than buy the pulse module for the Diris. Thanks in advance Quote
Steve Bailey Posted March 19, 2015 Report Posted March 19, 2015 You could accumulate kWh over a one hour period. Also create a buffer of 168 elements. At the conclusion of the hour, push the latest hour's kWh into the buffer and push out the oldest value. The sum of all 168 values in the buffer is the total over the past seven days. Quote
MrAutomation Posted March 21, 2015 Report Posted March 21, 2015 What PLC are you using? Many PLCs have a Totaliser function to accumulate volume based on measured flow rate. This is basically the same application, but kWh is the measured "volume" and kW is the "rate". Quote
Owain Posted March 22, 2015 Author Report Posted March 22, 2015 Nailed it, thanks guys. I basically modded an old flow totaliser block (like Mr Automation suggested), works a dream. Thanks all round Quote
MrAutomation Posted March 22, 2015 Report Posted March 22, 2015 No problem. Glad to know it worked out for you! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.