Campbell Scientific CR10 CR10 Measurement and Control - Page 53
Program Control
View all Campbell Scientific CR10 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 53 highlights
SECTION 3.INSTRUCTION SET BASICS The instructions to output the average temperature every 10 minutes are in Table 2 which has an execution interval of 10 seconds. The temperature will be measured 600 times in the 10 minute period, but the average will be the result of only 60 of those measurements because the instruction to average is executed only one tenth as.often as the instruction to make the measurement. lntermediate Processing can be disabled by setting Flag 9 which prevents Intermediate Processing without actually skipping over the Output Instruction (Section 1.2). All of the Output Processing lnstructions store processed data values when and only when the Output Flag is set (Section 1.2). The Output Flag (Flag 0) is set at desired interuals or in response to certain conditions by using an appropriate Program Control Instruction (Section 11). 3.7 USE OF FLAGS: OUTPUT AND PROGRAM CONTROL There are 10 flags which may be used in CR10 programs. Two of the flags are dedicated to specific functions: Flag 0 causes Output Processing Instructions to write to Final Storage, and Flag 9 disables intermediate processing. Flags 1-8 may be used as desired in programming the CR10. Flags 0 and 9 are automatically set low at the beginning of the program table. Flags 1-8 remain unchanged untilacted on by or until manually atogPgrolegdrafmromCothnetro*6l IMnsotrduec.tion TABLE 3.7-1. Flag Description Flag 0 Flag 1 to 8 Flag 9 - Output Flag - User Flags - IntermediateProcessing Disable Flaq Flags are set with Program Control Instructions. The Output Flag (Flag 0) and the intermediate programming disable flag (Flag 9) willalways be set low if the set high condition fails. The status of flags 1-8 does not change when a conditional test is false. 3.7.1 THE OUTPUT FLAG A group of processed data values is placed in Final Data Storage by Output Processing Instructions when the Output Flag (Flag 0) is set high. This group of data is called an Output Array. The Output Flag is set using Program Control Instructions according to time or event dependent interuals specified by the user. The Output Flag is set low at the beginning of each table. Output is most often desired at fixed intervals; this is acoomplished with Instruction 92, lf Time. Output is usually desired on the even interval, so Parameter 1, time into the interval, is 0. The time interval (Parameter 2), in minutes, is how often output will occur; i.e., the Output lnterval. The command code (Parameter 3) is 10, causing Flag 0 to be set high. The time interual is synchronized to 24 hour time; output will occur on each integer multiple of the Output Interualstarting from midnight (0 minutes). lf the Output lnterval is not an even divisor of 1440 minutes (24 hours), the last output interval of the day will be less than the specified time interval. Output will occur at midnight and will resume synchronized to the new day. Instruction 92 is followed in the program table by the Output Instructions which define the Output Array desired. Each group of Output Processing Instructions creating an Output Array is preceded by a Program Control Instruction that sets the Output Flag. NOTE: lf the Output Flag is already set high and the test condition of a subsequent Program Control lnstruction acting on Flag 0 fails, the flag is set low. This eliminates entering another instruction to specifically reset the Output Flag before proceeding to another group of Output lnstructions with a ditferent output interval. 3.7.2 THE INTERMEDIATE PROCESSING DISABLE FLAG The Intermediate Processing Disable Flag (Flag 9) suspends intermediate processing when it is set high. This flag is used to restrict sampling for averages, totals, maxima, minima, etc., to times when certain criteria are met. The flag is automatically set low at the beginning of the program table. 3-3