Campbell SDM-IO16 User Manual page 29

16 channel input/output expansion module
Table of Contents

Advertisement

;Set flag 1 high to indicate we have run the setup code
3: Do (P86)
1: 11
Set Flag 1 High
4: End (P95)
;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)
1: 0
Delay
2: 5
Loop Count
;Start heater control logic
7: If (X<=>F) (P89)
1: 1
-- X Loc [ Temp_1 ]
2: 4
<
3: 23.5
F
4: 30
Then Do
8: Z=F (P30)
1: 1
F
2: 0
Exponent of 10
3: 10
-- Z Loc [ Heat_1 ]
9: End (P95)
10: If (X<=>F) (P89)
1: 10
-- X Loc [ Heat_1 ]
2: 2
<>
3: 0
F
4: 30
Then Do
11: If (X<=>F) (P89)
1: 1
-- X Loc [ Temp_1 ]
2: 3
>=
3: 25.5
F
4: 30
Then Do
12: Z=F (P30)
1: 0
F
2: 0
Exponent of 10
3: 10
-- Z Loc [ Heat_1 ]
13: End (P95)
14: Else (P94)
15: Z=F (P30)
1: 0
F
2: 0
Exponent of 10
3: 10
-- Z Loc [ Heat_1 ]
16: End (P95)
Appendix A. Program Examples
;of IF block
;Master loop: end
;loop at step 30
;if temperature is below
;heater threshold
;then
;put a '1' into heater control
;location
;end 'then do'
;if the heater is on (heater
;control location <>0)
;then
;check upper threshold
;to see if heater should
;be turned off
;if heater should be turned
;off, enter a '0' into
;heater control location
;end 'then do'
;else, if the heater is off
;enter a '0' into heater
;control location
;end 'then do/else'
A-3

Advertisement

Table of Contents
loading

Table of Contents