2 simple can data transmission, Simple can data transmission – Campbell Scientific SDM-CAN Datalogger to CANbus Interface User Manual

Page 38

Advertising
background image

SDM-CAN Datalogger-to-CANbus Interface

1: SDM-CAN (P118)
1: 0

SDM

Address

2: 4

Time

Quanta

3: 5

Tseg1

4: 2

Tseg2

5: 1024

ID Bits 0..10 (-- for 11-bit CAN ID)

6: 7680

ID

Bits

11..23

7: 12

ID

Bits

24..28

8: 2

Rx, unsigned int, LSB 1st

9: 33

Start

Bit

No.

10: 16

No.

of

Bits

11: 1

No.

of

Values

12: 1

Loc [ Eng_Spd ]

13: 0.125

Mult

14: 0.0

Offset


*Table 2 Program
02: 0.0000 Execution

Interval

(seconds)


*Table 3 Subroutines

End Program

The above example uses the J1939 standard to define the ID
parameter and value position in the data frame. Please refer to
Appendix C, Application of the SDM-CAN on Networks
Complying with the J1939 SAE Standards
, for an explanation of
the application of the SDM-CAN interface to networks
complying to the J1939 standard.

NOTE

3.5.2 Simple CAN Data Transmission

The following example transmits a 16 bit temperature value to a CAN network
running at 500K baud.

;{CR10X}
;
*Table 1 Program
01: 1

Execution

Interval

(seconds)


;When Flag 1 is high set SDM-CAN switches to transmit mode

1: If Flag/Port (P91)
1: 11

Do if Flag 1 is High

2: 30

Then

Do


;Load input location with value for switches

6: Z=F (P30)

1: 0003

F

2: 0

Exponent

of

10

3: 3

Z Loc [ Switches ]

30

Advertising