Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Read a PID but only when ECT is above certain level

Pages: [1]
Author Topic: Read a PID but only when ECT is above certain level
stuko
Member
Posts: 3
Post Read a PID but only when ECT is above certain level
on: June 30, 2020 (GMT)

iI have a custom PID that tells me the injector correction on my Mercedes CDI diesel. I will filter and average these values as an early warning feature that should be able to detect an overfuelling injector.

Thr problem is that the correction values are only relevant once engine temperature is above 80 degC. So I dont want zeores or warmup values to be incorporated into the averaging function.

I am using my own custom BT adaptor (arduino) so I couod make it respond with NO_DATA during warmup. But will Torque resume asking for the PID after a long warmup? It seems to me Torque stops asking for PIDs that respond with NO_DATA?

Is there anything else I could do. I have access to ECT in Torque but there is no conditional branching allowed in the custom PID equation. I could make the result zero when ECT is less than 80, bit I dont want the value of zero propgating into the averaged result.

eg RAVG(inj1corr) should only operate when ECT > 80

Capp777
Member
Posts: 2824
Post Re: Read a PID but only when ECT is above certain level
on: June 30, 2020 (GMT)

Maybe something like…

lookup(Val{ECT}::0~80=0:81~215=RAVG(Val{inj1corr}))

The Val{} long names will need to match
your pid names.

stuko
Member
Posts: 3
Post Re: Read a PID but only when ECT is above certain level
on: July 1, 2020 (GMT)

Thanks. I had assumed the LOOKUP function only allowed constant results. I will give it a go.

Also do you know if Torque caches a PID response if it is used for multiple values? Like I have PID 2128 that provides 5 injector correction values in the single response. I know how to extract each of the 5 injector values individually in separate PID entries, but does that mean Torque will request the PID 5 times?

In other words, will Torque pull A into one PID from 0x2128, and B into another PID from 0x2128, without requesting 0x2128 twice from BT?

Capp777
Member
Posts: 2824
Post Re: Read a PID but only when ECT is above certain level
on: July 1, 2020 (GMT)

I am under the impression that Torque is
optimized to minimize the number of
same requests per pass. (but only Ian
knows for sure. Hopefully he will confirm
this).

Pages: [1]
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.096 seconds.

  Follow me on twitter