Torque

Forums

Forums

Help with Lookup fu...
 
Notifications
Clear all

Help with Lookup function

3 Posts
2 Users
1 Reactions
143 Views
 Hiej
(@hiej)
Posts: 180
Estimable Member
Topic starter
 

Hello folks,

 

even if this forum seems dead, I'll try to see if I can get some help.

 

I have a PID for parking sensors that needs this formula: ((256*A)+B)/100.

when sensors does not sense obstacles the pid returns FFFF, so once the the equation is applied is shown 655,35 meters.

Doing some test I seen that the sensors start to sense obstacles far more or less 2 meters.

That I want to do is to use LOOKUP function in way that wheen the pid returns FFFF, instead to show 655,35 it show a text, and when the value is different to FFFF it shows the value.

 

I think that is possible using LOOKUP, but I dont understand how to create the equation.

 

please help 😀

 
Posted : 02/06/2026 12:50 am
(@cintakc)
Posts: 1667
Noble Member
 

LOOKUP((256*A+B)::65535='Text':0~65534=((256*A+B)/100))

 
Posted : 02/06/2026 6:16 am
1
 Hiej
(@hiej)
Posts: 180
Estimable Member
Topic starter
 

it works! thank you!

 
Posted : 02/06/2026 7:30 am
Share:

  Follow me on twitter