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

Page 60

Advertising
background image

Section 5. Programming the Datalogger

5-28

The user-defined formatter used is:

fmtst 123 "z261 f6:2 i[Battery ]z257 f6:1z273"

An example of typical output from this formatter string might be:

Temperature 27.23 Battery Voltage 12.6

Here is a description of what each part of the formatter does:

fmtst 123 – This is the command word for storing the formatter sting in area
123.

z261 – This outputs the fixed string ‘Temperature’.

space –This outputs an ASCII space.

f6:2 – This takes the value from location 1 and outputs it. The output field has a
total width of 6 characters; 2 decimal places are available within the field.

space – This outputs an ASCII space.

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. The output field has a
total width of 6 characters; 1 decimal place is available within the field.

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

*Table 1 Program

01: 2

Execution Interval (seconds)

1: Batt Voltage (P10)

1:

2

Loc [ Batt_v ]

2: Internal Temperature (P17)

1:

1

Loc [ Temp_C ]

3: SDM-SIO4 (P113)

1:

1

Reps

2:

0

Address

3:

2

Send/Receive Port 2

4:

2304

Command

5:

9123

1st 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)

Advertising