Hi, <br /><br />I would want to thanks everyone who tried to solve my problem. The method proposed by mister Netterfield is exactly what I was searching for. I will set a delay on my hardware so the sample will be every second, this way I will be able to use you method. Because I don&#39;t have acces to the hardware for the moment I can&#39;t test you solution. But, I just want to be sure of something. If I input the start and end of the sample will this vector will update itself and sample it for each hour ? I know you talked about that in your email but will this iterate automatically ? I also wanna know if it&#39;s possible for KST to parse data on a COM port and flush the value every day? <br /><br /> Thanks <br /><br />On Mar 9, 2011 7:09pm, Barth Netterfield &lt;netterfield@astro.utoronto.ca&gt; wrote:<br />&gt; Are the data evenly sampled?<br />&gt; <br />&gt; <br />&gt; <br />&gt; If so: (this is for kst2.  kst1.x is similar).<br />&gt; <br />&gt; <br />&gt; <br />&gt; When you read in the data (eg, data wizard page 3, or in the vector<br />&gt; <br />&gt; dialog), you will see in the &quot;Data Range&quot; widget an option<br />&gt; <br />&gt; &quot;[ ] Read 1 sample per ________ frames  [ ] Boxcar filter first&quot;<br />&gt; <br />&gt; <br />&gt; <br />&gt; If you select both of these, and set the number of frames to the<br />&gt; <br />&gt; number of samples in an hour, then the data vector you read will be<br />&gt; <br />&gt; sampled once per hour, and will contain the average over that period.<br />&gt; <br />&gt; <br />&gt; <br />&gt; eg, if you sample the data once per second:<br />&gt; <br />&gt; [ x ] Read 1 sample per _3600_ frames  [ x ] Boxcar filter first<br />&gt; <br />&gt; <br />&gt; <br />&gt; The resulting vector will contain the average for each hour, sampled<br />&gt; <br />&gt; once per hour.<br />&gt; <br />&gt; <br />&gt; <br />&gt; Then use an equation to multiply by the cost per kWhr to give the cost per hour.<br />&gt; <br />&gt; <br />&gt; <br />&gt; If you want the integrated cost, you can use the Cumulative Sum filter<br />&gt; <br />&gt; (in the plot-&gt;rmb-&gt;Filter-&gt;[Curvename] pulls up the filter dialog.<br />&gt; <br />&gt; Then select &quot;Cumulative sum&quot;.  Set the value of your dX, and perhaps<br />&gt; <br />&gt; chose to place the curve in a new plot).<br />&gt; <br />&gt; <br />&gt; <br />&gt; If the data are not evenly sampled, it is going to be hard to deal with in kst.<br />&gt; <br />&gt; <br />&gt; <br />&gt; cbn<br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; On Mon, Mar 7, 2011 at 10:49 PM,  mathieu660r@gmail.com&gt; wrote:<br />&gt; <br />&gt; &gt; Hi,<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; &gt; I&#39;m new here and I find KST a really great tool for fast and efficient<br />&gt; <br />&gt; &gt; plotting. I&#39;m currently using some hardware to measure the real power of<br />&gt; <br />&gt; &gt; some lights. I can plot the power easily and I can get the power value on<br />&gt; <br />&gt; &gt; the y axis and the time on the x axis. My question is a little bit complex<br />&gt; <br />&gt; &gt; so I will try to explain the best as I can if you have questions please ask.<br />&gt; <br />&gt; &gt; So I want to add all the value of a time sample ( example : all the value<br />&gt; <br />&gt; &gt; during 60 minutes and do it for each 60 minutes) and multiply the total<br />&gt; <br />&gt; &gt; value by another value to get an approximation of the cost of electricity.<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; &gt; Thanks,<br />&gt; <br />&gt; &gt; Mathieu R.<br />&gt; <br />&gt; &gt; _______________________________________________<br />&gt; <br />&gt; &gt; Kst mailing list<br />&gt; <br />&gt; &gt; Kst@kde.org<br />&gt; <br />&gt; &gt; https://mail.kde.org/mailman/listinfo/kst<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; --<br />&gt; <br />&gt; C. Barth Netterfield<br />&gt; <br />&gt; University of Toronto<br />&gt; <br />&gt; 416-845-0946<br />&gt; <br />&gt;