Campbell Scientific SDM-IO16 16-Channel Input/Output Expansion Module User Manual
Page 26

SDM-IO16 16 Channel Input/Output Expansion Module
;Call instruction 188 to set the ports as outputs
;with the outputs set low.
2: SDM-IO16 (P188)
1: 00
SDM
Address
2: 90
Command
Code
Option
;configure the ports
3: 0000
Ports
16-13
;Set all ports as output and low
4: 0000
Ports
12-9
5: 0000
Ports
8-5
6: 0000
Ports
4-1
7: 27
Return Code Loc [ ErrCount ] ;for return code
8: 10
First Loc [ Heat_1 ]
;for control values
9: 1.0
Mult
10: 0.0
Offset
;Set flag 1 high to indicate we have run the setup code
3: Do (P86)
1: 11
Set Flag 1 High
4: End (P95)
;of IF block
;Measure the five temperatures, with 5 107 probes in this example
5: Temp (107) (P11)
1: 5
Reps
2: 1
SE
Channel
3: 1
Excite all reps w/E1
4: 1
Loc [ Temp_1 ]
5: 1.0
Mult
6: 0.0
Offset
6: Beginning of Loop (P87)
;Master loop: end
1: 0
Delay
;loop at step 30
2: 5
Loop
Count
;Start heater control logic
7: If (X<=>F) (P89)
;if temperature is below
1: 1
-- X Loc [ Temp_1 ]
;heater threshold
2: 4
<
3: 23.5
F
4: 30
Then
Do
;then
8: Z=F (P30)
;put a '1' into heater control
1: 1
F
;location
2: 0
Exponent
of
10
3: 10
-- Z Loc [ Heat_1 ]
9: End (P95)
;end 'then do'
10: If (X<=>F) (P89)
;if the heater is on (heater
1: 10
-- X Loc [ Heat_1 ]
;control location <>0)
2: 2
<>
3: 0
F
4: 30
Then
Do
;then
20