Lysimeter Program Examples
CITATION THUMBNAILS DOWNLOADS PAGE IMAGE ZOOMABLE
Full Citation
STANDARD VIEW MARC VIEW
Permanent Link: http://ufdc.ufl.edu/IR00000283/00001
 Material Information
Title: Lysimeter Program Examples
Physical Description: Archival
Creator: Beeson, Richard
 Record Information
Source Institution: University of Florida
Holding Location: University of Florida Institutional Repository
Rights Management: All rights reserved by the source institution and holding location.
System ID: IR00000283:00001

Downloads
Full Text
This program for a CRIOOO measuring 16 load cells from multiplexed through a AM16/32b multiplexer
(in 4x4 mode) and controlling 16 independent irrigation valves using a SDM-CD16AC module.
Comments of details are indicated in italic.
Bold face type indicates CRBasic commands
Line numbers in italic, underlined and highlighted in yellow and correspond to discussion of this
program in the Agriculture Water Management manuscript entitled:
Suspension Lysimeter Systems for Quantifying Water Use and Modulating Water Stress for
Crops Grown in Organic Substrates

'CRIOOO Series Datalogger
'date: 4-28-10
'program author: RC Beeson

Const off =0
Const on = -1
Const run = 1

'Declare Public Variables
Public batt_volt, lys_mass(16), mass_500(16), mass_2200(16), CD16cntl(16), mass(16),
Corr_dailyETa( 16)
Public Total_ETa(16), Postlpm_massinc(16), Totalirr(16), ETA_lpm(16), preirr_mass(16),
cumirrmass(16)
Public Partirrvol(16), middaydelay As Long, irrneeded(2), irr_on(2), StoredETa(16), Trigger(16),
CF(16)
Public lcmult(16), lcoffset(16), switch(7)As Boolean, Flag(12)As Boolean,

'Declare Other Variables
Dim PEta2400(16), lysloopcount, i As Long
Dim cdl6status(2),lcnum(16),

'Act as logic switches
Alias switch(l) = readlysimeters
Alias switch(2) = irrindicator
Alias switch(3) = shutdownswitch
Alias switch(4) = startupswitch
Alias switch(5)= midday_signal
Alias switch(6) = endirrcyc
Alias switch(7) = irrbypass

'Define Data Tables
' Stores lysimeter masses every halfhr
DataTable (halfstor,true,-l)
Datalnterval (0,30,Min,-l)
Sample (16,lys_mass(),IEEE4)
EndTable


'Calculates mean load cell millivolts
DataTable (meanmass,flag(3),3)
Average (16, mass(),IEEE4,0)
EndTable

'Stores daily values
DataTable (dailysum,flag(7),400)
Sample (16,Total_ETa(),IEEE4)
Sample (16,mass_500(),IEEE4)
Sample (16,Postlpm_massinc(),IEEE4)
EndTable

'Irrigation shutdown subroutine
Sub irrshutdown
Fori = l To 16 Step 1
cumirrmass(i)= lys_mass(i) preirr_mass(i)
If cumirrmass(i) < 0 Then
cumirrmass(i) = 0
Endlf
Nexti
Fori = l To 16 Step 1
If cdl6cntl(i) = run AND partirrvol(i) >= cumirrmass(i) Then
cdl6cntl(i) = run
Else
cdl6cntl(i) = off
Endlf
Nexti
MaxSpa (irr_on,16,cdl6cntl(l))

'Override setting to prevent irrigation events longer than 15 min.
'Should be changed if "Overirrigate is on and irrigation is working well
If Timelntolnterval (15,30,Min) Then
If irr_on(l) = run Then
flag(4) = true
If shutdownswitch = on Then
Fori = l To 16 Step 1
cdl6cntl(i) = off
Nexti
Endlf
Endlf
Endlf
flag(12) = true
'Resets variables for next irrigation
If irr on = 0 Then


shutdownswitch = off
startupswitch = false
irrindicator = off
irrbypass = off
If midday signal = on Then
endirrcyc = on
Endlf
Endlf
EndSub

