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
Summary of Contents for CR200
Page 32: ...Section 2 Quickstart Tutorial 22 ...
Page 45: ...Section 3 Overview 35 3 3 Specifications ...
Page 46: ...Section 3 Overview 36 ...
Page 58: ...Section 4 Sensor Support 48 ...
Page 62: ...Section 5 Measurement and Control Peripherals 52 ...
Page 78: ...Section 8 CR200 X Configuration 68 ...
Page 102: ...Section 9 Programming 92 ...
Page 138: ...Section 11 Programming Resource Library 128 ...
Page 156: ...Section 16 Support Software 146 ...
Page 160: ...Section 17 Care and Maintenance 150 ...
Page 167: ...Section 18 Troubleshooting 157 18 3 3 2 Charging Circuit Test Solar Panel ...
Page 168: ...Section 18 Troubleshooting 158 18 3 3 3 Charging Circuit Test Transformer ...
Page 169: ...Section 18 Troubleshooting 159 18 3 3 4 Adjusting Charging Circuit Voltage ...
Page 170: ...Section 18 Troubleshooting 160 ...
Page 184: ...Appendix A Glossary 14 ...
Page 190: ...Appendix B Status Table and Settings 20 ...
Page 192: ...Appendix C Serial Port Pin Outs 22 ...
Page 211: ......