Campbell Scientific SDM-CAN Datalogger to CANbus Interface User Manual

Page 41

Advertising
background image

SDM-CAN Datalogger-to-CANbus Interface

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

Execution

Interval

(seconds)


;Set flag 1 high to set SDM-CAN internal software switches
1: If Flag/Port (P91)
1: 11

Do if Flag 1 is High

2: 30

Then

Do


;Load input location with value for switches

2: Z=F (P30)

1: 10

F

2: 0

Exponent

of

10

3: 3

Z Loc [ Switches ]


;Send switch settings to SDM-CAN

3: SDM-CAN (P118)

1: 0

SDM

Address

2: 2

Time

Quanta

3: 5

Tseg1

4: 2

Tseg2

5: 1

ID

Bits

0..10

6: 0

ID

Bits

11..23

7: 0

ID

Bits

24..28

8: 32

Set

switches

9: 00

Start

Bit

No.

10: 00

No.

of

Bits

11: 00

No.

of

Values

12: 3

Loc [ Switches ]

13: 1.0

Mult

14: 0.0

Offset


;Set flag 1 low after sending switch settings

4: Do (P86)

1: 21

Set

Flag

1

Low


5: End (P95)

*Table 2 Program
02: 0.0000 Execution

Interval

(seconds)


*Table 3 Subroutines

;Interrupt subroutine 98, when C8 goes high run this subroutine
1: Beginning of Subroutine (P85)
1: 98

Subroutine

98


;Read CAN value

2: SDM-CAN (P118)

1: 00

SDM

Address

2: 2

Time

Quanta

3: 5

Tseg1

4: 2

Tseg2

5: 1

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

6: 0

ID

Bits

11..23

33

Advertising