Programming crbasic dataloggers to use the sdm-can, 1 general principles, Programming crbasic dataloggers to use the – Campbell Scientific SDM-CAN Datalogger to CANbus Interface User Manual

Page 43: Sdm-can, General principles

Advertising
background image

SDM-CAN Datalogger-to-CANbus Interface

;Retrieve Data from CAN network B
3: SDM-CAN (P118)
1: 01

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: 2

Loc [ Eng_1 ]

13: 0.125

Mult

14: 0.0

Offset


;Retrieve Data from CAN network B
8: SDM-CAN (P118)
1: 01

SDM

Address

2: 4

Time

Quanta

3: 5

Tseg1

4: 2

Tseg2

5: 768

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

6: 7680

ID

Bits

11..23

7: 12

ID

Bits

24..28

8: 1

Rx,

unsigned

int,

MSB

1st

9: 49

Start

Bit

No.

10: 8

No.

of

Bits

11: 1

No.

of

Values

12: 3

Loc

[

Throttl_1

]

13: 0.125

Mult

14: 0.0

Offset


*Table 2 Program
02: 0.0000 Execution

Interval

(seconds)


*Table 3 Subroutines

End Program

4. Programming CRBasic Dataloggers to use the

SDM-CAN

This chapter describes how to program the CR5000/CR9000X and older
CR9000 dataloggers, using CRBASIC language, to control the SDM-CAN
interface. Similar principles can be followed for newer CRX000 dataloggers
that include the SDM-CAN instruction in their operating system.

4.1 General Principles

Some newer dataloggers use the CRBASIC programming language. CRBASIC
incorporates an instruction which is virtually identical to P118, described in

35

Advertising