Graphics

 View Only
  • 1.  Noise meter with maximum dB field

    Posted 07-09-2019 21:01

    I am looking at implementing a noise meter with an input coming from an XML file.  This number should update automatically.  Then I would like to show the highest value reached.

    I've tried using the String Replace function in VL but that returns a Boolean value.  Is there something simple I'm missing?



  • 2.  RE: Noise meter with maximum dB field

    Posted 07-10-2019 17:06

    Now that I'm digging more into it, I'm having a hard time figuring out the logic.

    If the input decibel reading is higher than the max reading, I would like to update the max reading.  If that number drops below the max reading, the max reading value should remain unchanged.

    Hope that makes sense.


    #XPression


  • 3.  RE: Noise meter with maximum dB field

    Posted 07-18-2019 20:04

    Here's the approach I'd take; I don't have access to the software right now.

    1 hidden text field is hooked up to your data source, 1 hidden text field is your max value (default to 0).

    Add an event listener to the hidden text field hooked up to the data source OnSetText; from there, you'll grab the other text field, compare the max value field and the updated current value passed to the OnSetText function, if it's larger, make the text of the max value text field the new value. Otherwise you do nothing.

    There may be a more elegant solution using Visual Logic, but it's a fairly simple thing in scripting too.


    #XPression