
Section 8. Processing and Program Control Examples
8-5
8.3 Using Control Ports and Loop to Run an AM416
Multiplexer
This example uses an AM416 Analogue Multiplexer to measure the output of 16
copper-constantan thermocouples and 16 model 223 soil moisture blocks. The
sensors are read every ten minutes and the average value output once an hour. The
multiplexer is housed in an AM-ENCT enclosure to minimise thermocouple errors
created by thermal gradients. A Campbell Scientific 107 Temperature Probe is
centrally located on the multiplexer board and used as a thermocouple
temperature reference.
The AM416 switches the 223 moisture block out of the circuit when
it is not being measured. This eliminates the need for the blocking
capacitors used in the model 227 soil moisture block. The 223
blocks are about one quarter the cost of the 227 blocks.
Control ports are used to reset the AM416 and clock it through its channels. The
sequence of the program is:
1.
Temperature of the 107 probe located at the AM416 is measured to provide
a TC reference.
2.
CR10X sets the port high which resets the AM416.
3.
A loop is entered; within each pass:
The port clocking the AM416 is pulsed.
A delay to ensure that the relay is closed
The connected TCs and moisture blocks are measured.
4.
CR10X sets the port controlling AM416 reset low.
5.
Soil moisture measurements are converted to block resistances.
The input locations in which the temperature and soil moisture measurements are
stored are indexed to the loop counter (see description of Instruction 87 in Section
12). An indexed location is incremented by one with each pass through the loop.
For example, on the first pass the temperature is stored in location 2, and soil
moisture in location 18. On the second pass, temperature is stored in location 3
and soil moisture in location 19. After 16 loop passes, temperature and soil
moisture measurements occupy locations 2 to 17 and 18 to 33 respectively.
Connections are shown in Figure 8-1.
Figure 8-1 AM416 Wiring Diagram For Thermocouple and Soil Moisture
Block Measurements
NOTE
CR10X