MIN - MAX values

Hi…Is there any option to display min max values from adu internal variables? Or is this option restricted to ECU variables only?

Only the ECU variables have built-in min/max values.

You can set up your own numbers to do this, but it’s a bit of a pain if you need to do it for a lot of channels, and uses a few resources. See the example below for tracking the min/max of an oil pressure sensor.

We have a function valuesEstablished, which is false for 1 second on start up, then true forever. This and the …Calc numbers are to stop the min and max from defaulting to a zero value initially. Someone may know a cleaner way to do this.

oilPressure is an analog input in this case, but could be a CAN import, number or whatever.

oilPressureMinCalc is set to oilPressure for the first second, then set to oilPressureMin.

oilPressureMin is set to the lower of either oilPressure and oilPressureMinCalc.

The max behaviour works the same way, but by selecting the higher value instead of the lower.

To save some number resources, you can get rid of the …Calc numbers and use this logic for the min/max numbers:

O Man! Appreciate that work you put on this to explain me that but im lost :smiley: Until value estabilished function im in but then im lost…so i tryed to replicate your work fo r a couple of different ways but cant succeed…Im trying to save MIN - MAX for Adu internal G sensor

Hey.

I am also struggling with min max values on my adu7.

Can some one please share project file with complease data set for one sensor as an example?

Once I read this I thought it was clear and understandable, but once I try to replicate I understand that there are missing variables that I have to create and concept in general is very foggy.

min max example.adu (6.7 KB)

I’ve attached a barebones example using the internal ambient light sensor.

You’ll see in the video below, the min and max values start to track after 1s. That 1s is the delay in valuesEstablished, which prevents the min/max picking up a zero value immediately, before we have real values available.