LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array Max/Min not working with Waveform chart - History data property node


@Ben wrote:

I had previously avoid many of the WF functions becuase they were implemented badly.


No kidding.  It seems every time I need a function from that palette I later regret it due to performance issues, and end up re-writing the same function as a postage stamp subVI without Always Copies thrown around, controls not on the root of the diagram, and just all around unnecessary, or inefficient code.  I just tell myself that NI wrote the functions to be more generic (and two decades ago), or have more use cases than mine.  But really NI has several submissions to the Rube thread with that palette and their subpalettes.

Message 11 of 13
(486 Views)

@JÞB wrote:

@Ben wrote:

@JÞB wrote:

Ben and RF's excellant suggestions not withstanding,....

Try This

Capture.PNG

Oh yes, there is a Waveform min max


That works for a WF chart that is defined at a single WF. For an array of WF's then another for loop will be required and another pair of Max and Min array checks

 


  Which loop did I miss? Smiley Very Happy


When you have multiple channels displayed in a WF chart, you get a 2-D array of WF's from the history node. The first deminsion indexed from the history data is the updates to the chart as they were posted. The second indexing is the channel info. So to you have to figure out which of the channels to select to do the max min of all of the updates.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 13
(472 Views)

@Hooovahh wrote:

@Ben wrote:

I had previously avoid many of the WF functions becuase they were implemented badly.


No kidding. ...


Thank you for backing me up!

 

The two fucntions I looked at (max min and final time) seemed to have a valid strcuture now. It would have been nice if those changes had amde the upgrade notes. I may have investigated them earlier. But then again... anouncing that they fixed what had previously been released could have been an admision of a screw-up.

 

Either way, I am going to take a look next time I am thempted to "roll-my-own" WF fucntions.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 13
(470 Views)