From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display kWh cumulative?

Hi All,

I am writing a simple labview program to display and monitor a Solar farm installation (code attached).

I have all working properly, data is taken from my DAQ and displays power consumption of our plant compared to power generated by solar farm.

I would like to add a display of total killo Watt hours generated by the solar array to date.


I understand it would have to average out the value of solar kW generated every hour and somehow store that value than add it to the next hourely average than somehow display this cumulative number?

I am completely stumped as to where to start on this, any tutorials or tips would be greatly appriciated I am a total labview novice.

0 Kudos
Message 1 of 7
(4,209 Views)

You need to cumulate at each loop iteration the product of your power signal by the loop time.

 

Energy = Energy + Power * Loop delay (s)/3600

 

Power in kW, Loop Delay in seconds, Energy will be in kWh

 

In your screenshot we don't see any loop wait function or anything.

0 Kudos
Message 2 of 7
(4,200 Views)

Please attach code (meaning VIs).  A picture of code means we need to code it ourselves if we want to test what you've done -- don't make us work so hard in order to help you, please.

 

Bob Schor

0 Kudos
Message 3 of 7
(4,171 Views)
And please get rid of the dynamic data. It's impossible to say how your DAQ Assistant is configured. If you are taking multiple samples, you are discarding the majority of the data by wiring the dynamic data to scalar indicators. That is part of what makes dynamic data so evil. It hides that from you.
Message 4 of 7
(4,154 Views)

Hey thanks for the replies!

 

I attached the .vi file hopefully this works.

 

I am not sure what Dynamic data even means.. I am extremely new to this and wrote this code to be as simple as possible. The current code seems to work well displaying Solar power generated, vs power drawn by the building. If there is a better way to do this to keep the accuracy I am all ears as long as it doesnt complicate the code beyond my very basic abilities :p.

 

What I am trying to add to this software is a display that stores and displays the total kW generated by the solar data imput to date. This would somehow have to be immue to any interruptions to the software run and somehow store this cumulative number in memory.

 

Thanks again all, and applogies for my ignorant questions 🙂

 

 

0 Kudos
Message 5 of 7
(4,104 Views)

Dynamic Data is the blue wires you have in your VI.  They go along with Express VI's so that a newbie can throw down some code and everything magically interconnects and hides the details of what is actually going on in the Express VI's and exactly the format of the data flying through the wires.

 

That blue wire may be scalar, an array, a waveform, a boolean, boolean array.  Whatever it needs to be so that those express VI's can connect without broken wires, whether it is carrying the data you actually want is another story.

0 Kudos
Message 6 of 7
(4,091 Views)

Hi ericm86,

 

You could try to use the DAQmx VIs instead of using DAQ Assistant, so that you do not use Dynamic data,

 

Here is a tutorial that might give you an idea of how to get started using the DAQmx VIs.

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications

http://www.ni.com/white-paper/2835/en/

 

Regards,

 

Carolina

0 Kudos
Message 7 of 7
(4,028 Views)