'Program name: C:\pc208\test\LCDCAMP2.CR1 'Date written: 11/14/2005 'Transform Version: 0.5 'Transform file: C:\Program Files\Campbellsci\LoggerNet\CR10X.TRN Version: 1.0 ' 'This program was converted from C:\pc208\test\LCDCAMP2.CSI 'using Campbell Scientific's Transformer application. ' 'CRBasic angle units are in Radians by default. 'Switch to Degrees as CR10 used Degrees. AngleDegrees ' ' Declare array of flags as the CR10 had. Public Flag(8) as boolean '{CR10X} 'A programming example showing how the Judd Communications '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 '------------------------------------------------------- '\\\\\\\\\\\\\\\\\\\\\\\\\ DECLARATIONS ///////////////////////// Public Day Public Battery Public TempC Public CtrlA Public CtrlB Public Dummy Public DayLbl Public Loc11 Public Loc12 Public Loc13 Public Loc14 Public Loc15 Public Loc16 Public Loc17 Public TimeLbl Public Loc19 Public Loc20 Public Loc21 Public Loc22 Public Loc23 Public Loc24 Public Loc25 Public BatLbl Public Loc27 Public Loc28 Public Loc29 Public Loc30 Public Loc31 Public Loc32 Public Loc33 Public TempLbl Public Loc35 Public Loc36 Public Loc37 Public Loc38 Public Loc39 Public Loc40 Public Loc41 '\\\\\\\\\\\\\\\\\\\\\\\\ OUTPUT SECTION //////////////////////// DataTable(Table000,True,-1) EndTable DataTable(Table100,true,-1) OpenInterval DataInterval(0,60,Min,10) Average(1, Battery, FP2, 0) Average(1, TempC, FP2, 0) EndTable '\\\\\\\\\\\\\\\\\\\\\\\\\ SUBROUTINES ////////////////////////// '\\\\\\\\\\\\\\\\\\\\\\\\\\\ PROGRAM //////////////////////////// BeginProg Scan(5,Sec, 3, 0) 'The next three steps get the Day and Time and store them in 'input locations 1 and 2. CallTable Table000 If (Table000.output(1,1)) Then GetRecord(DayArray,Table000,1) Battery(Battery) PanelTemp(TempC, 250) '----------------------------------------------------- 'Input locations 6 and 7 are used to store the LCD1 cursor control codes CtrlA = 1 CtrlB = 2 'Load the ASCII character numbers for the label "DAY " DayLbl = 68 Loc11 = 65 Loc12 = 89 Loc13 = 32 Loc14 = 32 Loc15 = 32 Loc16 = 32 Loc17 = 32 'Load the ASCII character numbers for the label "TIME " TimeLbl = 84 Loc19 = 73 Loc20 = 77 Loc21 = 69 Loc22 = 32 Loc23 = 32 Loc24 = 32 Loc25 = 32 'Load the ASCII character numbers for the label "BATTERY " BatLbl = 66 Loc27 = 65 Loc28 = 84 Loc29 = 84 Loc30 = 69 Loc31 = 82 Loc32 = 89 Loc33 = 32 'Load the ASCII character numbers for the label "TEMPßC " TempLbl = 84 Loc35 = 69 Loc36 = 77 Loc37 = 80 Loc38 = 223 Loc39 = 67 Loc40 = 32 Loc41 = 32 '----------------------------------------------- 'Output an ASCII 01 character to clear the LCD1 display. 'Control Port Serial I/O 'Output the labels to the first row of the LCD1 display. 'Control Port Serial I/O 'Output an ASCII 02 character to move the cursor to the beginning 'of the second line of the LCD1 display. 'Control Port Serial I/O 'Output the values for Day, Time, Battery, & TempC to the LCD1 display. 'Note the two dash characters associated with parameter 6. They indicate 'that the values will be output in the ASCII decimal equivelants. To toggle on 'the dashes, posistion the cursor on parameter 6 and either press the "F4" key 'or the "-" key for older versions of EDLOG. 'Control Port Serial I/O '---------------------------------------------------- 'Log the battery voltage and module temperature once an hour CallTable Table100 'Set the array ID to 100 NextScan EndProg