Page 1 of 1

Error Code Module For OBDII project

Posted: Sun Dec 07, 2014 12:18 am
by acg2010
Attached is a simple module that outputs some diagnostic codes based on the received DTC from a vehicle OBDII. For the logic, I used IfThen primitives. My question is: Is there an easier way of doing this?

Re: Error Code Module For OBDII project

Posted: Sun Dec 07, 2014 1:56 am
by tester
You could write a ruby module.

You could do the same stuff you did, just in a cleaner way. By cleaner way I mean
- more wireless (common) inputs/outputs, to avoid "overcabling" in the greenery, and
- combining through array builder if you are worried about the connection order to string prims.

Also, you could do this other way in greenery as well. Simple "=" comparators and "select" prims should do the job if you are comparing strings vs strings (single parameter vs single parameter) and not strings vs arrays of data. IfThenElse is more useful when dealing with big tables of data to compare with.

p.s.: for debugging, you don't need to connect through strings, you may connect modules directly wich each other, and use string readers paralel and temporarily, so you can easily delete them later (fod better schematic readability).

Re: Error Code Module For OBDII project

Posted: Sun Dec 07, 2014 5:05 am
by acg2010
Thanks tester. I leave the strings when prototyping to make it easier for me to follow and for others to see what the module is doing.

I will try your suggestions.