2 edlog, 3 programming examples – Campbell Scientific SDM-AO4 4-Channel Continuous Analog Output Module User Manual
Page 12

SDM-AO4 Four Channel Analog Output
Equation for CR5000:
bit_rate=INT(k*20)*Resolution
Where:
k= the value entered in BitPeriod
Resolution=50 nsec.
6.2 Edlog
The Edlog dataloggers are programmed with the SDM-AO4 Instruction 103
(See Table 4):
SDM-AO4 (P103)
1: 1
Reps
2: 00
SDM
Address
3: 0000
Loc [ _________ ]
The number of repetitions, Parameter 01, specifies the total number of SDM-
AO4 output channels to be set. The address of the first SDM-AO4 is specified
with Parameter 02, multiple SDM-AO4s must have consecutive addresses.
Parameter 3 is the starting Input Location containing the first millivolt level to
be output on the first channel of the first SDM-AO4. Subsequent millivolt
levels must be contained in consecutive Input Locations immediately after the
first Input Location specified in Parameter 3.
For example, two SDM-AO4s can be used to output eight voltage levels which
are contained in Input Locations 15 through 22. There are eight repetitions, so
eight (8) will be entered for Parameter 1. The SDM-AO4s must have
consecutive addresses (e.g., 31 and 32), and Parameter 2 would contain 31 in
this case. Fifteen (15) will be entered for Parameter 3.
TABLE 4. Description of Instruction 103
Par.
No.
Data
Type
escription
D
01:
2
Reps - Number of analog outputs.
02:
2
Address of SDM-AO4 in base 4 (00 to 33)
03:
4
Input Location containing millivolt output level
Execution Time: 1.0 ms + (0.8 ms) * R (R=Repetitions)
6.3 Programming Examples
The following program examples are given to help the user understand the
general principles involved in the use of the SDM-AO4 with CSI dataloggers.
Both of the example programs are for weather stations with a datalogger
measuring wind speed, wind direction, temperature, and relative humidity.
Each parameter is then scaled to 0 to 1000 mVDC, and output to a strip chart
recorder through the SDM-AO4.
8