-
Notifications
You must be signed in to change notification settings - Fork 1
/
obd2.xml
2170 lines (1966 loc) · 78.7 KB
/
obd2.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<!-- Document Description -->
<!-- Document Sources:
A list of sources that most of the information in
this document has been compiled from (please add
to this list as more data is added).
http://elmelectronics.com/DSheets/ELM327DS.pdf
http://obddiagnostics.com/obdinfo/msg_struct.html
http://en.wikipedia.org/wiki/On-board_diagnostics
http://en.wikipedia.org/wiki/OBD-II_PIDs
http://freediag.sourceforge.net
http://www.canobd2.com/Articles/ArticleDisplay.aspx?ArticleId=f3ea9f25589e4bf28f7e980ebefded20&nsl=Tech+Info%2cOBD+Knowledge&ReturnUrl=%2fArticles%2fArticleDisplay.aspx%3fArticleId%3d1efd0812b59d4b189e2420295b377631%26nsl%3dTech%2bInfo%252cOBD%2bKnowledge
http://www.peak-system.com/produktcd/Pdf/English/PCAN-GPRS_Link_UserMan_eng.pdf
http://www.drewtech.com/support/obd2/message.html
https://www.msu.edu/~guentche/guentchev/OBD-II/int-obdii.html
http://www.ccs-labs.org/teaching/c2x/2012s/03-proto1.pdf
// a lot of pid,dtc and messaging information is
// available from the us govt as public domain:
https://law.resource.org/pub/us/cfr/ibr/005/sae.j1979.2002.pdf
https://law.resource.org/pub/us/cfr/ibr/005/sae.j2012.2002.pdf
https://law.resource.org/pub/us/cfr/ibr/005/sae.j2534.2002.pdf
-->
<spec name="SAEJ1979" desc="OBDII Standard PIDs">
<protocol name="SAE J1850 PWM">
<baudrate value="41600" />
<address name="Default">
<!-- Default J1850 PWM OBD message headers
for functional request/response from scan tool: -->
<!-- Note: Scan tool might be in range 0xF0-0xFD if
default 0xF1 doesn't work -->
<!-- Request Params:
prio: 0x61: Default OBD Request Priority
target: 0x6A: Functional Request
source: 0xF1: External Scan Tool -->
<request prio="0x61" target="0x6A" source="0xF1" />
<!-- Response Params:
prio: 0x41: Default OBD Response Priority
target: 0x6B: Functional Response -->
<response prio="0x41" target="0x6B" />
</address>
</protocol>
<protocol name="SAE J1850 VPW">
<baudrate value="10400" />
<address name="Default">
<!-- Default J1850 VPW OBD message headers
for functional request/response from scan tool: -->
<!-- Note: Scan tool might be in range 0xF0-0xFD if
default 0xF1 doesn't work -->
<!-- Request Params:
prio: 0x68: Default OBD Request Priority
target: 0x6A: Functional Request
source: 0xF1: External Scan Tool -->
<request prio="0x68" target="0x6A" source="0xF1" />
<!-- Response Params:
prio: 0x48: Default OBD Response Priority
target: 0x6B: Functional Response -->
<response prio="0x48" target="0x6B" />
</address>
</protocol>
<protocol name="ISO 9141-2">
<baudrate value="10400" />
<address name="Default">
<!-- Default ISO 9141-2 OBD message headers
for functional request/response from scan tool: -->
<!-- Note: Scan tool might be in range 0xF0-0xFD if
default 0xF1 doesn't work -->
<!-- Request Params:
prio: 0x68: Default OBD Request Priority
target: 0x6A: Functional Request
source: 0xF1: External Scan Tool -->
<request prio="0x68" target="0x6A" source="0xF1" />
<!-- Response Params:
prio: 0x48: Default OBD Response Priority
target: 0x6B: Functional Response -->
<response prio="0x48" target="0x6B" />
</address>
</protocol>
<protocol name="ISO 14230">
<baudrate value="10400" />
<address name="Default">
<!-- Default ISO 14230-4 OBD message headers
for functional request/response from scan tool: -->
<!-- ISO 14230-4 uses three header bytes, like
standard/legacy OBD messages -->
<!-- Note: Scan tool might be in range 0xF0-0xFD if
default 0xF1 doesn't work -->
<!-- Note: LLLLLL is a 6 bit number representing the
length of the data byte section of the message -->
<!-- Request Params:
format: 0b11LLLLLL: Mode (functional) and data length
target: 0x33: Functional Request
source: 0xF1: External Scan Tool -->
<request format="0b11000000" target="0x33" source="0xF1" />
<!-- Response Params:
format: 0b10LLLLLL: Mode (physical) and data length -->
<response format="0b10000000" target="0xF1" />
</address>
</protocol>
<protocol name="ISO 15765 Extended Id">
<baudrate value="250000" />
<baudrate value="500000" />
<!-- Identifier Format: [prio] [format] [target] [source] -->
<address name="Default">
<!-- Default ISO 15765 29-bit OBD message identifier
for functional request/response from scan tool: -->
<!-- Request Params:
prio: 0x18: Default OBD Request Priority
format: 0xDB: Functional Message
target: 0x33: Functional Request
source: 0xF1: External Scan Tool -->
<request prio="0x18" format="0xDB" target="0x33" source="0xF1" />
<!-- Response Params:
format: 0xDA: Physical Message -->
<response prio="0x18" format="0xDA" target="0xF1" />
</address>
</protocol>
<protocol name="ISO 15765 Standard Id">
<baudrate value="250000" />
<baudrate value="500000" />
<!-- Identifier Format: [11-bit identifier] -->
<!-- Note: CAN 11-bit identifiers are not mapped to the
default "priority,target,source" style header found
in typical OBD messages. Instead, they use a single
address for their identifier, which may represent a
physical node or functional group -->
<address name="Default">
<!-- Default ISO 15765 11-bit OBD message identifier
for functional request from scan tool: -->
<!-- Request Params:
identifier: 0x7DF: id for functional request from scan tool -->
<request identifier="0x7DF" />
</address>
<!-- Physical Request/Response Identifiers for ECUs
in the vehicle. 11-bit CAN allows for 8 ECUs in all. -->
<address name="ECU1">
<request identifier="0x7E0" />
<response identifier="0x7E8" />
</address>
<address name="ECU2">
<request identifier="0x7E1" />
<response identifier="0x7E9" />
</address>
<address name="ECU3">
<request identifier="0x7E2" />
<response identifier="0x7EA" />
</address>
<address name="ECU4">
<request identifier="0x7E3" />
<response identifier="0x7EB" />
</address>
<address name="ECU5">
<request identifier="0x7E4" />
<response identifier="0x7EC" />
</address>
<address name="ECU6">
<request identifier="0x7E5" />
<response identifier="0x7ED" />
</address>
<address name="ECU7">
<request identifier="0x7E6" />
<response identifier="0x7EE" />
</address>
<address name="ECU8">
<request identifier="0x7E7" />
<response identifier="0x7EF" />
</address>
</protocol>
<parameters address="Default">
<!-- START MODE $01 PIDs -->
<parameter name="PIDs Supported 0x01-0x20"
request="0x01 0x00" response.prefix="0x41 0x00" response.bytes="4">
<script>
<![CDATA[
var k = 0x01;
for(var i=0; i < 4; i++)
{
for(var j=0; j < 8; j++)
{
var pid = new LiteralDataObj();
pid.property = "PID " + k.toString(16);
pid.valueIfTrue = "Supported";
pid.valueIfFalse = "Unsupported";
pid.value = BIT(i,(7-j)) ? true : false;
saveLiteralData(pid);
k++;
}
}
]]>
</script>
</parameter>
<parameter name="Monitor Status Since DTCs Cleared"
request="0x01 0x01" response.prefix="0x41 0x01" response.bytes="4">
<script>
<![CDATA[
// number of DTCs available
var availDTCs = new NumericalDataObj();
availDTCs.min = 0;
availDTCs.max = 127;
availDTCs.value = BYTE(0) & 127;
availDTCs.property = "Number of confirmed DTCs available";
saveNumericalData(availDTCs);
// common monitoring and system test info
var litData = new LiteralDataObj();
litData.property = "Check Engine Light State";
litData.valueIfTrue = "ON";
litData.valueIfFalse = "OFF";
litData.value = (BIT(0,7)) ? true : false;
saveLiteralData(litData);
var commProperties = ["Misfire","Fuel System","Components"];
for(var i=0; i < 3; i++)
{
litData = new LiteralDataObj();
litData.property = commProperties[i] + " Monitoring";
litData.valueIfTrue = "Test Available";
litData.valueIfFalse = "Test Unavailable";
litData.value = (BIT(1,i)) ? true : false;
saveLiteralData(litData);
}
for(var i=4; i < 7; i++)
{
litData = new LiteralDataObj();
litData.property = commProperties[i-4] + " Test Status";
litData.valueIfTrue = "Complete"; // TODO: verify this
litData.valueIfFalse = "Incomplete"; // TODO: verify this
litData.value = (BIT(1,i)) ? true : false;
saveLiteralData(litData);
}
litData = new LiteralDataObj();
litData.property = "Vehicle Ignition Type";
litData.valueIfTrue = "Compression";
litData.valueIfFalse = "Spark";
litData.value = (BIT(1,3)) ? true : false;
saveLiteralData(litData);
// compression ignition monitor and test info
if(BIT(1,3))
{
var compProperties = ["NMHC Cat","NOx/SCR Monitor","","Boost Pressure","",
"Exhaust Gas Sensor","PM Filter Monitoring","EGR/VVT System"];
for(var i=0; i < 8; i++)
{
if(i == 2 || i == 4)
{ continue; }
litData = new LiteralDataObj();
litData.property = compProperties[i] + " Test";
litData.valueIfTrue = "Test Available";
litData.valueIfFalse = "Test Unavailable";
litData.value = (BIT(2,i)) ? true : false;
saveLiteralData(litData);
}
for(var i=0; i < 8; i++)
{
if(i == 2 || i == 4)
{ continue; }
litData = new LiteralDataObj();
litData.property = compProperties[i] + " Test Status";
litData.valueIfTrue = "Incomplete";
litData.valueIfFalse = "Complete";
litData.value = (BIT(3,i)) ? true : false;
saveLiteralData(litData);
}
}
// spark ignition monitor and test info
else
{
var sparkProperties = ["Catalyst","Heated Catalyst","Evaporative System", "Secondary Air System",
"A/C Refrigerant","Oxygen Sensor","Oxygen Sensor Heater", "EGR System"];
for(var i=0; i < 8; i++)
{
litData = new LiteralDataObj();
litData.property = sparkProperties[i] + "Test";
litData.valueIfTrue = "Test Available";
litData.valueIfFalse = "Test Unavailable";
litData.value = (BIT(2,i)) ? true : false;
saveLiteralData(litData);
}
for(var i=0; i < 8; i++)
{
litData = new LiteralDataObj();
litData.property = sparkProperties[i] + " Test Status";
litData.valueIfTrue = "Incomplete";
litData.valueIfFalse = "Complete";
litData.value = (BIT(3,i)) ? true : false;
saveLiteralData(litData);
}
}
]]>
</script>
</parameter>
<parameter name="Fuel System Status"
request="0x01 0x03" response.prefix="0x41 0x03" response.bytes="2">
<script>
<![CDATA[
var fsWhenTrue = ["Open Loop: Insufficient engine temperature",
"Closed Loop: Using oxygen sensor feedback to determine fuel mix",
"Open Loop: Due to engine load OR fuel cut due to acceleration",
"Open Loop: Due to system failure",
"Closed loop: Using at least one oxygen sensor but there is a fault in the feedback system"];
// fuel system 1
for(var i=0; i < 5; i++)
{
if(BIT(0,i))
{
var fuelSysData = new LiteralDataObj();
fuelSysData.property = "Fuel System 1 Status";
fuelSysData.valueIfTrue = fsWhenTrue[i];
fuelSysData.value = true;
saveLiteralData(fuelSysData);
}
}
// fuel system 2
for(var i=0; i < 5; i++)
{
if(BIT(1,i))
{
var fuelSysData = new LiteralDataObj();
fuelSysData.property = "Fuel System 2 Status";
fuelSysData.valueIfTrue = fsWhenTrue[i];
fuelSysData.value = true;
saveLiteralData(fuelSysData);
}
}
]]>
</script>
</parameter>
<parameter name="Calculated Engine Load"
request="0x01 0x04" response.prefix="0x41 0x04" response.bytes="1">
<script>
<![CDATA[
var engLoad = new NumericalDataObj();
engLoad.units = "%";
engLoad.min = 0;
engLoad.max = 100;
engLoad.value = BYTE(0)*100/255;
saveNumericalData(engLoad);
]]>
</script>
</parameter>
<parameter name="Engine Coolant Temperature"
request="0x01 0x05" response.prefix="0x41 0x05" response.bytes="1">
<script>
<![CDATA[
var coolantTemp = new NumericalDataObj();
coolantTemp.units = "C";
coolantTemp.min = -40;
coolantTemp.max = 215;
coolantTemp.value = BYTE(0)-40;
saveNumericalData(coolantTemp);
]]>
</script>
</parameter>
<parameter name="Short Term Fuel % Trim - Bank 1"
request="0x01 0x06" response.prefix="0x41 0x06" response.bytes="1">
<script>
<![CDATA[
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 100;
fuelTrim.value = (BYTE(0)-128)*(100/128);
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Long Term Fuel % Trim - Bank 1"
request="0x01 0x07" response.prefix="0x41 0x07" response.bytes="1">
<script>
<![CDATA[
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 100;
fuelTrim.value = (BYTE(0)-128)*(100/128);
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Long Term Fuel % Trim - Bank 2"
request="0x01 0x08" response.prefix="0x41 0x08" response.bytes="1">
<script>
<![CDATA[
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 100;
fuelTrim.value = (BYTE(0)-128)*(100/128);
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Long Term Fuel % Trim - Bank 2"
request="0x01 0x09" response.prefix="0x41 0x09" response.bytes="1">
<script>
<![CDATA[
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 100;
fuelTrim.value = (BYTE(0)-128)*(100/128);
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Fuel Pressure"
request="0x01 0x0A" response.prefix="0x41 0x0A" response.bytes="1">
<script>
<![CDATA[
var fuelPr = new NumericalDataObj();
fuelPr.units = "kPa (gauge)";
fuelPr.min = 0;
fuelPr.max = 765;
fuelPr.value = BYTE(0)*3;
saveNumericalData(fuelPr);
]]>
</script>
</parameter>
<parameter name="Intake Manifold Absolute Pressure"
request="0x01 0x0B" response.prefix="0x41 0x0B" response.bytes="1">
<script>
<![CDATA[
var imap = new NumericalDataObj();
imap.units = "kPa (absolute)";
imap.min = 0;
imap.max = 255;
imap.value = BYTE(0);
saveNumericalData(imap);
]]>
</script>
</parameter>
<parameter name="Engine RPM"
request="0x01 0x0C"
response.prefix="0x41 0x0C" response.bytes="2">
<script>
<![CDATA[
var engSpd = new NumericalDataObj();
engSpd.units = "rpm";
engSpd.min = 0;
engSpd.max = 16383.75;
engSpd.value = (BYTE(0)*256 + BYTE(1))/4;
saveNumericalData(engSpd);
]]>
</script>
</parameter>
<parameter name="Vehicle Speed"
request="0x01 0x0D" response.prefix="0x41 0x0D" response.bytes="1">
<script>
<![CDATA[
var vSpd = new NumericalDataObj();
vSpd.units = "km/h";
vSpd.min = 0;
vSpd.max = 255;
vSpd.value = BYTE(0);
saveNumericalData(vSpd);
]]>
</script>
</parameter>
<parameter name="Timing Advance"
request="0x01 0x0E" response.prefix="0x41 0x0E" response.bytes="1">
<script>
<![CDATA[
var vSpd = new NumericalDataObj();
vSpd.units = "deg";
vSpd.min = -64;
vSpd.max = 63.5;
vSpd.value = (BYTE(0)/2)-64;
saveNumericalData(vSpd);
]]>
</script>
</parameter>
<parameter name="Intake Air Temperature"
request="0x01 0x0F" response.prefix="0x41 0x0F" response.bytes="1">
<script>
<![CDATA[
var iat = new NumericalDataObj();
iat.units = "C";
iat.min = -40;
iat.max = 215;
iat.value = BYTE(0)-40;
saveNumericalData(iat);
]]>
</script>
</parameter>
<parameter name="MAF Air Flow Rate"
request="0x01 0x10" response.prefix="0x41 0x10" response.bytes="2">
<script>
<![CDATA[
var mafRate = new NumericalDataObj();
mafRate.units = "g/s";
mafRate.min = 0;
mafRate.max = 655.35;
mafRate.value = (BYTE(0)*256+BYTE(1))/100;
saveNumericalData(mafRate);
]]>
</script>
</parameter>
<parameter name="Throttle Position"
request="0x01 0x11" response.prefix="0x41 0x11" response.bytes="1">
<script>
<![CDATA[
var throttle = new NumericalDataObj();
throttle.units = "%";
throttle.min = 0;
throttle.max = 100;
throttle.value = BYTE(0)*100/255;
saveNumericalData(throttle);
]]>
</script>
</parameter>
<parameter name="Commanded Secondary Air Status"
request="0x01 0x12" response.prefix="0x41 0x12" response.bytes="1">
<script>
<![CDATA[
var statusIfTrue = ["Upstream of Catalytic Converter",
"Downstream of Catalytic Converter",
"From Atmosphere or OFF"];
for(var i=0; i < 3; i++)
{
var airStatus = new LiteralDataObj();
airStatus.value = BIT(0,i);
if(airStatus.value)
{
airStatus.property = "Secondary air exhaust input location";
airStatus.valueIfTrue = statusIfTrue[i];
saveLiteralData(airStatus);
}
}
]]>
</script>
</parameter>
<parameter name="Oxygen Sensors Present (Banks 1-2)"
request="0x01 0x13" response.prefix="0x41 0x13" response.bytes="1">
<script>
<![CDATA[
for(var i=0; i < 4; i++)
{
var oxygenSensor = new LiteralDataObj();
oxygenSensor.property = "Bank 1, Sensor " + (i+1);
oxygenSensor.valueIfFalse = "N/A";
oxygenSensor.valueIfTrue = "Present";
oxygenSensor.value = BIT(0,i);
saveLiteralData(oxygenSensor);
}
for(var i=4; i < 8; i++)
{
var oxygenSensor = new LiteralDataObj();
oxygenSensor.property = "Bank 2, Sensor " + (i-3);
oxygenSensor.valueIfFalse = "N/A";
oxygenSensor.valueIfTrue = "Present";
oxygenSensor.value = BIT(0,i);
saveLiteralData(oxygenSensor);
}
]]>
</script>
</parameter>
<parameter name="Bank 1, Sensor 1: Oxygen Sensor Voltage, Short Term Fuel Trim"
request="0x01 0x14" response.prefix="0x41 0x14" response.bytes="2">
<!-- Note: if BYTE(1) == 0xFF, sensor is not used in fuel trim calculation -->
<script>
<![CDATA[
var voltage = new NumericalDataObj();
voltage.units = "V";
voltage.min = 0;
voltage.max = 1.275;
voltage.value = BYTE(0)/200;
saveNumericalData(voltage);
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 99.2;
fuelTrim.value = (BYTE(1)-128)*100/128;
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Bank 1, Sensor 2: Oxygen Sensor Voltage, Short Term Fuel Trim"
request="0x01 0x15" response.prefix="0x41 0x15" response.bytes="2">
<!-- Note: if B == 0xFF, sensor is not used in fuel trim calculation -->
<script>
<![CDATA[
var voltage = new NumericalDataObj();
voltage.units = "V";
voltage.min = 0;
voltage.max = 1.275;
voltage.value = BYTE(0)/200;
saveNumericalData(voltage);
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 99.2;
fuelTrim.value = (BYTE(1)-128)*100/128;
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Bank 1, Sensor 3: Oxygen Sensor Voltage, Short Term Fuel Trim"
request="0x01 0x16" response.prefix="0x41 0x16" response.bytes="2">
<!-- Note: if B == 0xFF, sensor is not used in fuel trim calculation -->
<script>
<![CDATA[
var voltage = new NumericalDataObj();
voltage.units = "V";
voltage.min = 0;
voltage.max = 1.275;
voltage.value = BYTE(0)/200;
saveNumericalData(voltage);
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 99.2;
fuelTrim.value = (BYTE(1)-128)*100/128;
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Bank 1, Sensor 4: Oxygen Sensor Voltage, Short Term Fuel Trim"
request="0x01 0x17" response.prefix="0x41 0x17" response.bytes="2">
<!-- Note: if B == 0xFF, sensor is not used in fuel trim calculation -->
<script>
<![CDATA[
var voltage = new NumericalDataObj();
voltage.units = "V";
voltage.min = 0;
voltage.max = 1.275;
voltage.value = BYTE(0)/200;
saveNumericalData(voltage);
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 99.2;
fuelTrim.value = (BYTE(1)-128)*100/128;
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Bank 2, Sensor 1: Oxygen Sensor Voltage, Short Term Fuel Trim"
request="0x01 0x18" response.prefix="0x41 0x18" response.bytes="2">
<!-- Note: if B == 0xFF, sensor is not used in fuel trim calculation -->
<script>
<![CDATA[
var voltage = new NumericalDataObj();
voltage.units = "V";
voltage.min = 0;
voltage.max = 1.275;
voltage.value = BYTE(0)/200;
saveNumericalData(voltage);
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 99.2;
fuelTrim.value = (BYTE(1)-128)*100/128;
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Bank 2, Sensor 2: Oxygen Sensor Voltage, Short Term Fuel Trim"
request="0x01 0x19" response.prefix="0x41 0x19" response.bytes="2">
<!-- Note: if B == 0xFF, sensor is not used in fuel trim calculation -->
<script>
<![CDATA[
var voltage = new NumericalDataObj();
voltage.units = "V";
voltage.min = 0;
voltage.max = 1.275;
voltage.value = BYTE(0)/200;
saveNumericalData(voltage);
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 99.2;
fuelTrim.value = (BYTE(1)-128)*100/128;
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Bank 2, Sensor 3: Oxygen Sensor Voltage, Short Term Fuel Trim"
request="0x01 0x1A" response.prefix="0x41 0x1A" response.bytes="2">
<!-- Note: if B == 0xFF, sensor is not used in fuel trim calculation -->
<script>
<![CDATA[
var voltage = new NumericalDataObj();
voltage.units = "V";
voltage.min = 0;
voltage.max = 1.275;
voltage.value = BYTE(0)/200;
saveNumericalData(voltage);
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 99.2;
fuelTrim.value = (BYTE(1)-128)*100/128;
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="Bank 2, Sensor 4: Oxygen Sensor Voltage, Short Term Fuel Trim"
request="0x01 0x1B" response.prefix="0x41 0x1B" response.bytes="2">
<!-- Note: if B == 0xFF, sensor is not used in fuel trim calculation -->
<script>
<![CDATA[
var voltage = new NumericalDataObj();
voltage.units = "V";
voltage.min = 0;
voltage.max = 1.275;
voltage.value = BYTE(0)/200;
saveNumericalData(voltage);
var fuelTrim = new NumericalDataObj();
fuelTrim.units = "%";
fuelTrim.min = -100;
fuelTrim.max = 99.2;
fuelTrim.value = (BYTE(1)-128)*100/128;
saveNumericalData(fuelTrim);
]]>
</script>
</parameter>
<parameter name="OBD Standards This Vehicle Conforms To"
request="0x01 0x1C" response.prefix="0x41 0x18" response.bytes="1">
<script>
<![CDATA[
var obdStd = new LiteralDataObj();
obdStd.value = true;
switch(BYTE(0))
{
case 0x01:
obdStd.valueIfTrue = "OBDII as defined by the CARB";
break;
case 0x02:
obdStd.valueIfTrue = "OBD as defined by the EPA";
break;
case 0x03:
obdStd.valueIfTrue = "OBD and OBDII";
break;
case 0x04:
obdStd.valueIfTrue = "OBDI";
break;
case 0x05:
obdStd.valueIfTrue = "Does not comply with any OBD Standard";
break;
case 0x06:
obdStd.valueIfTrue = "EOBD (Europe)";
break;
case 0x07:
obdStd.valueIfTrue = "EOBD and OBDII";
break;
case 0x08:
obdStd.valueIfTrue = "EOBD and OBD";
break;
case 0x09:
obdStd.valueIfTrue = "EOBD, OBD and OBDII";
break;
case 0x0A:
obdStd.valueIfTrue = "JOBD (Japan)";
break;
case 0x0B:
obdStd.valueIfTrue = "JOBD and OBDII";
break;
case 0x0C:
obdStd.valueIfTrue = "JOBD and EOBD";
break;
case 0x0D:
obdStd.valueIfTrue = "JOBD, EOBD, and OBDII";
break;
default:
obdStd.value = false;
}
saveLiteralData(obdStd);
]]>
</script>
</parameter>
<parameter name="Oxygen Sensors Present (Banks 1-4)"
request="0x01 0x1D" response.prefix="0x41 0x1D" response.bytes="1">
<script>
<![CDATA[
for(var i=0; i < 8; i++)
{
var oxygenSensor = new LiteralDataObj();
oxygenSensor.valueIfFalse = "N/A";
oxygenSensor.valueIfTrue = "Present";
oxygenSensor.value = BIT(0,i);
if(i < 2)
{ oxygenSensor.property = "Bank 1, Sensor " + (i+1); }
else if(i > 1 && i < 4)
{ oxygenSensor.property = "Bank 2, Sensor " + (i+1-2); }
else if(i > 3 && i < 6)
{ oxygenSensor.property = "Bank 3, Sensor " + (i+1-4); }
else if(i > 5 && i < 8)
{ oxygenSensor.property = "Bank 4, Sensor " + (i+1-6); }
saveLiteralData(oxygenSensor);
}
]]>
</script>
</parameter>
<parameter name="Auxiliary Input Status"
request="0x01 0x1E" response.prefix="0x41 0x1E" response.bytes="1">
<script>
<![CDATA[
if(BIT(0,0))
{
var auxIn = new LiteralDataObj();
auxIn.value = true;
auxIn.valueIfTrue = "Power Take Off Active";
saveLiteralData(auxIn);
}
]]>
</script>
</parameter>
<parameter name="Runtime Since Engine Start"
request="0x01 0x1F" response.prefix="0x41 0x1F" response.bytes="2">
<script>
<![CDATA[
var runTime = new NumericalDataObj();
runTime.units = "seconds";
runTime.min = 0;
runTime.max = 65535;
runTime.value = (BYTE(0)*256) + BYTE(1);
saveNumericalData(runTime);
]]>
</script>
</parameter>
<parameter name="PIDs Supported 0x21-0x40"
request="0x01 0x20" response.prefix="0x41 0x20" response.bytes="4">
<script>
<![CDATA[
var k = 0x21;
for(var i=0; i < 4; i++)
{
for(var j=0; j < 8; j++)
{
var pid = new LiteralDataObj();
pid.property = "PID " + k.toString(16);
pid.valueIfTrue = "Supported";
pid.valueIfFalse = "Unsupported";
pid.value = BIT(i,(7-j)) ? true : false;
saveLiteralData(pid);
k++;
}
}
]]>
</script>
</parameter>
<parameter name="Distance Travelled with MIL On"
request="0x01 0x21" response.prefix="0x41 0x21" response.bytes="2">
<script>
<![CDATA[
var dist = new NumericalDataObj();
dist.units = "km";
dist.min = 0;
dist.max = 65535;
dist.value = (BYTE(0)*256) + BYTE(1);
saveNumericalData(dist);
]]>
</script>
</parameter>
<parameter name="Fuel Rail Pressure"
request="0x01 0x22" response.prefix="0x41 0x22" response.bytes="2">
<script>
<![CDATA[
var fuelRail = new NumericalDataObj();
fuelRail.units="kPa";
fuelRail.min = 0;
fuelRail.max = 5177.265;
fuelRail.value = ((BYTE(0)*256)+BYTE(1))*10/128;
saveNumericalData(fuelRail);
]]>
</script>
</parameter>
<parameter name="Fuel Rail Pressure (Diesel or Gasoline Direct Injection)"
request="0x01 0x23" response.prefix="0x41 0x23" response.bytes="2">
<script>
<![CDATA[
var fuelRail = new NumericalDataObj();
fuelRail.units="kPa";
fuelRail.min = 0;
fuelRail.max = 5177.265;
fuelRail.value = ((BYTE(0)*256)+BYTE(1))*10;
saveNumericalData(fuelRail);
]]>
</script>
</parameter>
<parameter name="O2S1_WR_lambda(1): Equivalence Ratio, Voltage"
request="0x01 0x24" response.prefix="0x41 0x23" response.bytes="4">
<script>
<![CDATA[
var ratio = new NumericalDataObj();
ratio.units = "ratio"
ratio.min = 0;
ratio.max = 2;
ratio.value = ((BYTE(0)*256)+BYTE(1))*2/65535;
saveNumericalData(ratio);
var voltage = new NumericalDataObj();
voltage.units = "V"
voltage.min = 0;