Openport Stand-Alone Logging Beta

Re: Openport Stand-Alone Logging Beta

Postby cboles » Thu Oct 08, 2009 5:27 pm

it already has custom baud rates. just use

baud=XXXXX

in your channel configuration (after the type=mut2 command)

c

Gatecrasher wrote:If I get desperate enough I'll just go into my ECU code and disable the pin 1 check. :lol: I'm just glad you're giving us options. Especially for the older and less well supported cars.

On that note, would it be possible to add a config parameter to support custom baud rates? Consider it an item on the wish list for now :)
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Openport Stand-Alone Logging Beta

Postby cboles » Sat Oct 10, 2009 7:07 pm

I have posted a new version at the head of this thread. A lot has been changed and improved. Please read the change notes at the end of the post and have a look at the new versions of the logging files in the samples directory so you know what changes you will need to make to your own logcfg.txt files to get them running again. Hopefully this version is much more useful!

Colby
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Openport Stand-Alone Logging Beta

Postby cboles » Sat Oct 10, 2009 7:11 pm

mdedwar wrote:Hi Colby,
I'm trying to use the scaling in the RomRaider logging.xml file to add some extended param but working out the scaling conversion is causing me grief.
eg: <ecuparam id="E85" name="Primary Open Loop Map Enrichment (2-byte)**"
<ecu id="4E42584007">
<address length="2">0xFF6C36</address>
</ecu>
<conversions>
<conversion units="estimated AFR" expr="14.7/(1+(x*.00003051758))" format="0.00" />
</conversions>

Any ideas on what the scaling values should be?

Cheers,
Matt.
PS: Great work! This is so much more convenient than lugging a laptop and cables around.


with the new version i posted, it would look like this:

paramname=est_AFR
paramid=0xFF6C36
databits=16
scalingrpn=14.7,x,0.00003051758,*,1,+,/

keep in mind that you can't read from RAM directly with CAN SSM, unfortunately.
scaling
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Openport Stand-Alone Logging Beta

Postby cboles » Sat Oct 10, 2009 7:12 pm

Tephra wrote:BTW here is some straight C code (not sure if your writing in C or something else) for the RPNCalc routine I used in my mode23 logger. It's only basic and has limited functionality, but works pretty good :)

input RPNExpr is a RPN string
input XValue is the "x" in the RPN Expression
return is the evaluated expression
Code: Select all
double RPNCalc(char *RPNExpr, double XValue) {
   double stack[256];
   unsigned char stackpos = 0;
   char *token, *nexttoken;
   char tmpstr[255];
   
   memset(stack, 0, sizeof(stack));

   strcpy_s(tmpstr, 255, RPNExpr);            
   token = strtok_s(tmpstr, ",", &nexttoken);
   while (token != NULL) {
      if (strcmp(token, "+") == 0) {
         double tmp = stack[stackpos-2] + stack[stackpos-1];
         stackpos -= 2;
         stack[stackpos] = tmp;
         stackpos++;
      } else if (strcmp(token, "-") == 0) {
         double tmp = stack[stackpos-2] - stack[stackpos-1];
         stackpos -= 2;
         stack[stackpos] = tmp;
         stackpos++;
      } else if (strcmp(token, "*") == 0) {
         double tmp = stack[stackpos-2] * stack[stackpos-1];
         stackpos -= 2;
         stack[stackpos] = tmp;
         stackpos++;
      } else if (strcmp(token, "/") == 0) {
         double tmp = stack[stackpos-2] / stack[stackpos-1];
         stackpos -= 2;
         stack[stackpos] = tmp;
         stackpos++;
      } else if (strcmp(token, "x") == 0) {
         stack[stackpos] = XValue;
         stackpos++;
      } else {
         double tmp;
         sscanf_s(token, "%lf", &tmp);
         stack[stackpos] = tmp;
         stackpos++;
      }
      // Get next token:
      token = strtok_s(NULL, ",", &nexttoken);
   }
   return stack[0];
}


RPN is here now!
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Openport Stand-Alone Logging Beta

Postby cboles » Sat Oct 10, 2009 7:13 pm

Tephra wrote:Hi Colby,

ok I understand.

With my example you can manually stagger the phase of the unimportant items, ie 199 for one, 200 for another, 201 for another... Its not too big a deal :)

Does your priority work in the current firmware? I would like to give it a whirl.

Also for Mode23 are you sleeping to maintain a regular logging interval? (ie why the time is going up in constant amounts)

Cheers
D.


Priority is here! :)
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Openport Stand-Alone Logging Beta

Postby cboles » Sat Oct 10, 2009 7:16 pm

legaulois wrote:How do I indicate that a value is float ?

Thank you


Code: Select all
isfloat=1


you also don't need to put

Code: Select all
databits=32


as the OP2 knows this must be the case...
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Openport Stand-Alone Logging Beta

Postby Tephra » Sat Oct 10, 2009 7:20 pm

Thanks Colby!

I will test it all out tomorrow :)
Tephra
 
Posts: 59
Joined: Mon Aug 27, 2007 2:16 am

Re: Openport Stand-Alone Logging Beta

Postby cboles » Sat Oct 10, 2009 7:31 pm

Tephra wrote:Thanks Colby!

