01-14-2022 11:14 PM
Hello everyone, I am new to Labview, please forgive me.
Question 1:
Figure 1:
Figure 2:
X input is the voltage value, Y input is the current value, if you want to find the area of the white in Figure 1, is there any way? Thank you
I searched online and tried to use Integral x(t) PtByPt VI to do it, but the values are weird (there will be negative values).
Question 2:
Figure 3:
Is there a way to directly get the real-time amplitude value on specific frequency (such as 150Hz)? Thank you
Solved! Go to Solution.
01-15-2022 12:09 PM - edited 01-15-2022 12:11 PM
(1) All you have are lines. Please define what you mean by "area".
(2) Please give us your definition of all terms used ("directly", "real-time", etc.). This seems to be a frequency domain spectrum, so it needs to be based on data covering a time range. Where does the data come from? How is it transformed?
We can probably help if you attach your VI containing typical data.
01-17-2022 05:11 AM
Thank you for altenbach’s attention.
(1) I want to have a value to represent this graph for compare with other VI trajectory. Thus, I want to find all the area occupied by the white line.
(2) This frequency domain spectrum come from the current value which is taken by a CT and DAQ USB-6008. And I have uploaded my vi file below.
Thank you so much.
01-17-2022 10:26 AM - edited 01-17-2022 10:29 AM
(1) Your "line" is a 1D object in 2D space and does not have any area at all unless you define what you actually want (e.g. The area enclosed by the outermost lines.) Just blindly throwing an integration function at it makes absolutely no sense.
(2) You only answered 25% of my questions (or less)
About your code:
It all seems to be "Baby LabVIEW" with almost all express VIs and opaque dynamic data. For me, this is impossible to even troubleshoot. I don't have any drivers installed, so I cannot look at your express configuration. I don't have any data. Your xy graph clears data on each call, so why do you even need that express VI? Did you know that charts can show a built-in digital display, eliminating some of your indicators? It is also very annoying if the front panel and diagram is maximized to the screen. What's the reason?
Once you'll upgrade your code to "Adult LabVIEW", things will be easier for us.
01-25-2022 07:28 AM - edited 01-25-2022 07:34 AM
(1) I have tried to use Green' s Theorem to do this, but it is not work, because the value is still changing when the graph is stable.
How can find the biggest area of this XY graph (shown as below red line)?
(2) I have solved the problem by using index array. Thanks a lot.
01-25-2022 10:17 AM - edited 01-25-2022 10:20 AM
01-26-2022 10:23 AM
For the first image in my last reply, it is refer to the Green's theorem. (https://forums.ni.com/t5/LabVIEW/How-to-calculate-area-of-a-XY-graph/td-p/2225898) I am using the code it this post and add it to my code's XY input (Voltage and current value). And I also tried Polygon Area VI.
The XY graph is VI trajectory plotted by the voltage and current waveform which are taken by USB-6008 real-time. The current waveform will change depended the power load.
Power load 1)
Power load 2)
You can see that there is fluctuation in the "V-I index" when the graph have no significant change in above two examples. I think that I need to simplify the graph to outermost edge line only like the red line area photo in my last reply, then use Green's theorem or Polygon Area VI. But I have no idea for the simplification.
01-26-2022 11:34 AM
We don't have access to your measurement. You need to include some typical data!
(... and why is the front panel maximized to the screen. So annoying to stare at 80% useless gray! 😞 )
01-26-2022 05:04 PM
See if this can give you some ideas. It would be easy to e.g. also smooth the area outline.
Calculation is purely numerical, but most likely sufficient for this.
(Probably needs a few tweaks. 😄 )
02-01-2022 12:34 PM
Did you ever solve your problem?