06-17-2010 08:09 PM
Looking at my example, instead of adding 20 to the value of the shift register, which holds the index, add 10. But you need to leave the length of the sub-array to 20. Try to figure out what to do on your own. If you can't, someone else here will have to give you the solution because I am going out of town for a week tomorrow morning.
06-18-2010 03:39 AM - edited 06-18-2010 03:41 AM
HI,
Source: http://www.zes.com/download/application-notes/zes_applicat_105_leistungsmessung_e.pdf
Read 10ms (D0), calc the integral (I0) and keep that value in a shift register (init)
get the next 10ms of data (D1)
Now in a loop: while fetching the next 10ms of data (D2) calc the integral of the available 10ms D1->I1 and calc the RMS with I0,I1 and pipe the I1 in the shift register....
Sorry , a diagram would have tell more than the text and it would have been coded while typing ....currently no LV onboard...
Homework: How big is the error if you miss the periode of your signal? (assuming every possible start phase)