cancel
Showing results for 
Search instead for 
Did you mean: 

How to compare two inputs?

draco
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3

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

 

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.

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