![background image](http://html1.mh-extra.com/html/campbell/cr200/cr200_instruction-manual_489088136.webp)
Section 11. Programming Resource Library
126
CRBASIC EXAMPLE. Using TrigVar to Trigger Data Storage
(p. 126) lists
CRBASIC code that uses TrigVar () rather than DataInterval () to trigger data
storage.
FIGURE. Data from TrigVar Program
(p. 126) shows data produced by
the example code.
CRBASIC EXAMPLE 19.
Using TrigVar to Trigger Data Storage
In this example, the variable "counter" is incremented by 1 each scan. The data table is c
includes the Sample (), Average (), and Totalize () instructions. TrigVar is true when
Data are stored when TrigVar is true. Data stored are the sample, average, and total o
which is equal to 0, 1, 2, 3, or 4 when the data table is called.
Public counter
DataTable (Test,counter=2 or counter=3,100)
Sample (1,counter,FP2)
Average (1,counter,FP2,False)
Totalize (1,counter,FP2,False)
EndTable
BeginProg
Scan (1,Sec,0,0)
counter = 1
If counter = 5 Then
counter = 0
EndIf
CallTable Test
NextScan
EndProg
Figure 48: Data from TrigVar Program
11.7 Multiple Data Intervals in Data Tables
The trigger variable may be used to set conditions where data is written to a data
table on more than one time interval.
CRBASIC EXAMPLE. Programming for
Two Data Intervals in One Data Table
p. 127 shows how this is done. Rather
than using the DataInterval instruction, output times are specified by inserting If
Содержание CR200
Страница 32: ...Section 2 Quickstart Tutorial 22 ...
Страница 45: ...Section 3 Overview 35 3 3 Specifications ...
Страница 46: ...Section 3 Overview 36 ...
Страница 58: ...Section 4 Sensor Support 48 ...
Страница 62: ...Section 5 Measurement and Control Peripherals 52 ...
Страница 78: ...Section 8 CR200 X Configuration 68 ...
Страница 102: ...Section 9 Programming 92 ...
Страница 138: ...Section 11 Programming Resource Library 128 ...
Страница 156: ...Section 16 Support Software 146 ...
Страница 160: ...Section 17 Care and Maintenance 150 ...
Страница 166: ...Section 18 Troubleshooting 156 18 3 3 Diagnosis and Fix Procedures 18 3 3 1 Battery Voltage Test ...
Страница 167: ...Section 18 Troubleshooting 157 18 3 3 2 Charging Circuit Test Solar Panel ...
Страница 168: ...Section 18 Troubleshooting 158 18 3 3 3 Charging Circuit Test Transformer ...
Страница 169: ...Section 18 Troubleshooting 159 18 3 3 4 Adjusting Charging Circuit Voltage ...
Страница 170: ...Section 18 Troubleshooting 160 ...
Страница 184: ...Appendix A Glossary 14 ...
Страница 190: ...Appendix B Status Table and Settings 20 ...
Страница 192: ...Appendix C Serial Port Pin Outs 22 ...
Страница 211: ......