Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:carmon [2016/11/15 10:30] admin |
projects:carmon [2019/09/06 07:58] (current) admin [Data processor] |
||
---|---|---|---|
Line 13: | Line 13: | ||
==== Central database and expert system ==== | ==== Central database and expert system ==== | ||
==== Data processor ==== | ==== Data processor ==== | ||
- | * Get distance between DPF rejuvenations | + | == Display distance between DPF rejuvenations == |
<code> | <code> | ||
- | $ grep CME * | cut -d ',' -f 4 | gawk --non-decimal-data '{aa = sprintf("%d", "0x" $0); print aa}' | + | $ grep DPFDIST * | cut -d ',' -f 4 | |
+ | gawk '{aa = strtonum("0x" $0); if ((aa < 180) && (aa > 5)) print aa; if ((aa >= 180) && (aa < 300)) {print aa / 2; print aa / 2}}' > /tmp/dpfdist | ||
+ | $ echo "set terminal x11; set grid; plot '/tmp/dpfdist' with lines" | gnuplot -p | ||
+ | </code> | ||
+ | == Display Injector corrections == | ||
+ | <code> | ||
+ | $ grep ECU01AD * | cut -d ',' -f 3 | | ||
+ | gawk 'BEGIN{prev=""} {curr=substr($0, 35, 8); if (curr != prev) \ | ||
+ | {i1=strtonum("0x" substr(curr, 1, 2)); i2=strtonum("0x" substr(curr, 3, 2)); \ | ||
+ | i3=strtonum("0x" substr(curr, 5, 2)); i4=strtonum("0x" substr(curr, 7, 2)); \ | ||
+ | print i1-64, i2-64, i3-64, i4-64, i1+i2+i3+i4-256; prev=curr} }' > /tmp/injraw | ||
+ | $ cut -d ' ' -f 1 /tmp/injraw > /tmp/inj1raw | ||
+ | $ cut -d ' ' -f 2 /tmp/injraw > /tmp/inj2raw | ||
+ | $ cut -d ' ' -f 3 /tmp/injraw > /tmp/inj3raw | ||
+ | $ cut -d ' ' -f 4 /tmp/injraw > /tmp/inj4raw | ||
+ | $ grep -v "0 0 0 0 0" /tmp/injraw | cut -d ' ' -f 5 > /tmp/injsumraw | ||
+ | $ echo "set terminal x11; set grid; plot '/tmp/inj1raw' with lines" | gnuplot -p | ||
+ | $ echo "set terminal x11; set grid; plot '/tmp/inj2raw' with lines" | gnuplot -p | ||
+ | $ echo "set terminal x11; set grid; plot '/tmp/inj3raw' with lines" | gnuplot -p | ||
+ | $ echo "set terminal x11; set grid; plot '/tmp/inj4raw' with lines" | gnuplot -p | ||
+ | $ echo "set terminal x11; set grid; plot '/tmp/injsumraw' with lines" | gnuplot -p | ||
+ | </code> | ||
+ | == Display DPF differential pressure == | ||
+ | <code> | ||
+ | $ grep ECU01EF * | cut -d ',' -f 3 | gawk '{aa = strtonum("0x" $0); print aa / 256.0 - 5.0}' > /tmp/dpfdp | ||
+ | $ echo "set terminal x11; set grid; plot '/tmp/dpfdp' with lines" | gnuplot -p | ||
+ | </code> | ||
+ | == Detect data loss == | ||
+ | <code> | ||
+ | find./|sort|whilereadline;doecholine; grep ECU $line | cut -d ',' -f 1 | | ||
+ | gawk 'BEGIN{pt = -1} {ct = substr($0, 13); if (pt != -1) \ | ||
+ | {difft = ct - pt; if (difft < 0) difft += 60000; if ((difft > 30) && (difft < 500)) \ | ||
+ | print pt,ct,difft,pts,0,0-pts}; pts = $0; pt = ct}' ; done > /tmp/result | ||
</code> | </code> | ||
- |