Custom Functions

Hello,

I need a little help with the Project_Tree.
I have a table t_tt_on with TPS as X-axis and RPMs as values.
Similarly, I have a table t_tt_off with TPS as X-axis and RPMs as values.
I now need a function that switches an output or sets a variable to true if the RPM is greater than the Value of the Table and switches it off again if it falls below the Tables’ value.
I also need another output that is activated X RPM (preferably also with a 2D map) after the first one. Unfortunately, I can’t quite make sense of the documentation.

I need more clarification,

Lets stick to calling t_tt a ‘Table’ and not a ‘map’, as that confuses with MAP (manifold absolute pressure)

What is this for?
A function that is true above a certain RPM value and above a certain MAP value is a simple AND statement in a function.

I think i understand the want for a 2D table for the second one but that’s much easier done with a function using an AND statement again
function_1 AND (RPM>x)
You could do a 2D map that feeds said AND function as well.

If you can share your project file and explain a little more what you’re trying to do I can add the stuff described above for you to play with

1 Like

Hello,
I have changed it to table…
It is used for a rx7 fd sequentiel twinturbo control where I need to activate solenoids depending on RPM on a specific TPS value, thats why I have a t_tt_on and a t_tt_of table. I tried it with a logical function but it is only possible to compare with constants.

So what I exactly want to do is to switch the charge relief valve depending on the RPM and TPS for spooling up the secondary turbo and then activating the turbocontrol solenoids after specific time or engine revolutions and deactivate the charge relief solenoid again when turbocontrol solenoids are active. This is the implementation that Haltech uses out of the box and it works very good.

Is that signak on off? Just create table 3d table with variables you need on the axix fill table with zeros and one and result tabel use for control

but this will interpolate between the cells?

If you want to compare two variables - you can subtract them and compare sign.

n_difference = n_A - n_B
f_cond = (n_difference >= 0)

it uses round() – i.e. 0.51 after interpolation will be 1

Hello,
thanks for you reply.
This is my implementation, but not tested yet.

Is there a simulator/emulator-software available to test such things on the PC?

best regards

A 3d table with rpm and tps as axis and an output of 0 and 1 would take care of your situation. Use the 0 and 1 as the turn on off function. So you’ll need two things, a table and a function. Function is your output trigger. Zero is off, 1 is on. If you would like a different point for the shut off as the turn on, you can do that as well, it will just take a few more steps and higher number. Z axis referencing the table itself is a good way to have two different trigger points.