LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

summation of power. Wind turbine monitoring

Solved!
Go to solution

Have 2Kw home wind turbine. Have a labview U3 interface so that I can have my PC monitor voltage and current entering 48 volt battery bank.

I have two scaler values in this Labview VI I'm making. ONe for current and one for voltage from sensors on my battery and regulator.  To get power (Watts)

I run them through a Labview multiplier function (as volts X amps = power in watts). That's all well and good but I'd like to make a long term power meter and not just have instantanious

power. So what I'd like to know is does anyone know a VI function or subcircuit (for lack of a better word) that could take as an input a scaler value which in this case is watts

and add  it second by second by time over time to yield a final result of Kilowatt-Hours? It to me, a fairly novice Labview user, this need screams for an integration function (area under the graph thing).

I've tinkered with the Labview integration function but as of yet no luck possibly because I don't know how to feed a meaningful signal into the upper and lower limits input.

 

                                             Many thanks in advance! This is an awsome forum.   Greg.

0 Kudos
Message 1 of 10
(4,069 Views)
Solution
Accepted by topic author bratvold
Use a While loop with a timeout (Wait function) delay as 1sec. Configure a Shift Register (SR) by rt-clicking the border of the While loop. Wire a Numeric constant of appropriate datatype to the left-side terminal of the SR. Use an adder function to add the instantaneous power for each second & stop the While loop after based on the logic after certain amount of timeout. Wire an indicator to the right-side terminal of the SR, you ll get the total power got over a period of time.
Message Edited by parthabe on 10-19-2009 11:05 PM
- Partha ( CLD until Oct 2024 🙂 )
Message 2 of 10
(4,063 Views)
Look up shift register.
0 Kudos
Message 3 of 10
(4,059 Views)

There us a power usage (generation) VI in this LabVIEW example library:

http://zone.ni.com/devzone/cda/tut/p/id/8652

 

Preston Johnson
Solutions Manager, Industrial IoT: Condition Monitoring and Predictive Analytics
cbt
512 431 2371
preston.johnson@cbtechinc
0 Kudos
Message 4 of 10
(4,039 Views)

Thanks Parthabe! With your verbal description and a labview example I muddled together a working power meter based on the "do while" loop with shift register.

Only problem now is nothing else outside the loop is getting done during execution.(which should come as no surprise)  I have other calculations and function calls that need to be done in my main program. Do you think maybe another control structure might also work with the shift register idea? Like "Timed structure", or "Event structure".  I used to program Visual Basic back in the day and I recall a function loop called "on time" (or something like that) where all the code within that module will execute based on a specific amount of time passing then return control to the main program. Has anyone ever used the integration function in the mathematics palette? It sure seems like this is an application that fits the Integral perfectly. Adding tiny amounts of a rate changing input over time. Attached is a screen cap of my working meter. Just using scaler values from a Voltage and Amperage knob for now before configuring it to take in real world data from my LabJack U3.

0 Kudos
Message 5 of 10
(4,020 Views)
Unfortunately the screenshot you posted doesn't show anything else but the while loop.  So we don't know what other code not getting executed you are talking about.
0 Kudos
Message 6 of 10
(4,010 Views)

You have a wait in the power loop which only runs once per second so any parallel loop should run with almost no interference from the power loop.  Is your other code in a loop (with a wait)?

 

Lynn 

0 Kudos
Message 7 of 10
(4,003 Views)

The screen cap above did not include any of my other VI circuitry because I haven't merged this power meter application with it yet. (my main app is attached) All I had put together this morning was the power meter.  Wanted to test it independently first. The primary VI was NOT in any kind of structure so that's probably an issue right there.  I'm right now reading up on data flow and structures so I expect to change that.  This is only my second attempt to do something in Labview so I apologize in advance for sounding like I don't really know what I'm doing. 🙂 Everyones input is appreciated.  I'm reading up on shift registers now. 🙂 Greg.

0 Kudos
Message 8 of 10
(4,000 Views)

bratvold wrote:

 

The primary VI was NOT in any kind of structure so that's probably an issue right there.  


Hi Greg,

 

I assume that you mean the Main VI by this term...

 

Yes, without one more while loop (structure), it ll execute whatever code is there just once, and enter this power calc while loop & execute it forever, till the time you stop the loop manually using a button or or thro' some programmatical approach.

 

In your code picture earlier, what you need to do is to move the Numeric indicator outside of the while loop to get the sinal summed up value of power obtained after all the iterations are over.

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 9 of 10
(3,981 Views)

Yes Partha, I meant the main VI wasn't in a loop. Up till this project whenever I experimented with a circuit I clicked on the "run continuously" so I wasn't aware that things not in a control loop of some kind only ran once. Makes sense to me now. BTW I did put the total power created readout INSIDE the loop because I want that info displayed all the time and not just when the loop was closed. In fact the power summation circuit in my application is going to be on all the time and only closed with the closure of the entire program.  I studied a bunch of examples of the shift register and control loops and have a better feel for things.

 

  I cut N pasted some VI examples provided with my card and now also have incorporated a frequency counter into the mix. I'll be using this with some zero crossing detector circuitry to have the RPM of the turbine displayed. Up till this point I didn't know you could just drag and drop working examples or parts of examples onto your project. That is Soooo awesome! Next challenge now is to put some kind of file read/write to have the power summation VI record the cumulated power value so you can restart the computer or application and have the program always have the lifetime power produced. Be thrilled to hear any suggestions on where I should look for the simplest solution to that. Attached is a screen cap of everything in my project right now.

 

                                               Thanks again for the help. If you ever need anything from a machine shop, email me. 🙂  Greg.

0 Kudos
Message 10 of 10
(3,968 Views)