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.
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.
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.
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 🙂
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.
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