C.5.1 encoding the identifier field values, C.5.1 – Campbell Scientific SDM-CAN Datalogger to CANbus Interface User Manual
Page 60

Appendix C. Application of the SDM-CAN on Networks Complying with the J1939 SAE Standards
Due to current system constraints the ID parameter must be
entered directly into the CanBus instruction.
NOTE
C.5 Retrieving J1939 Accelerator Pedal Position Data
using a CR23X/CR10X (Bus Speed 250k Baud)
C.5.1 Encoding the Identifier Field Values
The following example shows how to encode the identifier field values into the
format for the CR23X/CR10X ID parameter.
The identifier field values for the CAN Data Frame are as follows:
Priority 3
10
Reserved 0
10
Data Page
0
10
PDU Format
240
10
PDU Specific
3
10
Source Address
0
10
These decimal values then need to be converted to binary and encoded into the
29 bit identifier.
Priority 011
2
Reserved 0
2
Data Page
0
2
PDU Format
11110000
2
PDU Specific
00000011
2
Source Address
00000000
2
TABLE C-6. Mapping of J1939 Identifier Field Values into a 29-Bit Identifier
Bit
28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SOF P
3
P
2
P
1
R
1
D
P
P
F
8
P
F
7
P
F
6
P
F
5
P
F
4
P
F
3
P
F
2
P
F
1
P
S
8
P
S
7
P
S
6
P
S
5
P
S
4
P
S
3
P
S
2
P
S
1
S
A
8
S
A
7
S
A
6
S
A
5
S
A
4
S
A
3
S
A
2
S
A
1
Value 0 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0
This gives a binary value of 01100111100000000001100000000 that can then
be split into three values for use as the ID parameter.
The first value is made up of bits 0..10 which is 01100000000
2
this is
converted to 768
10
and used as the first ID parameter.
The second value is made up of bits 11..23 which is 1111000000000
2
this is
converted to 7680
10
and used as the second ID parameter.
The third value is made up of bits 24..28 which is 01100
2
this is converted to
12
10
and used as the third ID parameter.
C-4