03-09-2019 10:39 AM
@MrRao wrote:
can u explain me how did you got time in hrs.
Who are you asking? And please use full words and not "textspeak". "U" is not a word. "You" is.
Can you attach your VI? We can't see from a picture what is happening inside the Express VI's. If your Elapsed Time express VI is set for the time elapsed since theVI began, then your VI is wrong. Have you tried running it to see if the results seem reasonable?
Have you sat down with a piece of paper and sketched how with either pseudocode or a flow chart how the VI should run and the calculations are performed?
03-09-2019 11:31 AM - edited 03-09-2019 11:32 AM
I'm Sorry for the mistake, i have attached VI,, kindly suggest if it is wrong.
03-09-2019 12:19 PM
I can't open your (Dreaded) DAQ Assistant Express VI, so I have no idea how you are "clocking" the rate of sampling (I'm guessing it is one sample, "on demand", but this is completely a guess).
How do you expect the Elapsed Time Express VI to work? Have you read the Help description of this function? Have you tried putting this function, all by itself, inside a While or For loop and looking at how its Elapsed Time output changes? That would be a good thing for you to do to help you to understand your own code better.
Bob Schor
03-09-2019 12:52 PM
You are accumulating now, that is good. But your elapsed time is the time since you started the VI. So now you are doing the same mistake you did before, but are now accumulating that value over time.
I think you still haven't figured out your calculations on paper yet because the simple mistake you were making before, you have now exponentially made it worse.
Don't multiply by elapsed time. Since you are collecting 1 second worth of data, just divide that by 3600 to get hours. Multiply by the Watts get watt-hours. Divide by 1000 to get kWh. Accumulate that in the shift register.
03-09-2019 11:54 PM
Is this method you are telling to do for kwh, kindly correct it, if it is wrong, I'm using myRIO for acquiring data from current sensor.
Thank You.
03-10-2019 12:14 PM
It looks like you just posted the same VI you posted before and didn't bother to read anything I said.
DO NOT MULTIPLY BY ELAPSED TIME!
03-11-2019 09:36 AM
@MrRao wrote:
can u explain me how did you got time in hrs.
I am not sure who you are asking but since nobody has responded here's how I do it.
Generally speaking we are talking about elapsed time here.
I rarely use the "Elapsed Time" express vi, but instead use the "Get Date/Time In Seconds" to get a timestamp for start time (ST) and end time (ET) then do the math.
Elapsed time (in hours) = (ET-ST)/3600
BTW: 3600 is the number of seconds in 1 hour. LabVIEW timestamps are the number of seconds elapsed since the Epoch.
Remember you can do math directly on time in labVIEW