;{CR10X} ;A programming example showing how the Judd Communications LED ;Datalogger Display can be used with a CR10X or a CR10 equipped with the ;optional P15 Control Port Serial command and the P65 Bulk Load command. ; ; ;Wiring Diagram ;Color CR10X Datalogger Connection ;Red +12V ;Black Ground ;Clear Ground ;White Control Port 8 ; ;Sample the Day, Time, Battery voltage, and datalogger Temp every 5 seconds ;------------------------------------------------------- *Table 1 Program 01: 5 Execution Interval (seconds) ;The next three steps get the Day and Time and store them in ;input locations 1 and 2. 1: Do (P86) 1: 10 Set Output Flag High 2: Set Active Storage Area (P80) 1: 3 Input Storage Area 2: 1 Array ID or Loc [ Time ] 3: Real Time (P77) 1: 10 Hour/Minute 4: Batt Voltage (P10) 1: 2 Loc [ Battery ] 5: Internal Temperature (P17) 1: 3 Loc [ TempC ] 6: Z=X*F (P37) 1: 3 X Loc [ TempC ] 2: 1.8 F 3: 4 Z Loc [ TempF ] 7: Z=X+F (P34) 1: 4 X Loc [ TempF ] 2: 32 F 3: 4 Z Loc [ TempF ] ;----------------------------------------------------- ;Input locations 5, 6 and 7 are used to store the LED1 cursor control codes 8: Z=F (P30) 1: 0 F 2: 0 Exponent of 10 3: 5 Z Loc [ NUL ] 9: Z=F (P30) 1: 01 F 2: 0 Exponent of 10 3: 6 Z Loc [ CtrlA ] 10: Z=F (P30) 1: 02 F 2: 0 Exponent of 10 3: 7 Z Loc [ CtrlB ] ;Load the ASCII character numbers for the label "TIME " 11: Bulk Load (P65) 1: 84 F 2: 73 F 3: 77 F 4: 69 F 5: 32 F 6: 32 F 7: 32 F 8: 32 F 9: 9 Loc [ TimeLbl ] ;Load the ASCII character numbers for the label "BAT " 12: Bulk Load (P65) 1: 66 F 2: 65 F 3: 84 F 4: 32 F 5: 32 F 6: 32 F 7: 32 F 8: 32 F 9: 17 Loc [ BatLbl ] ;Load the ASCII character numbers for the label "TEMP " 13: Bulk Load (P65) 1: 84 F 2: 69 F 3: 77 F 4: 80 F 5: 32 F 6: 32 F 7: 32 F 8: 32 F 9: 25 Loc [ TempLbl ] ;----------------------------------------------- ;Clear the display. 14: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 6 Output Loc [ CtrlA ] 6: 1 No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Output a NUL to flush the Buffer 15: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 5 Output Loc [ NUL ] 6: 1 No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Pause for 1/10 of a sec. before updating display 16: Excitation with Delay (P22) 1: 1 Ex Channel 2: 10 Delay W/Ex (units = 0.01 sec) 3: 0 Delay After Ex (units = 0.01 sec) 4: 0 mV Excitation ;Output the Time label to the first row of the LED display. 17: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 9 Output Loc [ TimeLbl ] 6: 5 No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Output the Time value to the first row 18: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 1 Output Loc [ Time ] 6: 1 -- No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Move to start of second line. 19: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 7 Output Loc [ CtrlB ] 6: 1 No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Output the Bat label to the second row of the LED display. 20: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 17 Output Loc [ BatLbl ] 6: 5 No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Output the Battery value to the second row 21: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 2 Output Loc [ Battery ] 6: 1 -- No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Output a NUL to flush the Buffer 22: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 5 Output Loc [ NUL ] 6: 1 No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Pause 2 seconds 23: Excitation with Delay (P22) 1: 1 Ex Channel 2: 200 Delay W/Ex (units = 0.01 sec) 3: 0 Delay After Ex (units = 0.01 sec) 4: 0 mV Excitation ;----------------------------------------- ;Output 2 CR's to move to clear screen. 24: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 6 Output Loc [ CtrlA ] 6: 1 No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Output the Temp label to the second row of the LED display. 25: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 25 Output Loc [ TempLbl ] 6: 5 No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Output the Temp value to the second row 26: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 4 Output Loc [ TempF ] 6: 1 -- No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;Output a NUL to flush the buffer. 27: Port Serial I/O (Special) (P15) 1: 1 Reps 2: 01 ASCII/RS-232, 1200 Baud 3: 1 delay (0.01 seconds) 4: 7 First Control Port 5: 5 Output Loc [ NUL ] 6: 1 No. of Locs to Send 7: 0 Termination Character 8: 0 Maximum Characters 9: 1 CTS/Input Wait 10: 8 Loc [ Dummy ] 11: 1 Mult 12: 0 Offset ;---------------------------------------------------- ;Log the battery voltage and module temperature once an hour 28: If time is (P92) 1: 0 Minutes (Seconds --) into a 2: 60 Interval (same units as above) 3: 10 Set Output Flag High ;Set the array ID to 100 29: Set Active Storage Area (P80) 1: 1 Final Storage Area 1 2: 100 Array ID or Loc [ _________ ] ;Output Array, Year, Day, Time, Battery, TempC 30: Real Time (P77) 1: 1110 Year,Day,Hour/Minute 31: Average (P71) 1: 1 Reps 2: 2 Loc [ Battery ] 32: Average (P71) 1: 1 Reps 2: 3 Loc [ TempC ] ;----------------------------------------------- *Table 2 Program 02: 0.0 Execution Interval (seconds) *Table 3 Subroutines End Program -Input Locations- 1 Time 1 1 1 2 Battery 1 2 1 3 TempC 1 2 1 4 TempF 1 2 2 5 NUL 1 3 1 6 CtrlA 1 2 1 7 CtrlB 1 1 1 8 Dummy 1 0 12 9 TimeLbl 5 1 1 10 TimeLbl_2 9 0 1 11 TimeLbl_3 9 0 1 12 TimeLbl_4 9 0 1 13 TimeLbl_5 9 0 1 14 TimeLbl_6 9 0 1 15 TimeLbl_7 9 0 1 16 TimeLbl_8 17 0 1 17 BatLbl 5 1 1 18 BatLbl_2 9 0 1 19 BatLbl_3 9 0 1 20 BatLbl_4 9 0 1 21 BatLbl_5 9 0 1 22 BatLbl_6 9 0 1 23 BatLbl_7 9 0 1 24 BatLbl_8 17 0 1 25 TempLbl 5 1 1 26 TempLbl_2 9 0 1 27 TempLbl_3 9 0 1 28 TempLbl_4 9 0 1 29 TempLbl_5 9 0 1 30 TempLbl_6 9 0 1 31 TempLbl_7 9 0 1 32 TempLbl_8 17 0 1 -Program Security- 0000 0000 0000 -Mode 4- -Final Storage Area 2- 0 -CR10X ID- 0 -CR10X Power Up- 3