Section 5. Programming the Datalogger
5-25
5.4 Outputting Datalogger Data
The SDM-SIO4 can be used to drive displays, printout devices and other output-
only systems. In this case after the initial configuration (as above) either simple
data can be sent using commands 0320, 1025 or just data strings using 1024 or
strings plus formatted data sent using command 2304.
This program example will output the battery voltage and panel temperature from
the datalogger locations using the SDM-SIO4 Output Formatter.
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