Section 7. Creating and Editing Datalogger Programs
The Scan instruction determines how frequently the measurements within the
scan are made:
Scan
(Interval, Units, BufferOption, Count)
Scan(1,MSEC,3,0)
The Scan instruction has four parameters (the CR200 datalogger’s Scan
instruction has only two). The Interval is the time between scans. Units are
the time units for the interval. The BufferSize is the size (in the number of
scans) of a buffer in RAM that holds the raw results of measurements. Using a
buffer allows the processing in the scan to at times lag behind the
measurements without affecting the measurement timing (see the scan
instruction in the CR5000 help for more details). Count is the number of scans
to make before proceeding to the instruction following NextScan. A count of 0
means to continue looping forever (or until ExitScan). In the example the scan
is 1 millisecond, three scans are buffered, and the measurements and output
continue indefinitely.
7.3.4.10 Numerical Entries
In addition to entering regular base 10 numbers there are 3 additional ways to
represent numbers in a program: scientific notation, binary, and hexadecimal
(TABLE 7-2).
TABLE 7-2. Formats for Entering Numbers in CRBasic
Format Example
Value
Standard 6.832
6.832
Scientific notation
5.67E-8
5.67X10
-8
Binary: &B1101
13
Hexadecimal &HFF
255
The binary format makes it easy to visualize operations where the ones and
zeros translate into specific commands. For example, a block of ports can be
set with a number, the binary form of which represents the status of the ports
(1= high, 0=low). To set ports 1, 3, 4, and 6 high and 2, 5, 7, and 8 low; the
number is &B00101101. The least significant bit is on the right and represents
port 1. This is much easier to visualize than entering 72, the decimal
equivalent.
7.3.4.11 Logical Expression Evaluation
7.3.4.11.1 What is True?
Several different words are used to describe a condition or the result of a test.
The expression, X>5, is either
true
or
false
. However, when describing the
state of a port or flag,
on
or
off
or
high
or
low
is more intuitive. In CRBasic
there are a number of conditional tests or instruction parameters, the result of
which may be described with one of the words in TABLE 7-3. The datalogger
evaluates the test or parameter as a number; 0 is false, not equal to 0 is true.
7-47
Summary of Contents for LoggerNet
Page 2: ......
Page 30: ...Preface What s New in LoggerNet 4 xxvi...
Page 32: ...Section 1 System Requirements 1 2...
Page 44: ...Section 2 Installation Operation and Backup Procedures 2 12...
Page 136: ...Section 4 Setting up Datalogger Networks 4 80...
Page 227: ...Section 7 Creating and Editing Datalogger Programs 7 9...
Page 298: ...Section 7 Creating and Editing Datalogger Programs 7 80...
Page 402: ...Section 9 Automating Tasks with Task Master 9 12...
Page 406: ...Section 9 Automating Tasks with Task Master 9 16...
Page 450: ...Section 11 Utilities Installed with LoggerNet Admin and LoggerNet Remote 11 22...
Page 454: ...Section 12 Optional Client Applications Available for LoggerNet 12 4...
Page 462: ...Section 13 Implementing Advanced Communications Links 13 8...
Page 482: ...Section 14 Troubleshooting Guide 14 20...
Page 570: ...Appendix F Calibration and Zeroing F 16...
Page 578: ...Appendix G Importing Files into Excel G 8...
Page 579: ......