Jump to content

Recommended Posts

Posted
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
Posted
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.
Posted
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".

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...