PID poll in batch ??

Discussion about Freematics software, including Freematics Emulator GUI software, Freematics Arduino Builder etc.
TheMonkey
Posts: 3
Joined: Sat Dec 15, 2018 9:35 pm

PID poll in batch ??

Postby TheMonkey » Tue Jan 08, 2019 8:40 am

PID polls are requiring 125ms +/- 5ms each poll and really making for a clunky routine when fetching one after another. ISO 9141 on 1998 Toyota.

Can anything be done to fetch multiple variables in one poll?

stampTime = millis();
obd.readPID(PID_THROTTLE, throttle);
throttleTime = millis() - stampTime;

stampTime = millis();
obd.readPID(PID_RPM, rpm);
rpmTime = millis() - stampTime;

stampTime = millis();
obd.readPID(PID_COOLANT_TEMP, coolant);
coolantTime = millis() - stampTime;

stampTime = millis();
obd.readPID(PID_SPEED, speed);
speedTime = millis() - stampTime;

aboaboit
Posts: 23
Joined: Mon Mar 26, 2018 4:55 am

Re: PID poll in batch ??

Postby aboaboit » Sat May 11, 2019 4:33 am

Good thing I increased the minimum cycle time in datalogger from the default 100ms to 250ms.
I'm going to try to raise it further.


Return to “Freematics Software”

Who is online

Users browsing this forum: No registered users and 1 guest