11-19-2012 03:57 PM
Hey NI Labview World,
I'm currently trying to find a way to integrate an incoming signal on a waveform graph. I'm relativly new, but am comfortable with Labview operations by now.
Problem Statement:
I need to integrate a recorded voltage signal on x-axis limits I can set.
Current Hypothesis:
My plan was to put two cursors on my graph, single-plot cursors, and then use the integration function to find the area underneath my signal between the two cursors. I've attached a photo of what I've done, but not the code. I've linked my property notes to the waveform graph, as you can see, then inputed them into an array to input into the integration function.
Believed Problems:
I don't know if my block diagram knows which cursors I'm talking about in my front panal. aka I don't know how to set "active" cursors or what that entails.
I also don't know if LabView recognizes my signal as the "function" I want to integrate the area under, or how to check/set this.
Sorry to bother, its something I haven't quite been able to figure out, so I figured I'd use my resources.
Michael
11-19-2012 04:40 PM
You can use a single property node with four terminals: (top to bottom: active cursor, cursor index, active cursor, cursor index) Make the active cursor proerties to write and the rest to read. Property nodex execute to top bittom, so wire a zero to the top and a 1 to the middle and read the two indices (I assume that the cursor is locked to the plot).
Using "Max&Min" the calculate the index (min) and size (e.g. max-min+1) to take an array subset of your data, then integrate it. (Integrating the cursor positions as you currenty do makes no sense!)
Use a state machine architecture and an event structure using "cursor changed" events to do everything interactively.
(Please attach some real code, instead of two identcal pictures.)