Program examples, 1 control temperature and fans – cr1000 – Campbell Scientific SDM-CD16S 16-Channel Solid State DC Relay Controller Module User Manual
Page 14

SDM-CD16S 16 Channel Solid State DC Control Module
8. Program Examples
8.1 Control Temperature and Fans – CR1000
In this example, the SDM-CD16S is used to control the temperature between
23
° and 28°C in each of 5 greenhouses. In each greenhouse the SDM-CD16S
controls a heating unit, a refrigerating unit, and an air-mixing fan according to
the following conditions.
Heating unit: Activate when temperature < 23.5
°C. Deactivate when
temperature > 25.5
°C
Cooling unit: Activate when temperature > 27.5
°C. Deactivate when
temperature < 24.5
°C
Mixing fan: Activate whenever the heating or cooling units are activated.
Activate for 5 minutes out of every 15 minutes.
The program assumes the temperature measurements have been made, and the
average temperature for each greenhouse is computed and residing in the
appropriate variable
Input Location assignments are as follows:
Variable Array
Description
Temp(5)
Avg temp, greenhouse 1..5
Heat(5)
Heater control, greenhouse 1..5 SDM-CD16S
Port 1..5
Cool(5)
Cooler control, greenhouse 1..5 SDM-CD16S
Port 6..10
Fan(5)
Fan control, greenhouse 1..5 SDM-CD16S
Port 11..15
CD16_Output(16)
EXAMPLE 1: the actual values used to control
the SDM-CD16: CD16_Output(I), I = 1 to 5 are
for Heat, I = 6 to 10 are for Cooling, I= 11 to 15
are for Fans
CD16_Output as Long
EXAMPLE 2: the actual value used to control
SDMCD the CD16_Output bits set the SDM-
CD16S ports. bits 0 to 4 are for ‘Heat, 5 to 9 are
for Cooling, 10 to 14 are for Fans
10