Campbell Scientific SDM-SIO4 4-Channel Serial I/O Interface User Manual

Page 25

Advertising
background image

Section 3. Understanding How the SDM-SIO4 Handles Data

3-9

i[Battery ] – This outputs the word between the brackets [ ].

z257 – This outputs the fixed string ‘Voltage’.

space – This outputs an ASCII space.

f6:1 – This takes the value from location 2 and outputs it in a field with a total
width of 6 characters. There is 1 decimal place available within the field.

z273 – This outputs the fixed string ‘CrLf (carriage return line feed)’.

*Table 1 Program

01: 2

Execution Interval (seconds)

;get battery voltage.

1: Batt Voltage (P10)

1:

2

Loc [ Batt_v ]

;get panel temperature.

2: Internal Temperature (P17)

1:

1

Loc [ Temp_C ]

;send battery voltage and temperature to port 2 on the SDM-SIO4.

3: SDM-SIO4 (P113)

1:

1

Reps

2:

0

Address

3:

2

Send/Receive Port 2

4:

2304

Command

;see Section 5 for explanation of

5:

9123

1st Parameters

;Command 2304 and its Parameters

6:

0

2nd Parameters

;

7:

2

Values per Rep

8:

1

Loc [ Temp_c ]

9:

1.0

Mult

10: 0.0

Offset

*Table 2 Program

02: 0.0000

Execution Interval (seconds)

*Table 3 Subroutines

End Program

Advertising