6 sdm-a04 analog output multiplexer to strip chart – Campbell Scientific CR23X Micrologger User Manual

Page 116

Advertising
background image

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

8-6

03:

If time is (P92)
1:

0

Minutes (Seconds --) into a

2:

60

Interval (same units as above)

3:

10

Set Output Flag High

04:

Real Time (P77)
1: 0110

Day,Hour/Minute

05:

Totalize (P72)
1:

3

Reps

2:

10

Loc [ Precip_1 ]

INPUT LOCATIONS

10 Precip_1
11 Precip_2
12 Precip_3

8.6 SDM-A04 ANALOG OUTPUT

MULTIPLEXER TO STRIP CHART

This example illustrates the use of the SDM-
A04 4 Channel Analog Output Multiplexer to
output 4 analog voltages to a strip chart.

While of questionable value because of current
requirements and strip chart reliability, some
archaic regulations require strip chart backup
on weather data. The SDM-A04 may be used
with the CR23X to provide an additional four
analog outputs to strip charts. The output
values in this example are wind speed, wind
direction, air temperature, and solar radiation.

Instruction 103 is used to activate the SDM-
A04. The (4) millivolt values to output must be
stored in adjacent Input Storage locations, the
first of which is referenced in Instruction 103.

The following program measures the sensors
every 5 seconds. The readings are moved to
another 4 locations and scaled to a 0 to 1000
millivolt output for the SDM-A04. Wind direction
is changed from a 0-360 degree input to output
representing 0 to 540 degrees. This conversion
is done in a subroutine which is described in the
next example.

The example also includes instructions to
output wind vector and average temperature
and solar radiation every hour.

PROGRAM

*

Table 1 Program

01:

5

Execution Interval (seconds)

01:

Pulse (P3)
1:

1

Reps

2:

1

Pulse Input Channel

3:

22

Switch Closure, Output Hz

4:

1

Loc [ WS ]

5:

1.789

Mult

6:

1

Offset

02:

Excite-Delay (SE) (P4)
1:

1

Reps

2:

14

±1000 mV Fast Range

3:

1

SE Channel

4:

1

Excite all reps w/Exchan 1

5:

5

Delay (units 0.01 sec)

6: 1000

mV Excitation

7:

2

Loc [ 0_360_WD ]

8:

.7273

Mult

9:

0

Offset

03:

Temp (107) (P11)
1:

1

Reps

2:

2

SE Channel

3:

2

Excite all reps w/Exchan 2

4:

3

Loc [ Ta ]

5:

1

Mult

6:

0

Offset

04:

Volts (SE) (P1)
1:

1

Reps

2:

1

±10 mV Slow Range

3:

3

SE Channel

4:

4

Loc [ Rs ]

5:

.14493 Mult

6:

0

Offset

05:

If time is (P92)
1:

0

Minutes (Seconds --) into a

2:

60

Interval (same units as above)

3:

10

Set Output Flag High

06:

Block Move (P54)
1:

4

No. of Values

2:

1

First Source Loc [ WS ]

3:

1

Source Step

4:

5

First Destination Loc [ WS_out ]

5:

1

Destination Step

07:

Do (P86)
1:

1

Call Subroutine 1

Advertising