SDM-IO16 16 Channel Input/Output Expansion Module
A-6
2: 94
Command Code Option
;set the ports from locations
3: 0000
Ports 16-13
;port settings not used for 94
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
;Alternatively for older dataloggers P104 could be used
;Remove the above and uncomment this instruction
;43: SDM-CD16 (P104)
;send instructions to the
;1: 1
Reps
;SDM-IO16 with address 00
;2: 00
Address
;3: 10
Loc [ Heat_1 ]
*Table 2 Program
02: 0.0000
Execution Interval (seconds)
*Table 3 Subroutines
End Program
A.3 A CR10X Program which Measures Four
Frequency Inputs (Anemometers) and Four Switch
Closure Inputs (Rain Gauges)
This program can also be used with a CR23X datalogger.
;{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
Execution Interval (seconds)
;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
Do if Flag 1 is Low
2: 30
Then Do
; Call instruction 188 to set the ports up
2: SDM-IO16 (P188)
1: 0
SDM Address
2: 90
Command Code Option
;configure the ports
3: 9999
Ports 16-13
;Leave the last 8 ports as they are
4: 9999
Ports 12-9
5: 3333
Ports 8-5
;Set ports 5..8 as switch closure