Torque

Forums

Forums

Guest  

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




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » IMPROVING PID READ SPEED - whacky IDEA?

Pages: [1]
Author Topic: IMPROVING PID READ SPEED - whacky IDEA?
F-150Torqued
Member
Posts: 437
Post IMPROVING PID READ SPEED - whacky IDEA?
on: August 29, 2017 (GMT)

Does anyone _KNOW_ if the bit test operator “:”, can be used against a virtual PID? ie {Val{Test}:0} or {Val{Test}:1} or something similar, ect.

Generally PID read speed is not a problem for me, but Ford (and I assume other vehicles) has LOTS of PIDS that contain a collection of flag bits. Example is the Comprehensive Components Monitor Status – this drive cycle. This PID requires NINE individual reads to display an ON/OFF gauge for showing completion of each of the Monitors represented by response to PID 095D ~ such as CATSTAT, O2STAT, EVAPSTAT, FUELSTAT, CCMSTAT, MISSTAT – ect. The transmission has several others.

The processor could process this faster than Bluetooth & the Adapter if I could populate a virtual PID (“Test”) with the contents of one read of 095D, then create gauges with equations testing bits of the virtual PID as in the above example.

Have not tried this yet. Will next time I’m connected. Just wondered if anyone had any insight.

———————

54371019

Capp777
Member
Posts: 2993
Post Re: IMPROVING PID READ SPEED - whacky IDEA?
on: August 29, 2017 (GMT)

I think the bit examination “:” only works
with variables. You might try AND instead.

Example:

Pid1=ABS(4) -> 0000 0100 i.e., {A:2}=1

Pid2=(Val{Pid1}&4)>2

In this case I’m testing for
bit 2. Result would be either
zero or one due to the bit shift of (2).

You would have to AND the appropriate
value for the bit under test. In this case
(4). 2 exponent desired bit (0-7).

You would have to shift bit under test by
desired bit (0-7). In this case (2).

So I would think what you envision can
be done with a virtual pid for each bit
to be examined.

Torque Pro is in a class of its own :-)

Edit:

I have asked Ian previously about giving
us the ability to read another pid’s variables
like Torque is doing with 0178. One read
populates four pids.

https://torque-bhp.com/forums/?wpforumaction=viewtopic&t=8871.0

F-150Torqued
Member
Posts: 437
Post Re: IMPROVING PID READ SPEED - whacky IDEA?
on: August 29, 2017 (GMT)

Good creative thinking. I can see that will work. I had planned to create a virtual PID for each of the nine assigned bits to associate ON/OFF gauges with – and one for a temporary work variable containing PID 095D A&B. So your method is same-o same-o. No problem. I’ll use ‘And’ with 1, 2, 4, 8, etc – 128 and shifts to get there. It will still limit the reads on the Bluetooth reads to one. All that binary shuffling is at processor speeds. Much faster.

Thanks Capp777

Shr-lnm
Member
Posts: 16
Post Re: IMPROVING PID READ SPEED - whacky IDEA?
on: August 30, 2017 (GMT)

I think that it is much simpler is to cache responses for some time and not to send the same requests to ECU one by one during refreshing one screen.

I suppose that the ‘torque’ is already optimized in this way and you do not increase parameters refreshing rate by such computations.

piemmm
Administrator
Posts: 6629
Post Re: IMPROVING PID READ SPEED - whacky IDEA?
on: August 30, 2017 (GMT)

Hi!

This should already be handled in the app automatically for you – If you have nine PIDs, each set to send the same PID request (say, ‘210A’), then this is buffered and the result remembered

Therefore, only one request is sent (for each ‘loop’ of asking for PIDs) for those ‘nine’ PIDs

F-150Torqued
Member
Posts: 437
Post Re: IMPROVING PID READ SPEED - whacky IDEA?
on: August 30, 2017 (GMT)

Thanks for the clarification Lan. Like I said in my title – “Whacky Idea”.

—————-

54371019

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

  Follow me on twitter