A Cr10X Program Which Measures Four Frequency Inputs (Anemometers) And Four Switch Closure Inputs (Rain Gauges - Campbell SDM-IO16 User Manual

16 channel input/output expansion module
Table of Contents

Advertisement

SDM-IO16 16 Channel Input/Output Expansion Module
2: 94
3: 0000
4: 0000
5: 0000
6: 0000
7: 27
8: 10
9: 1.0
10: 0.0
;Alternatively for older dataloggers P104 could be used
;Remove the above and uncomment this instruction
;43: SDM-CD16 (P104)
;1: 1
;2: 00
;3: 10
*Table 2 Program
02: 0.0000
*Table 3 Subroutines
End Program
A.3 A CR10X Program which Measures Four
Frequency Inputs (Anemometers) and Four Switch
Closure Inputs (Rain Gauges)
;{CR10X}
;An example that shows initial setup with frequency measurement
;on four ports and pulse counting, with switch closure, on the next
;four. In this example the four frequencies are anemometers and
;the switch closures are raingauges that need to be totalised
;
*Table 1 Program
01: 5
;First configure the IO16 if not already done
;If flag 1 is not set, i.e. the program has just
;been compiled or datalogger powered up.
;This code is needed primarily to enable switch debounce filtering
;on channels 4..8
1: If Flag/Port (P91)
1: 21
2: 30
; Call instruction 188 to set the ports up
2: SDM-IO16 (P188)
1: 0
2: 90
3: 9999
4: 9999
5: 3333
A-6
Command Code Option
Ports 16-13
Ports 12-9
Ports 8-5
Ports 4-1
Return Code Loc [ ErrCount ]
First Loc [ Heat_1 ]
Mult
Offset
Reps
Address
Loc [ Heat_1 ]
Execution Interval (seconds)
This program can also be used with a CR23X datalogger.
Execution Interval (seconds)
Do if Flag 1 is Low
Then Do
SDM Address
Command Code Option
Ports 16-13
Ports 12-9
Ports 8-5
;set the ports from locations
;port settings not used for 94
;for return code
;for control values
;send instructions to the
;SDM-IO16 with address 00
;configure the ports
;Leave the last 8 ports as they are
;Set ports 5..8 as switch closure

Advertisement

Table of Contents
loading

Table of Contents