Skip to main content
Explorer
October 9, 2024
Solved

How to compare two inputs?

  • October 9, 2024
  • 1 reply
  • 1213 views

Hi, I am already able to visualize the data throuhg the monitor plot. I am trying to control a digital LED on the STM32 Cube Monitor based on a comparative condition. For example if I have two values being pooled, how can I set the thresholds between the values so that the LED has a TRUE or a FALSE state?

    This topic has been closed for replies.
    Best answer by stephane.legargeant

    Hello @draco 

    You can use the "processing node" Post-processing to generate a new data "variable1 > variable2" and then use this data with a s"Single value" filter to drive the LED.

    Step 1 : generate the comparison. For the configuration of post processing, see :

    Wiki: How_to_perform_additional_calculations_on_measurements 

    You should see the new data in the chart.

    Step 2 drive the LED

    To drive te LED, you need to extract the comparison with a Single Value and send it to the LED, it is like the example for a Gauge: wiki : How_to_send_data_to_a_gauge 

     

    Please, let us know if it is ok by setting the answer as accepted. 

    Best regards

    1 reply

    Super User
    October 9, 2024

    Welcome to the forum.

    Not clear if you're asking how to get the STM32CubeMonitor to do this, or how to do it in your embedded code running on your target microcontroller?

    https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

     

    dracoAuthor
    Explorer
    October 9, 2024

    Hi Andrew Neil, Thanks!  I was refering to working this out on STM32CubeMonitor. I have a case where I pool in two variables from the MCU. I would like to put in a comparative expression using this two variables based on the boolean state of the expression that LED has True or False.

    ST Employee
    October 9, 2024

    Hello @draco 

    You can use the "processing node" Post-processing to generate a new data "variable1 > variable2" and then use this data with a s"Single value" filter to drive the LED.

    Step 1 : generate the comparison. For the configuration of post processing, see :

    Wiki: How_to_perform_additional_calculations_on_measurements 

    You should see the new data in the chart.

    Step 2 drive the LED

    To drive te LED, you need to extract the comparison with a Single Value and send it to the LED, it is like the example for a Gauge: wiki : How_to_send_data_to_a_gauge 

     

    Please, let us know if it is ok by setting the answer as accepted. 

    Best regards