29-bit CAN ID → PGN Dönüştürücü
CAN ID Parçaları ve PGN
Alan |
Decimal |
Hex |
Etiket |
CAN ID |
|
|
29-bit CAN ID |
P (Priority) |
|
|
Öncelik (0-7) |
R (Reserved) |
|
|
Rezerv bit (0) |
DP (Data Page) |
|
|
Veri Sayfası |
PF (PDU Format) |
|
|
Mesaj Tipi |
PS (PDU Specific) |
|
|
Alıcı Adresi / Grup |
SA (Source Address) |
|
|
Gönderen Adres |
PGN (Parameter Group Number) |
|
|
Parametre Grup Numarası |
Hesaplama Açıklaması
CAN ID 29-bit şu parçalardan oluşur:
- P (Priority): En yüksek 3 bit, mesaj önceliği.
- R (Reserved): 1 bit, rezerv.
- DP (Data Page): 1 bit, veri sayfası.
- PF (PDU Format): 8 bit, mesaj tipi.
- PS (PDU Specific): 8 bit, alıcı adresi veya grup.
- SA (Source Address): 8 bit, gönderen adres.
PGN hesaplanırken:
- Eğer PF (PDU Format) >= 240 (0xF0) ise, bu PDU2 formatıdır ve
PGN = (DP << 16) + (PF << 8)
(PS dikkate alınmaz)
- Eğer PF < 240 ise, PDU1 formatıdır ve
PGN = (DP << 16) + (PF << 8) + PS
Örnek: CAN ID = CF004FE (hex)
- P = 3 (0b011)
- R = 0
- DP = 0
- PF = 240 (0xF0)
- PS = 4
- SA = 254 (0xFE)
PGN = 0xF004
Bu standart J1939 ve DBC dosyalarında kullanılır.