j1939-pctool

J1939 訊號說明


更新記錄

item note
20171205 第一版

目錄


J1939 訊號說明

J1939 Format

PDU

  • pdu[PDU] 資料來源;[SAE J1939协议]
    • P: Priority
      3個bit, 111最低 000最高
      PGN (EDP + DP + PF +PS) : Parameter Group Number
    • SA: 8 Bit Source Address
    • PDU Foramte(PF)
      PF = 0-239 (0x0-0xEF,即PUD1) indicates a destination address in PS
      此時目地位置8bit放於PS,表示此資料有指定destination address
    • PF = 240-255 (0xF0-0xFF,即PUD2) indicate extension to PDU Format(PF)
      此時由PS存放低位元8bit
      0xF000 - 0xFFFF :為無指定位置的訊息,即boardcast

SAE J1939 PGN Range


Test

模擬器

  • 模擬器

    [模擬器]
  • can分析器

    [can分析器]
  • 數值如下

    1
    2
    3
    4
    5
    6
    7
    8
    9
    18FEF600 (FEF6) FF 00 FF FF FF FF FF FF
    18FEEF00 (FEEF) 00 FF FF 00 FF FF 00 FF
    0CF00400 (F004) FF FF 7D A0 8C FF FF FF
    18FEF200 (FEF2) 00 00 FF FF FF FF FF FF
    18FEE000 (FEE0) 7E 01 00 00 7E 36 0C 00
    18FEF100 (FEF1) FF 00 5A FF FF FF FF FF
    0CF00300 (F003) FF E1 00 FF FF FF FF FF
    18FE6C00 (FE6C) FF FF FF FF FF FF 00 5A
    18FEE500 (FEE5) 45 00 00 00 AE 03 00 00 -> 1s

011=> 控制報文 (0Cxxxxxx)
110=> 請求,ack,其它報文 (18xxxxxx)


PGN 資料

FEF6,SPN102: Boot Pressure (kPa)

SPN102: Boot Pressure (kPa)

  • FEF6[PGN FEF6 ]

FEEF

  • PGN 65263 (0xFEEF) Engine Fluid Level/Pressure 1

F004

  • F004[PGN F004 ] 0x7D = 0%
    (0x8CA0 = 3600) / 8 = 4500

FEF2

FEE0

此FEE0是沒有採用,採用FEC1
FEE0沒有在FSM手冊裡面

  • PGN 65248 (0xFEE0) Vehicle Distance

  • FEE0

    [PGN FEE0 ]

(0x0000017E = 382 ) / 8 = 47
(0x000C367E = 800382) / 8 = 100047

FEF1

  • FEF1[PGN FEF1 ] ( 0x5A00 = 23040 ) / 256 = 90

F003

  • F003[PGN F003 ] ( 0xE1 = 225 ) * 0.4 = 90

FE6C

  • FE6C[PGN FE6C ]

FEE5

  • FEE5[PGN FEE5 ] [PGN FEE5 ] [CANUSB ] [PCTOOL ] ( 0x45 = 69 ) 0.05 = 3.45
    ( 0x3AE = 942)
    1000 = 942000

FEC1

  • FEC1[PGN FEC1 ]

Device Data

  • device data
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    23:27:05.358 40 61 00 20 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 42 0D 0A
    23:27:06.201 40 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 0A
    23:27:07.192 40 63 00 00 00 FF FF 00 00 00 00 00 00 00 00 13 7F B4 00 00 44 0D 0A
    23:27:08.171 40 64 20 22 00 00 00 00 00 00 00 00 00 00 E0 01 00 00 00 00 23 0D 0A
    23:27:09.176 40 65 00 00 00 22 DA 00 7B 8E 00 00 00 00 00 00 00 00 00 00 05 0D 0A
    23:27:10.175 40 31 00 5A F3 1F E1 00 00 00 00 C8 A0 8C 0F 00 00 00 0A
    23:27:10.175 00 5A 0D 0A
    23:27:11.196 40 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 0A
    23:27:12.175 40 33 00 00 00 FF FF FF FF 00 5A 78 00 FF 00 00 00 00 00 03 D0 0D 0A
    23:27:13.183 40 61 00 20 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 42 0D 0A
    23:27:14.197 40 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 0A
    23:27:15.175 40 63 00 00 00 FF FF 00 00 00 00 00 00 00 00 13 7F B4 00 00 44 0D 0A
    23:27:16.177 40 64 20 22 00 00 00 00 00 00 00 00 00 00 E0 01 00 00 00 00 23 0D 0A
    23:27:17.219 40 65 00 00 00 22 DA 00 7B 8E 00 00 00 00 00 00 00 00 00 00 05 0D 0A
    23:27:18.184 40 31 00 5A F3 1F E1 00 00 00 00 C8 A0 8C 0F 00 00 00 0A
    23:27:18.184 00 5A 0D 0A
    23:27:19.175 40 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 0A
    23:27:20.178 40 33 00 00 00 FF FF FF FF 00 5A 78 00 FF 00 00 00 00 00 03 D0 0D 0A
    23:27:21.208 40 61 00 20 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 42 0D 0A
    23:27:22.184 40 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 0A
    23:27:23.225 40 63 00 00 00 FF FF 00 00 00 00 00 00 00 00 13 7F B4 00 00 44 0D 0A
    23:27:24.201 40 64 20 22 00 00 00 00 00 00 00 00 00 00 E0 01 00 00 00 00 23 0D 0A
    23:27:25.219 40 65 00 00 00 22 DA 00 7B 8E 00 00 00 00 00 00 00 00 00 00 05 0D 0A

測試驗證

Packing Format

  • Packing Format

    [Packing Format ]
  • raw data

    [raw data ]
    1
    2
    3
    4
    5
    6
    7
    8
    40 31 00 50 F3 1F E1 08 00 00 00 7D 60 6D 0F 00 00 00 07 00 AB 0D 0A
    40 32 00 00 00 00 00 00 00 00 00 00 0A 00 00 00 00 00 00 00 0A 0D 0A
    40 33 00 00 00 FF FF FF FF 00 50 78 00 FF 00 00 00 00 00 03 C6 0D 0A
    40 61 00 20 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 42 0D 0A
    40 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 0A
    40 63 00 C8 00 FF FF 00 00 00 00 00 00 00 00 13 7F A0 00 00 F8 0D 0A
    40 64 20 22 00 00 00 00 00 00 00 00 00 00 E0 01 00 00 00 00 23 0D 0A
    40 65 00 00 00 62 DA 20 7B F7 00 00 00 00 00 00 00 00 00 00 CE 0D 0A
  • USBCAN Log

    [USBCAD ]
  • PCTOOL

    [PCTOOL ]
  • APP1 Data

    [APP-1 ]
  • APP2 Data

    [APP-2 ] [APP-2 ]

crankshaft

  • crankshaft(曲軸)

    [crankshaft ]

    由計算crankshaft(曲軸)角度,來取得RPM
    即1ms內跑了多少角度即可算出RPM, 1圈720度

  • SPN190: Engine RPM <= F004
    Actual engine RPM(由計算曲軸角度得到)

wheel speed

  • wheel speed

    [wheel ]
  • CRANKSHAFT POSITION (CKP) SENSOR
    1圈會回傳n個pulse,可得到角度
    其中歸位點的pulse間距比大,因此可知道 每秒轉了幾圈,即可計算出speed

  • SPN84:Wheel-Baseed Vehicle Speed <= FEF1
    Speed of the vehicle as calculated from wheel


其它參考