Download Campbell CR23X Specifications
Transcript
APPENDIX B. CONTROL PORT SERIAL I/O INSTRUCTION 15 06: 01: P77 110 Real Time Day,Hour-Minute 07: 01: 02: P70 1 1 Sample Rep Loc AIR, mb Output out of range reading 08: 01: P86 19 Do Set high Flag 9 Set Intermediate Processing Disable Flag 09: 01: P86 21 Do Set low Flag 1 Set Flag 1 low 10: P95 End End of If Flag Then Do 11: 01: 02: 03: P92 0 720 10 If time is minutes into a minute interval Set high Flag 0 (output) Output mb twice/day 12: 01: P77 110 Real Time Day,Hour-Minute 13: 01: 02: P71 1 1 Average Reps Loc AIR, mb P End Table 1 14: Input Location Labels: 1:AIR, mb B.7.2 EXAMPLE 2: CR23X TO CR23X COMMUNICATION The following example shows how data can be sent between CR23X's. The program for the CR23X sending the data, CR23X#1, includes a loop which creates data to send; the numbers are generated and stored in Input Locations 1 through 10. Instruction 15 then transfers the contents of Locations 1 through 10 to CR23X#2. Instruction 15 in CR23X#2 receives and stores the values in Input Locations 11 through 20. As shown in Figure 2, the DTR from #1 is connected to control port 8 of CR23X#2. RS232 logic is used so DTR is +5V when asserted. The DTR going high is connected to port 8 of CR23X#2, causing subroutine 98 to be executed (refer to CR23X manual, Instruction 85, Section 12). Subroutine 98 contains Instruction 15, programmed to receive input. CR23X#2's RTS is connected to CR23X#1's CTS. When CR23X#2 executes Instruction 15, the RTS going high signals CR23X#1 to send data. CR23X#1 SEND DATA FUNCTION DTR CTS TX CR23X#2 RECEIVE DATA PORT PORT C1 ----------->C8 C2<----------- C1 C5 ----------->C5 FUNCTION Interrupt; SBR 98 RTS RX FIGURE B-2. Wiring Diagram for CR23X to CR23X Communication Example B-14