Section 7. Installation
193
FIGURE 42: Data from TrigVar Program
Using TrigVar to Trigger Data Storage
'This program example demonstrates the use of the TrigVar parameter in the DataTable()
'instruction to trigger data storage. In this example, the variable Counter is
'incremented by 1 at each scan. The data table, which includes the Sample(), Average(), and
'Totalize() instructions, is called every scan. Data are stored when TrigVar is true, and
'TrigVar is True when Counter = 2 or Counter = 3. Data stored are the sample, average,
'and total of the variable Counter, 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 = C 1
If
Counter = 5
Then
Counter = 0
EndIf
CallTable
Test
NextScan
EndProg
7.7.7 Data Output: Using Data Type Bool8
Variables used exclusively to store either
True
or
False
are usually declared
As
BOOLEAN
. When recorded in final-data memory, the state of Boolean
variables is typically stored in
BOOLEAN
data type.
BOOLEAN
data type uses
a four-byte integer format. To conserve final-data memory or comms band, you
can use the
BOOL8
data type. A BOOL8 is a one-byte value that holds eight bits
Summary of Contents for CR800 Series
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 34: ......
Page 54: ......
Page 92: ......
Page 310: ......
Page 446: ...Section 8 Operation 446 8 11 2 Data Display FIGURE 100 CR1000KD Displaying Data ...
Page 448: ...Section 8 Operation 448 FIGURE 102 CR1000KD Real Time Custom ...
Page 449: ...Section 8 Operation 449 8 11 2 3 Final Storage Data FIGURE 103 CR1000KD Final Storage Data ...
Page 450: ...Section 8 Operation 450 8 11 3 Run Stop Program FIGURE 104 CR1000KD Run Stop Program ...
Page 452: ...Section 8 Operation 452 FIGURE 106 CR1000KD File Edit ...
Page 456: ......
Page 462: ......
Page 523: ...Section 11 Glossary 523 FIGURE 116 Relationships of Accuracy Precision and Resolution ...
Page 524: ......
Page 526: ......
Page 556: ......
Page 558: ......
Page 560: ......
Page 597: ......