1 the purpose of this example, 2 pipeline vs sequential – Campbell Scientific SDM-CD8S 8 Channel Solid State DC Control Module User Manual
Page 25

SDM-CD8S 8 Channel Solid State DC Control Module
EndIf
Site
=
SiteSequence(SeqIndex)
 EndIf 
 SiteValveCD16 
=
SiteValve(Site)
EndOmit = Count > OmitCounts
AvgDisable = NOT (EndOmit AND SeqActiveFlag)
 NextScan 
EndProg 
8.4 Control Gas Sampling with Timing in Measurement Task –
CR1000
8.4.1 The Purpose of this Example
This example illustrates an instruction that can be used if:
1) There is a requirement for precisely timed switching in a known timing 
sequence. 
2) The time required in the datalogger program for processing tasks is close to 
the scan interval. 
If the processing occasionally takes longer than the scan interval, there could 
be skipped measurements (sequential mode) or the measurements could be 
made but the switching would take place later than expected (pipeline mode). 
This program has the same timing and valve control as the example in Section 
8.2, however, instead of the logic in the program determining when to switch 
the valves, it makes use of the TimedControl instruction to control when valves 
switch as part of the measurement task (pipeline mode only). 
8.4.2 Pipeline vs Sequential
The Pipeline mode is more efficient than the Sequential mode. In the 
Sequential mode, all processing is completed before advancing to the next 
instruction. The Pipeline mode separates the measurement and processing 
tasks. Not only does this separation of tasks allow the datalogger to complete 
both tasks in less time than the sequential mode, it allows the processing task 
to briefly fall behind the measurement task without skipping any 
measurements. 
In the pipeline mode the results of the measurement task are stored in a buffer 
for the processing task. The processing task starts after the first measurement 
task is complete and can take place at the same time as the next measurement 
task. If the processing task has something that temporarily prevents it from 
finishing before the next measurement scan is complete, it can fall behind the 
measurement scan. Later when the processing is less intensive, the processing 
can run faster than the measurements and process the buffered measurement 
data and catch up to the measurement scan. Operations that may temporarily 
increase the processing are intensive calculations for final output processing, 
extra communications overhead, or initializing a new compact flash card. 
19
