'CR1000 Series Datalogger 'Read 1 string of 16ea Long Line Biaxial Serial IPI sensors 'Program author: Kevin Myers; DGSI 'New Program - June 14th, 2011 'Revision 01 - 08/01/2011 - K.Myers; DGSI ' - Modified delay commands before/after PulsePort 'Declare Public Variables Public PTemp, batt_volt, A_Axis(16), B_Axis(16), Temp(16) 'Declare Private Variables Dim Therm(16), x() 'Define Data Tables DataTable (IPI,1,-1) DataInterval (0,60,Min,10) Sample (1,batt_volt,FP2) Sample (1,PTemp,FP2) Sample (2,A_Axis(),IEEE4) Sample (2,B_Axis(),IEEE4) Sample (2,Temp(),FP2) EndTable 'Subroutines Sub Read_SMIPI PortSet (1,1) 'Turn on SM1 For x = 1 To 16 PulsePort (2 ,10000) 'Advance to the A axis Delay (0,1,Sec) VoltDiff (A_Axis(x),1,mV2500,1,True ,0,250,0.001,0) PulsePort (2 ,10000) 'Advance to the Temperature VoltDiff (Therm(x),1,mV2500,1,True ,0,250,0.001,0) Temp(x) = 9.3219*Therm(x)^5-54.3038*Therm(x)^4+131.165*Therm(x)^3-161.2568*Therm(x)^2+137.7711*Therm(x)-37.7705 PulsePort (2 ,10000) 'Advance to the B axis VoltDiff (B_Axis(x),1,mV2500,1,True ,0,250,0.001,0) Next PortSet (1,0) 'Turn off SM1 EndSub 'Main Program BeginProg Scan (60,Min,0,0)'Scan every 60 minutes PanelTemp (PTemp,250) Battery (batt_volt) Read_SMIPI 'read SerialMux IPI's CallTable IPI ' store a set of readings NextScan EndProg