-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLevel1_1.CR1
130 lines (118 loc) · 3.12 KB
/
Level1_1.CR1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
'CR1000 Series Datalogger
'Date: May 27, 2008, Sampling Time changed on Oct. 29, 2008
'Program author:Rohit Salve
'Program to monitor Level1_1 at Rivendell
'Setup includes (1)TDR system with three level 2 multiplexers with 7+8+8 probes.
'(Not probe lengths and cable lengths vary)
'(2) Two AM416 multiplexers with 24 resistance measurements each
' Program modified: Collin Bode, UC Berkeley, 11/15/2010
' Changed DataInterval on Table from 60 minutes to 5 minutes
'Declare Public Variables
Public i1
Public OutputFlag101
Public Temp101,
Public DLBatt_V
Public LaL_(31)
Public ERP_(48)
Alias ERP_(1)=erp1
Alias ERP_(2)=erp2
Alias ERP_(3)=erp3
Alias ERP_(4)=erp4
Alias ERP_(5)=erp5
Alias ERP_(6)=erp6
Alias ERP_(7)=erp7
Alias ERP_(8)=erp8
Alias ERP_(9)=erp9
Alias ERP_(10)=erp10
Alias ERP_(11)=erp11
Alias ERP_(12)=erp12
Alias ERP_(13)=erp13
Alias ERP_(14)=erp14
Alias ERP_(15)=erp15
Alias ERP_(16)=erp16
Alias ERP_(17)=erp17
Alias ERP_(18)=erp18
Alias ERP_(19)=erp19
Alias ERP_(20)=erp20
Alias ERP_(21)=erp21
Alias ERP_(22)=erp22
Alias ERP_(23)=erp23
Alias ERP_(24)=erp24
Alias ERP_(25)=erp25
Alias ERP_(26)=erp26
Alias ERP_(27)=erp27
Alias ERP_(28)=erp28
Alias ERP_(29)=erp29
Alias ERP_(30)=erp30
Alias ERP_(31)=erp31
Alias ERP_(32)=erp32
Alias ERP_(33)=erp33
Alias ERP_(34)=erp34
Alias ERP_(35)=erp35
Alias ERP_(36)=erp36
Alias ERP_(37)=erp37
Alias ERP_(38)=erp38
Alias ERP_(39)=erp39
Alias ERP_(40)=erp40
Alias ERP_(41)=erp41
Alias ERP_(42)=erp42
Alias ERP_(43)=erp43
Alias ERP_(44)=erp44
Alias ERP_(45)=erp45
Alias ERP_(46)=erp46
Alias ERP_(47)=erp47
Alias ERP_(48)=erp48
'Define Data Tables
DataTable (Level101,1,-1)
CardOut (0 ,-1)
Sample (1,DLBatt_V,FP2)
Sample (1,Temp101,FP2)
Sample (31,LaL_,FP2)
Sample (48,erp1,FP2)
EndTable
'Define Subroutines
'Sub
'EnterSub instructions here
'EndSub
'Main Program
BeginProg
Scan (5,Min,3,0)
PanelTemp (Temp101,250)
Battery (DLBatt_V)
' TDR Measurements for 3 Level2 multiplexers
TDR100 (LaL_(1),0,0,1107,4,1.0,251,23,5,0.3,0.085,1.0,0)
TDR100 (LaL_(8),0,0,2101,4,1.0,251,31,5,0.3,0.085,1.0,0)
TDR100 (LaL_(9),0,0,2204,4,1.0,251,22,5,0.3,0.085,1.0,0)
TDR100 (LaL_(13),0,0,2603,4,1.0,251,31,5,0.3,0.085,1.0,0)
TDR100 (LaL_(16),0,0,3108,4,1.0,251,39.35,2,0.075,0.035,1.0,0)
TDR100 (LaL_(24),0,0,4108,4,1.0,251,39.35,2,0.075,0.035,1.0,0)
' Measure Electectrical Resistance Probes (ERPs) connected to multiplexers
'ERP Multiplexer 1
PortSet(4, 1)
i1=1
SubScan (0,uSec,8)
PulsePort(5,10000)
Delay(0,100,MSEC)
BrHalf(ERP_(i1), 3, mV2500, 1, VX1, 3, 2500, False, 10000, 250, 1, 0)
ERP_(i1) = 100*(ERP_(i1)/(1.0-ERP_(i1)))
ERP_(i1+1) = 100*(ERP_(i1+1)/(1.0-ERP_(i1+1)))
ERP_(i1+2) = 100*(ERP_(i1+2)/(1.0-ERP_(i1+2)))
i1=i1+3
NextSubScan
PortSet(4, 0)
'ERP Multiplexer 2
PortSet(6, 1)
i1=25
SubScan (0,uSec,8)
PulsePort(7,10000)
Delay(0,100,MSEC)
BrHalf(ERP_(i1), 3, mV2500, 4, VX2, 3, 2500, False, 10000, 250, 1, 0)
ERP_(i1) = 100*(ERP_(i1)/(1.0-ERP_(i1)))
ERP_(i1+1) = 100*(ERP_(i1+1)/(1.0-ERP_(i1+1)))
ERP_(i1+2) = 100*(ERP_(i1+2)/(1.0-ERP_(i1+2)))
i1=i1+3
NextSubScan
PortSet(6, 0)
CallTable Level101
NextScan
EndProg