Campbell Scientific SDM-CD8S 8 Channel Solid State DC Control Module User Manual

Page 29

Advertising
background image

SDM-CD8S 8 Channel Solid State DC Control Module

'Load Sequence Timing Array

For I = 1 To 10

'Load the Valve and Timing Array with the valve Settings:

ValveTime(I,1)

=

SiteValve(SiteSequence(I))

'Load the Valve and Timing Array with the number of scans at each setting:

ValveTime(I,2)

=

30

Next

I

'Initialize

Variables

One=1
SeqIndex=1

Count = 1

SeqActiveFlag = True

Site = SiteSequence(SeqIndex)

SiteOutput = Site

Scan

(1,Sec,10,0)

'Instructions to Measure Sensors Inserted Here.


'Set

valves:

SDMCD16AC

(ValveTime(1,1),1,1)


'Call

Data

Tables:

CallTable

RawData

CallTable

SiteAvg

Count = Count + 1

SiteOutput=Site

If SiteAvg.Output(1,1) Then Count = 1

'Reset Count when the

'Site average is output

If

SeqActiveFlag

Then

Site

=

SiteSequence(SeqIndex)

'Show the site number set by

'the Timed Control

If SeqProgrammedFlag = False Then 'Reset the first valve to

'the automatic value

ValveTime(1,1)

=

SiteValve(1)

ValveTime(1,2)

=

30

TimedControl(10,2,Min,1,SeqIndex,ValveTime,2)
TimedControl(10,2,Min,1,SeqIndex,ValveTime,2)
SeqProgrammedFlag

=

True

EndIf

Else

'Set the first valve setting to that for the current Site

'The Site number may be changed by user to switch sites.

ValveTime(1,1)

=

SiteValve(Site)

ValveTime(1,2)

=

0

If SeqProgrammedFlag = True Then 'Set the timed control to only

'use The first value

TimedControl(1,0,Min,SiteValve(Site),SeqIndex,ValveTime,1)
SeqProgrammedFlag

=

False

EndIf

EndIf
SiteValveCD16

=

SiteValve(Site)

EndOmit = Count > OmitCounts(Site)

AvgDisable = NOT (EndOmit AND SeqActiveFlag)

NextScan
EndProg

23

Advertising