I will test it all out tomorrow :)


just an FYI - i noticed a mistake in each of the subaru examples when i first posted this new version. i have fixed and updated it on the site now, but if you downloaded it in the first hour or so, you will want to download again...

c
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Openport Stand-Alone Logging Beta

Postby cboles » Sat Oct 10, 2009 9:29 pm

Third time is a charm... I hope. I just update the DLL download *again*. I wanted to add some better recovery for CAN and Subaru ECUs for when the ECU stops responding (e.g. after you turn the car off for a bit). You should be able to leave the OP2 in your car for days now and have it come back to life as soon as the ECU starts responding again. Many of you may have not noticed this problem anyway as the voltage dip when starting the car usually causes the OP2 to reboot anyway, but just in case, this version keeps everything happy.

Colby
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Openport Stand-Alone Logging Beta

Postby Tephra » Sat Oct 10, 2009 9:54 pm

lol :)

ok ill redownload it :D
Tephra
 
Posts: 59
Joined: Mon Aug 27, 2007 2:16 am

Re: Openport Stand-Alone Logging Beta

Postby Tephra » Sat Oct 10, 2009 10:02 pm

Can you just give a quick run through of how priority works?

I assume priority=1 is the default?

Does priority = 2 use your method?

Can we do priority = X?

Cheers
D.
Tephra
 
Posts: 59
Joined: Mon Aug 27, 2007 2:16 am

Re: Openport Stand-Alone Logging Beta

Postby cboles » Sat Oct 10, 2009 10:53 pm

1 is default (fast) (each "1" is sampled once per log cycle)
2 is slower (one "2" is sampled per log cycle on a rotating basis)
nothing else is implemented - not sure it is really needed - anything > 2 just gets treated as 2

Tephra wrote:Can you just give a quick run through of how priority works?

I assume priority=1 is the default?

Does priority = 2 use your method?

Can we do priority = X?

Cheers
D.
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Openport Stand-Alone Logging Beta

Postby mdedwar » Sat Oct 10, 2009 11:05 pm

cboles wrote:Third time is a charm... I hope. I just update the DLL download *again*. I wanted to add some better recovery for CAN and Subaru ECUs for when the ECU stops responding (e.g. after you turn the car off for a bit). You should be able to leave the OP2 in your car for days now and have it come back to life as soon as the ECU starts responding again. Many of you may have not noticed this problem anyway as the voltage dip when starting the car usually causes the OP2 to reboot anyway, but just in case, this version keeps everything happy.

Colby


Hi Colby,

The new update works a treat.

A question about leaving the OP2 in the car and battery life. In the first thread you say "The current version of the beta has no power management, and the OBD port is always on, so it is possible to drain your battery if you leave the OP2 plugged in for several days while your car is off."

Have you changed this or is there still an issue with running the battery flat?

Cheers,
Matt.
mdedwar
 
Posts: 24
Joined: Sun Oct 04, 2009 3:23 pm

Re: Openport Stand-Alone Logging Beta

Postby cboles » Sat Oct 10, 2009 11:24 pm

The issue is still the same. I haven't started putting the OP2 to sleep when it doesn't receive anything for a while. Even when "asleep" the power consumption is still not negligible. We are talking tens of milliamps here - so it's not the kind of thing that will drain your battery immediately, but if you left it in your car for a while it could. If you have a newer Subaru, OBD pin 8 is wired to the ignition switched power, while OBD pin 16 (the power OBD pin) is connected to the battery. If you take the battery connection out of the pin 16 position and put the pin 8 wire (IGN) into pin 16, it's a nice solution to this problem, because whenever you turn the car off, it turns the OP2 off completely.


mdedwar wrote:
cboles wrote:Third time is a charm... I hope. I just update the DLL download *again*. I wanted to add some better recovery for CAN and Subaru ECUs for when the ECU stops responding (e.g. after you turn the car off for a bit). You should be able to leave the OP2 in your car for days now and have it come back to life as soon as the ECU starts responding again. Many of you may have not noticed this problem anyway as the voltage dip when starting the car usually causes the OP2 to reboot anyway, but just in case, this version keeps everything happy.

Colby


Hi Colby,

The new update works a treat.

A question about leaving the OP2 in the car and battery life. In the first thread you say "The current version of the beta has no power management, and the OBD port is always on, so it is possible to drain your battery if you leave the OP2 plugged in for several days while your car is off."

Have you changed this or is there still an issue with running the battery flat?

Cheers,
Matt.
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Openport Stand-Alone Logging Beta

Postby Tephra » Sun Oct 11, 2009 7:03 pm

Hey Colby,

This new version seems to work pretty well :)

I tested the RPN stuff and priority.

If we can get your full layered priority working that would be awesome too :)

Also does the stop/start logging apply to mitsucan? I am interested in having a Point of Interest registered in the log file - the simplest way would be to simply restart the logging.

Normally I log TPS and any POI's I want marked I just hit WOT for a short while..

Cheers
D.
Tephra
 
Posts: 59
Joined: Mon Aug 27, 2007 2:16 am

PreviousNext

Return to Openport Stand-Alone Logging Beta

Who is online

Users browsing this forum: No registered users and 24 guests