'Irrigation startup subroutine
Sub irrstart
Fori = l To 16 Step 1
If partirrvol(i) >= 0.2 Then
cdl6cntl(i) = run
Else
cdl6cntl(i) = off
Endlf
Nexti
startup s witch=off
irrindicator = on
irmeeded = off
irrbypass = on
flag(2) = true
EndSub
'Main Program
BeginProg
'Calibration constants for load cells. Where mult = slope and offset is constant value
'NOTE: calibration must be in kg, not grams!!!
lcmult(l)=
lcmult(2)=
lcmult(3)=
lcmult(4)=
lcmult(5)=
lcmult(6)=
lcmult(7)=
lcmult(8)=
lcmult(9)=
lcmult(10>
lcmult(ll>
lcmult(12>
lcmult(13>
lcmult(14>
lcmult(15>
lcmult(16>
lcoffset(l
lcoffset(2
lcoffset(3
lcoffset(4
lcoffset(5
lcoffset(6
lcoffset(7
lcoffset(8
lcoffset(9
: lcoffset(
: lcoffset(
: lcoffset(
: lcoffset(
: lcoffset(
: lcoffset(
: lcoffset(
=0
=0
=0
=0
=0
=0
=0
=0
=0
0)=
1)=
2)=
3)=
4)=
5)=
6)=


Scan (10,Sec,0,0)
Battery (batt_volt)

'Allow for bypassing program, such as when tinkering with it or when changing load cells, etc
' and you don't want non-useful data. Flag 1 has to be "on" (lit) for program to run.
If flag(l) = true Then

' When Flag 2 is on, bypasses normal 5 cycle to get average
'goodfor recalibration or to check things. Needed for irrigation control
If flag(2) = true Then
readlysimeters = on
lysloopcount=4
Endlf

'measures load cells attached to AM 16-32 in Dff channel 1 and Excite channel 1, returns mass
'LINE 130
If readlysimeters = on Then
lysloopcount = lysloopcount + 1
PortSet(4,l)
SubScan(50,msec, 16)
PulsePort(5,20000)
Icnum = Icnum +1
BrFull(mass(lcnum),l,mV7_5,-l,Vxl,l,2500,False,True
,20000,_60Hz,lcmult(lcnum),lcoffset(lcnum))
NextSubScan
CallTable meanmass
PortSet(4, 0)
Icnum = 0
Endlf 'LINE 141

'When lysloopcount = 5, by either instance measure or 5 rep mean, shuts down load cell reading and
calls for mean mass of each lysimeter.
'LINE 145
If lysloopcount = 5 Then
flag(3) = true
CallTable meanmass
Endlf 'LINE 148

'Retrives average mass per lysimeter from meanmass table and puts it in array lys massQ.
'LINE 151
If flag(3) = true Then
GetRecord(lys_mass(), meanmass,!)
Endlf LINE153
'After average mass retrieved, resets conditions to initial values for next lysimeter read.


If flag(3)= true AND lysloopcount = 5 Then
flag(3) = false
lysloopcount = 0
readlysimeters = off
If irrbypass = off Then
flag(2) = false
Endlf
Endlf

'Reads lysimeter every half hour and stores data in table named halfstor
'LINE 165
If Timelntolnterval (29,30,Min) Then
readlysimeters = on
Endlf 'LINE 167

'LINE 169
If Timelntolnterval (0,30,min) Then
CallTable halfstor
Endlf 'LINE 171

'Stores 5 am masses for ETa and irrigation volume determinations
'LINE 174
If Timelntolnterval (300,1440,Min) Then
Fori=l To 16 Step 1
mass_500(i)=lys_mass(i)
Nexti
Endlf 'LINE 178

'Stores 10 pm mass for irrigation volume and ETa determination
'LINE 181
If Timelntolnterval (1320,1440,Min) Then
Fori=l To 16 Step 1
mass_2200(i) = lys_mass(i)
Nexti
Endlf 'LINE 185

'At midnight, calculates cumulative daily ETA and setup irrigation for rest of night
'LINE 188
If Timelntolnterval (0, 1440, min) Then
flag(7) = true
Endlf
If Flag(7) = true Then
Fori= 1 To 16 Step 1
PEta2400(i) = mass_500(i) mass_2200(i)
IfPEta2400(i)<0Then
PEta2400(i) = 0


Endlf
Total_ETa(i) = PEta2400(i) + Postlpm_massinc(i) 'LINE 197

'LINE 199
Corr_dailyETa(i) = Total_ETa(i) CF(i)
StoredETa(i) = StoredETa(i) + Corr_dailyETa(i)
If StoredETa(i) > Trigger(i) Then 'LINE 20

Totalirr(i) = StoredETa(i)
StoredETa(i) = 0
Else
Totalirr(i) = 0
Endlf
Nexti
'LINE 202

Fori = l To 16 Step 1
'LINE 211
partirrvol(i) = Totalirr(i)* 0.333
Nexti

'Sets limit for 1/3 irrigation volume to 10 kg, if reached or exceeded, 'Underirrigation 'fiag lites up
'LINE 216
Fori = l To 16 Step 1
If partirrvol(i) >= 10 Then
partirrvol(i) =10
flag(5) = true
Endlf
Next i 'LINE 221

MaxSpa (Irrneeded,16,partirrvol(l))
CallTable Dailysum 'LINE 216

'Setup for initial mass for nighttime irrigation
'LINE 226
Fori = l To 16 Step 1
preirr_mass(i) = lys_mass(i)
Nexti
flag(7)= false
flag(9) = true
Endlf

'Sets up for 1 am irrigation
If Timelntolnterval (60,1440,Min) Then
Fori= 1 To 16 Step 1
preirr_mass(i) = lys_mass(i)


Nexti
MaxSpa (irrneeded,16,partirrvol(l))
Endlf
'Sets up for 2 am irrigation
If Timelntolnterval (120,1440,Min) Then
Fori = l To 16 Step 1
preirr_mass(i) = lys_mass(i)
Nexti
MaxSpa (irrneeded,16,partirrvol(l))
Endlf 'LINE 245

'Sets up for midday irrigation.
'To stop midday irrigation, change fiag(8) = true tofiag(8) = false
'LINE 249
If Timelntolnterval (781,1440,Min) Then
flag(8) = true
Endlf
If flag(8) = true Then
Fori = l To 16 Step 1
preirr_mass(i) = lys_mass(i)
Nexti
Fori = l To 16 Step 1
ETA_lpm(i) = mass_500(i) preirr_mass(i)

'Puts on 1/2 of ETA at midday. Can be reduced for slow drydown
partirrvol(i) = ETA_lpm(i)* 0.5

'Limits midday irrigation to 6 kg. You may need to increase if trees are big
If partirrvol(i) > 6 Then
partirrvol(i) = 6
flag(5) = true
Endlf
Nexti
MaxSpa (irrneeded,16,partirrvol(l))
midday signal = on
flag(8)= false
flag(10) = true
Endlf 'LINE 270

'Irrigation shutdown cycle
'LINE 272
MaxSpa (cdl6status(),16,cdl6cntl(l))
If cdl6status(l)=run Then
shutdownswitch = on


Endlf
If irrindicator = on AND shutdownswitch = on Then
Call irrshutdown
Endlf 'LINE 279

Irrigation startup cycle
'LINE 281
If irrneeded(l)> 0.2 Then
startupswitch = on
Endlf
If startupswitch = on Then
Call Irrstart
Flag(ll) = true
Endlf 'LINE 288

'solenoid control
SDMCD16AC (CD16cntl(),l,0)
cdl6status(l) = off

'Post-1 pm irrigation mass increase and cleanup
If midday_signal = on AND endirrcyc = on Then
middaydelay = middaydelay +1
If middaydelay = 11 Then
readlysimeters = on
Endlf

If middaydelay =17 Then
Fori = l To 16 Step 1
Postlpm_massinc(i) = lys_mass(i) preirr_mass(i)
Nexti
midday signal = off
endirrcyc = off
middaydelay = 0
irrbypass = off
midday signal = off
Endlf
Endlf
Endlf
NextScan
EndProg


This program for a CRIOX measuring 16 load cells from multiplexed through a AM16/32b
multiplexer (in 4x4 mode) and controlling 16 independent irrigation valves using a SDM-
CD16AC module.

Comments of details are indicated in italic.
Instruction line numbers are followed by text indicating what the instruction does, followed the
Edlog code number.
Example: 1: If Flag/Port (P91).
Line numbers highlighted in yellow correspond to discussion of this program in the Agriculture
Water Management manuscript entitled:
Weighing Lysimeter Systems for Quantifying Water Use and Studies of Controlled Water Stress
for Crops Grown in Low Bulk Density Substrates
;
*Table 1 Program
01: 10.0000 Execution Interval (secondsO

; Switch to stop data collection without stopping the datalogger

1: If Flag/Port (P91)
1:25 DoifFlag5isLow
2: 0 Go to end of Program Table

; Allows for quick check of load cell mass with Fl high
; Bypasses getting 5 rep masses then averaging

2: If Flag/Port (P91)
1:11 Do if Flag 1 is High
2: 30 Then Do

3: Do(P86)
1:14 Set Flag 4 High

4: Z=F(P30)
1:4 F
2: 0 Exponent of 10
3:311 ZLoc[________]

5: End(P95)

;Every 29 min into halfhr, takes 5 measurements of Ic's and averages them
6: Iftimeis(P92)


1: 29 Minutes (Seconds ~) into a
2:30 Interval (same units as above)
3:14 Set Flag 4 High

7: If Flag/Port (P91)
1:14 DoifFlag4isHigh
2: 30 Then Do

8: Do(P86)
1: 1 Call Subroutine 1

; Sub 1 readsIc

9: Z=Z+1 (P32)
1:311 ZLoc[________]

10: If(X<=>F)(P89)
1:311 XLoc[________]
2: 1
3: 5 F
4:30 Then Do

11: Z=F(P30)
1:0 F
2: 0 Exponent of 10
3:311 ZLoc[________]

; Averages 5 reps and converts mvolt to kg.

12: If Flag/Port (P91)
1:14 DoifFlag4isHigh
2:10 Set Qutput Flag High (Flag 0)

13: Set Active Storage Area (P80)
1: 3 Input Storage Area
2:17 ~Loc [Lysmassl ]

14: Resolution (P78)
1: 1 High Resolution

15: Average (P71)^8673
1: 16 Reps
2: 1 Loc [ Icmvl ]
16: Do(P86)
1: 20 Set Qutput Flag Low


17: Do(P86)
1:24 Set Flag 4 Low
Input calibration for each Ic as slope (A) and constant (B)
18 1 2 : Scaling Array (A*Loc+B) (P53) 17 Start Loc [Lysmassl ] 1 Al
o J 0 Bl
4 1 A2
5 0 B2
6 1 A3
7 0 B3
8 1 A4
9 0 B4
19 1 2 : Scaling Array (A*Loc+B) (P53) 21 Start Loc [ Lysmass5 ] 1 Al
3 0 Bl
4 1 A2
5 0 B2
6 1 A3
7 0 B3
8 1 A4
9 0 B4
2C 1 2 : Scaling Array (A*Loc+B) (P53) 25 Start Loc [ Lysmass9 ] 1 Al
3 0 Bl
4 1 A2
5 0 B2
6 1 A3
7 0 B3
8 1 A4
9 0 B4
21 1 2 : Scaling Array (A*Loc+B) (P53) 29 Start Loc [ Ly smass 13 ] 1 Al
o J 0 Bl
4 1 A2
5 0 B2
6 1 A3


7:0 B3
8: 1 A4
9:0 B4
22: End(P95)

23: End(P95)

; Saves halfhr masses to Storage Area 1

24: Iftimeis(P92)
1: 0 Minutes (Seconds ~) into a
2:30 Interval (same units as above)
3:10 Set Qutput Flag High (Flag 0)

25: Set Active Storage Area (P80)^25773
1: 1 Final Storage Area 1
2: 3 Array ID

26: RealTime(P77)^17158
1: 1120 (Same as 1220) Y,D,Hr/Mn

27: Resolution (P78)
1: 1 High Resolution

28: Sample (P70)^25964
1: 16 Reps
2:17 Loc [Lysmassl ]

29: Do(P86)
1: 20 Set Qutput Flag Low (Flag 0)

; Saves 5 am masses for calculation of ETa

30: Iftimeis(P92)
1: 300 Minutes (Seconds ~) into a
2: 1440 Interval (same units as above)
3:30 Then Do

31: Do(P86)
1:10 Set Qutput Flag High

32: Set Active Storage Area (P80)
1: 3 Input Storage Area
2:33 --Loc [ Mass5h_l ]


33: Resolution (P78)
1: 1 High Resolution
34: Sample (P70)^10112
1: 16 Reps
2:17 Loc [Lysmassl ]

35: Do(P86)
1: 20 Set Qutput Flag Low

36: End(P95)

; Saves midnight mass for calculation of ETa

37: Iftimeis(P92)
1: 0 Minutes (Seconds ~) into a
2: 1440 Interval (same units as above)
3:30 Then Do

38: Do(P86)
1:10 Set Qutput Flag High

39: Set Active Storage Area (P80)
1: 3 Input Storage Area
2:49 --Loc [ Mass24Hl ]

40: Resolution (P78)
1: 1 High Resolution

41: Sample (P70)^12338
1: 16 Reps
2:17 Loc [Lysmassl ]

42: Do(P86)
1: 20 Set Qutput Flag Low

43: End(P95)

; Calculates ETa at midnight

44: Iftimeis(P92)
1: 0 Minutes (Seconds ~) into a
2: 1440 Interval (same units as above)
3:30 Then Do
45: Beginning of Loop (P87)


1:0 Delay
2: 16 Loop Count
46: Z=X-Y(P35)
1: 33 --X Loc [ Mass5h_l ]
2:49 --Y Loc [ Mass24Hl ]
3:65 --Z Loc [ PartETAl ]

; Prevents recording of negative ETa

47: If(X<=>F)(P89)
1:65 --XLoc [PartETAl ]
2:04 <
3:0 F
4: 30 Then Do

48: Z=F(P30)
1:0 F
2: 0 Exponent of 10
3:65 --Z Loc [ PartETAl ]

49: End(P95)

; Adds volume irrigation applied at mid-day to ETa between 5 am and midnight to calculate
Daily ETa

50: Z=X+Y(P33)
1:65 --XLoc [PartETAl ]
2:97 --Y Loc [ MidETAl ]
3:81 --Z Loc [ TotETAl ]

51: End(P95)

; Saves Daily ETa, 5 am mass and maximum 1 pm mass to Storage Area 2

52: Do(P86)
1:10 Set Qutput Flag High

53: Set Active Storage Area (P80)^14619
1: 2 Final Storage Area 2
2: 1 Array ID

54: Real Time (P77)^25637
1: 1220 Year,Day,Hour/Minute (midnight = 2400)
55: Resolution (P78)


1: 1 High Resolution
56: Sample (P70)^24416
1: 16 Reps
2:81 Loc [TotETAl ]

57: Resolution (P78)
1: 1 High Resolution

58: Sample (P70)^27801
1: 16 Reps
2:33 Loc[Mass5h_l ]
59: Resolution (P78)
1: 1 High Resolution

60: Sample (P70)^9686
1: 16 Reps
2:225 Loc[Maxml3hl ]
61: Sam pie (P70)
1: 16 Reps
2:97 Loc [ MidETAl ]
62: Do(P86)
1: 20 Set Qutput Flag Low

Multiplies Daily ETA by Correction Factor
Adds corrected ETA to calculated ETA not applied previously (Stored ETA)
Compares current cummulative ETA to minimum volume to apply (Trigger volume)
If Cummulative ETA > trigger, shuttles Cummulative ETA for night irrigation
If Cummulative ETA < trigger, add to Stored ETA

63: Beginning of Loop (P87)
1:0 Delay
2: 16 Loop Count

64: Z=X*Y(P36)
1:81 --X Loc [ TotETAl ]
2: 113 -YLoc[CF_l ]
3: 129 --ZLoc[Corrvoll ]

65: Z=X+Y(P33)
1: 129 --XLoc[Corrvoll ]
2: 145 --YLoc[Irstorel ]


3: 145 --Z Loc [ Irstorel ]
66: If(X<=>Y)(P88)
1: 145 --XLoc [Irstorel ]
2:3 >=
3: 161 --Y Loc [ Triggerl ]
4: 30 Then Do

67: Z=X(P31)
1: 145 --XLoc [Irstorel ]
2: 177 --ZLoc[TotIrApl ]

68: Z=Fx 10^n(P30)
1:0 F
2: 0 n. Exponent of 10
3: 145 --Z Loc [Irstorel ]

69: Else(P94)

70: Z=Fx 10^n(P30)
1:0 F
2: 0 n. Exponent of 10
3: 177 --ZLoc[TotIrApl ]

71: End(P95)

; Splits Irrigation to apply into thirds for night irrigation

72: Z=X*F(P37)
1: 177 --XLoc[TotIrApl ]
2: .33333 F
3:209 -ZLoc[ParIrApl ]

; Limits 1/3 irrigation to 5 L nightly
; Must be changed based on container size

73: If(X<=>F)(P89)
1:209 --XLoc[ParIrApl ]
2:3 >=
3: 5 F
4: 30 Then Do

74: Z=F(P30)
1: 5 F
2: 0 Exponent of 10
3:209 --ZLoc[ParIrApl ]


; Sets Flag 8 to on to signal maximum irrigation volume limit too low
75: Do(P86)
1:18 Set Flag 8 High

76: End(P95)

77: End(P95)

78: Spatial Maximum (P49)
1: 16 Swath
2: 209 First Loc [ ParlrApl ]
3:312 Max Loc [ SpaMax209 ]

79: End(P95)

; Set up for midday irrigation

80: Iftimeis(P92)
1: 780 Minutes (Seconds ~) into a
2: 1440 Interval (same units as above)
3:10 Set Qutput Flag High (Flag 0)

81: Set Active Storage Area (P80)
1: 3 Input Storage Area
2: 257 -- Loc [ Prelrrmal ]

82: Resolution (P78)
1: 1 High Resolution

83: Sample (P70)^22712
1: 16 Reps
2:17 Loc [Lysmassl ]

84: Do(P86)
1: 20 Set Qutput Flag Low

; Sets up midday irrigation to near solar noon
; Sets it at 0.6 of ETa

; NQTE: To prevent midday irrigation, set the "30" at command 85(3) to "0"
; Also changes locations 241 to 256 to "0"

85: Iftimeis(P92)
1: 720 Minutes (Seconds ~) into a


2: 1440 Interval (same units as above)
3:30 Then Do

86: Beginning of Loop (P87)
1:0 Delay
2: 16 Loop Count

87: Z=X-Y(P35)
1: 33 --X Loc [ Mass5h_l ]
2: 257 -- Y Loc [ Prelrrmal ]
3:241 --ZLoc[Difml3hl ]

88: Z=X*F(P37)
1:241 -XLoc[Difml3hl ]
2: .6 F
3:209 --Z Loc [ParlrApl ]

; Limits mid-day irrigation to 5 L maximum
; Sets F8 high if exceeds maximum

89: If(X<=>F)(P89)
1:209 -XLoc [ParlrApl ]
2:3 >=
3: 5 F
4: 30 Then Do

90: Z=F(P30)
1: 5 F
2: 0 Exponent of 10
3:209 -Z Loc [ParlrApl ]

91: Do(P86)
1:18 Set Flag 8 High

92: End(P95)

93: End(P95)

; Sets midday irrigation volume

94: Spatial Maximum (P49)
1: 16 Swath
2: 209 First Loc [ ParlrApl ]
3:313 Max Loc [ Spamaxl3h ]

; 313 indicates to program this is mid-day irrigation


95
1
2
Z=X (P30)
313 XLoc [Spamaxl3h ]
312 ZLoc [SpaMax209 ]
96: Z=F(P30)
1: 1 F
2: 0 Exponent of 10
3:321 ZLoc[Irrl3h_on]

97: End(P95)

; Sets initial pre-irrigation mass for determining when volume to apply is reached
; For midnight

98: Iftimeis(P92)
1: 0 Minutes (Seconds ~) into a
2: 1440 Interval (same units as above)
3:10 Set Qutput Flag High (Flag 0)

99: Set Active Storage Area (P80)
1: 3 Input Storage Area
2: 257 ~ Loc [ Prelrrmal ]

100: Resolution (P78)
1: 1 High Resolution

101: Sample (P70)^l0726
1: 16 Reps
2:17 Loc [Lysmassl ]

100: Do(P86)
1: 20 Set Qutput Flag Low

; Sets initial pre-irrigation mass for determining when volume to apply is reached
; For 0100 h irrigation

103: Iftimeis(P92)
1: 60 Minutes (Seconds ~) into a
2: 1440 Interval (same units as above)
3:30 Then Do

104: Do(P86)
1:10 Set Qutput Flag High (Flag 0)
105: Set Active Storage Area (P80)


1: 3 Input Storage Area
2: 257 ~ Loc [ Prelrrmal ]
106: Sample (P70)
1: 16 Reps
2:17 Loc [Lysmassl ]

107: Do(P86)
1: 20 Set Qutput Flag Low

108: Spatial Maximum (P49)
1
2
3
16 Swath
209 -FirstLoc [ParlrApl ]
312 Max Qption [ SpaMax209 ]
109: End(P95)

; Sets initial pre-irrigation mass for determining when volume to apply is reached
; For 0200 hirrigation

110: Iftimeis(P92)
1: 120 Minutes (Seconds ~) into a
2: 1440 Interval (same units as above)
3:30 Then Do

111: Do(P86)
1:10 Set Qutput Flag High

112: Set Active Storage Area (P80)
1: 3 Input Storage Area
2: 257 ~ Loc [ Prelrrmal ]

113: Resolution (P78)
1: 1 High Resolution

114: Sample (P70)^27785
1: 16 Reps
2:17 Loc [Lysmassl ]

115: Do(P86)
1: 20 Set Qutput Flag Low

116: Spatial Maximum (P49)
1: 16 Swath
2: 209 First Loc [ ParlrApl ]
3:312 Max Qption [ SpaMax209 ]


117: End(P95)
; Irrigation shut down cycle

118: Spatial Maximum (P49)
1: 16 Swath
2:286 FirstLoc[Cdl6cnll ]
3:314 MaxLoc[SpMaxCD16]

119: If(X<=>F)(P89)
1:314 XLoc[SpMaxCD16]
2: 1
3: 1 F
4:17 Set Flag 7 High

120: If(X<=>F)(P89)
1:315 X Loc [ SignlrrQN ]
2: 1
3: 1 F
4: 30 Then Do

121: If Flag/Port (P91)
1:17 DoifFlag7isHigh
2: 3 Call Subroutine 3

122: End(P95)

; Irrigation start cycle
; Minimum irrigation, set at 0.2 L may need to be changed

123: If(X<=>F)(P89)
1:312 X Loc [ SpaMax209 ]
2: 3 >=
3: .2 F
4:12 Set Flag 2 High

; Subroutine 2 starts irrigation

124: If Flag/Port (P91)
1:12 DoifFlag2isHigh
2: 2 Call Subroutine 2

; CD 16AC control to start water valves

125: SDM-CD16/SDM-CD16AC(P104)


1: 1 Reps
2: 0 SDM Address
3:286 Loc[Cdl6cnll ]
126: Z=Fxl0^n(P30)
1:0 F
2: 0 n. Exponent of 10
3:314 ZLoc[SpMaxCD16]

; Id for mid-irrigation

127: If(X<=>F)(P89)
1:321 XLoc[Irrl3h_on]
2: 1
3: 1 F
4: 30 Then Do

; When mid-day irrigation is complete, delays 1 min for irrigation to stop,
; then calculates irrigated weight and actual irrigation volume applied to each pot

128: If(X<=>F)(P89)
1:318 XLoc[Delayl3h ]
2: 1
3: 1 F
4:30 Then Do

129: Z=Z+1 (P32)
1: 319 Z Loc [ Delaycnt ]

130: If(X<=>F)(P89)
1: 319 X Loc [ Delay cnt ]
2: 1
3: 11 F
4:11 Set Flag 1 High

131: If(X<=>F)(P89)
1: 319 X Loc [ Delay cnt ]
2:3 >=
3: 12 F
4: 30 Then Do

132: Beginning of Loop (P87)
1:0 Delay
2: 16 Loop Count
133: Z=X(P31)


1:17 ~ XLoc [Lysmassl ]
2:331 -ZLoc[Sml3hmxl ]

134: End(P95)

135: End(P95)

136: If(X<=>F)(P89)
1: 319 X Loc [ Delay cnt ]
2:3 >=
3: 17 F
4: 30 Then Do

137: Do(P86)
1:13 Set Flag 3 High

138: If Flag/Port (P91)
1:13 DoifFlag3isHigh
2:10 Set Qutput Flag High (Flag 0)

139: Set Active Storage Area (P80)
1: 3 Input Storage Area
2:225 -Loc[Maxml3hl ]

140: Resolution (P78)
1: 1 High Resolution

141: Average (P71)^26777
1: 16 Reps
2:331 Loc[Sml3hmxl ]

142: Do(P86)
1: 20 Set Qutput Flag Low (Flag 0)

143: Do(P86)
1:23 Set Flag 3 Low

144: Beginning of Loop (P87)
1: 0 Delay
2: 16 Loop Count

145: Z=X-Y(P35)
1:225 -XLoc[Maxml3hl ]
2: 257 Y Loc [ Prelrrmal ]
3:97 Z Loc [ MidETAl ]


146: If(X< = >F) (P89)
97 X Loc [ MidETAl ]
4 <
0 F
30 Then Do

147: Z=Fx 10^n(P30)
1: 0 F
2: 0 n. Exponent of 10
3: 97 Z loc [MidETAl ]
148: End(P95)

149: End (95)

150: Z=F(P30)
1:0 F
2: 0 Exponent of 10
3:321 ZLoc[Irrl3h_on]

151: Z=F(P30)
1:0 F
2: 0 Exponent of 10
3:316 ZLoc[CD16_off ]

152: Z=F(P30)
1:0 F
2: 0 Exponent of 10
3: 319 Z Loc [ Delay cnt ]

153: Do(P86)
1:21 Set Flag 1 Low

154: End(P95)

155: End(P95)

156: End(P95)

* Table 2 Program

* Table 3 Subroutines

; Load cell reading loop
1: Beginning of Subroutine (P85)


1: 1 Subroutine 1
; Load cell reader

2: Do(P86)
1:45 Set Port 5 High

3: Beginning of Loop (P87)
1:0 Delay
2: 16 Loop Count

4: Do(P86)
1:74 Pulse Port 4

5: Ex-Del-Diff(P8)
1: 1 Reps
2: 23 25 mV 60 Hz Rejection Range (Delay must be zero)
3: 1 DIFF Channel
4: 1 Excite all reps w/Exchan 1
5:10 Delay (0.01 sec units)
6:2500 mV Excitation
7:1 ~ Loc [ Icmvl ]
8: 1 Mult
9:0 Qffset

6: End(P95)

7: Do(P86)
1:55 Set Port 5 Low

8: End(P95)

; Starts irrigation by activiting switchable 12v port on CRIOX

9: Beginning of Subroutine (P85)
1:2 Subroutine 2
10: Beginning of Loop (P87)
1:0 Delay
2: 16 Loop Count

11: If(X<=>F)(P89)
1:209 -XLoc [ParlrApl ]
2:3 >=
3: .2 F
4:16 Set Flag 6 High


12: If Flag/Port (P91)
1:16 DoifFlag6isHigh
2: 30 Then Do

13: Z=Fx 10^n(P30)
1: 1 F
2: 0 n. Exponent of 10
3:286 -ZLoc[Cdl6cnll ]

14: Else(P94)

15: Z=Fx 10^n(P30)
1:0 F
2: 0 n. Exponent of 10
3:286 -ZLoc[Cdl6cnll ]

16: End(P95)

17: Do(P86)
1:26 Set Flag 6 Low

18: End(P95)

19: Do(P86)
1:22 Set Flag 2 Low

20: Z=Fx 10^n(P30)
1: 1 F
2: 0 n. Exponent of 10
3:315 Z Loc [ SignlrrQN ]

21: Z=Fx 10^n(P30)
1:0 F
2: 0 n. Exponent of 10
3:312 Z Loc [ SpaMax209 ]

22: Do(P86)
1:11 Set Flag 1 High

23: End(P95)
; Irrigation shut down routine

24: Beginning of Subroutine (P85)
1: 3 Subroutine 3


25: Beginning of Loop (P87)
1:0 Delay
2: 16 Loop Count

26: Z=X-Y(P35)
1:17 ~ XLoc [Lysmassl ]
2: 257 Y Loc [ Prelrrmal ]
3:273 -ZLoc[________]

27: If(X<=>F)(P89)
1:273 -XLoc[________]
2:4 <
3:0 F
4: 30 Then Do

28: Z=Fx 10^n(P30)
1:0 F
2: 0 n. Exponent of 10
3:273 -ZLoc[________]

29: End(P95)

30: End(P95)

31: Beginning of Loop (P87)
1:0 Delay
2: 16 Loop Count

32: If(X<=>F)(P89)
1:286 -XLoc[Cdl6cnll ]
2: 1
3: 1 F
4: 30 Then Do

33: If(X<=>Y)(P88)
1:273 ~XLoc[ Irmasincl ]
2:4 <
3:209 -YLoc[ ParlrApl ]
4:30 Then Do

34: Do(P86)
1: 16 Set Flag 6 High
35: Else (P94)


36: Do (P86)
1: 26 Set Flag 6 Low
37: End(P95)

38: Else(P94)

39: Do (P86)
1: 26 Set Flag 6 Low

40: End (P95)
41
1
2
If Flag/Port (P91)
16 Do if Flag 6 is High
30 Then Do
42
1
2
3
Z=Fx 10^n(P30)
1 F
0 n. Exponent of 10
286 -ZLoc[Cdl6cnll ]
43: Else(P94)

44: Z=Fx 10^n(P30)
1:0 F
2: 0 n. Exponent of 10
3:286 -ZLoc[Cdl6cnll ]

45: End(P95)

46: Do(P86)
1:26 Set Flag 6 Low

47: End(P95)

Shuts down irrigation if it requires more than 15 min

48: Iftimeis(P92)
1:15 Minutes (Seconds ~) into a
2:30 Interval (same units as above)
3:30 Then Do

49: Z=Fxl0^n(P30)
1:99 F
2: 0 n. Exponent of 10


3:317 Z Loc [ Qverrun ]

50: End(P95)

51: If(X<=>F)(P89)
1:317 XLoc[ Qverrun]
2: 1
3:99 F
4:30 Then Do

52: If Flag/Port (P91)
1:17 DoifFlag7isHigh
2: 30 Then Do

53: Beginning of Loop (P87)
1:0 Delay
2: 16 Loop Count

54: Z=Fxl0^n(P30)
1:0 F
2: 0 n. Exponent of 10
3:286 -ZLoc[Cdl6cnll ]

55: End(P95)

56: End(P95)

57: End (P95)

58: Spatial Maximum (P49)
1: 16 Swath
2:286 First Loc { Cdl6cnll ]
3: 316 Max Loc [ CD16_off ]

59: If(X<=>F) (P89)
1: 316 XLoc[ CD16_off ]
2: 1
3:0 F
4:30 Then Do

60: Do (P86)
1:27 Set Flag 7 Low
61: Do (P86)
1:21 Set Flag 1 Low


62: Z=Fxl0^n(P30)
1:0 F
2: 0 n. Exponent of 10
3:315 Z Loc [ SignlrrQN ]

63: Z=Fx 10^n(P30)
1:0 F
2: 0 n. Exponent of 10
3:317 Z Loc [ Qverrun ]

64: If(X<=>F)(P89)
1:321 XLoc[Irrl3h_on]
2: 1
3: 1 F
4: 30 Then Do

65: Z=Fx 10^n(P30)
1: 1 F
2: 0 n. Exponent of 10
3:318 ZLoc[Delayl3h ]

66: End(P95)

67 End (P95)

68: End(P95)
End program


University of Florida Home Page
© 2004 - 2011 University of Florida George A. Smathers Libraries.
All rights reserved.

Acceptable Use, Copyright, and Disclaimer Statement
Last updated May 24, 2011 - Version 3.0.0 - mvs