Section 5. Programming the Datalogger
5-3
The delay required in the program can either be forced using
Instruction P22, or by using the time to execute other
measurement or processing instructions.
5.2.1 Understanding Parameter Options and Returned Values
In the following examples, ‘
x
’ indicates a single digit from 0 to 9.
When the command requires or returns values, each digit, or combination of
digits, can signify either a value, flag or setting.
Using Command 5 as an example:
Number of watch dog resets
| | Number of invalid commands executed
| | | Lithium battery level
| | | |
x x x x
The first value returned by Command 5 indicates:
•
Actual number of watch dog resets (two digits 00 to 99) – a value.
•
Number of invalid commands executed (single digit 0 to 9) – a value.
•
Level (state) of the lithium battery (0=low, 1=good) – a flag.
If the value returned was, for example, 1281, then it would have the following
meaning:
12 watch dog resets
8 invalid commands
1 battery level good
The second value returned shows whether or not data is available from a
specific port. A non-zero digit indicates that data is available, whereas a zero
signifies that no data is available.
Command 5 is explained in detail later.
When a command parameter requires values to be entered (e.g.
Command 1026), it is a good idea to
always
enter all four digits.
Only trailing zeros are significant to the SDM-SIO4, and so
entering 0001 or 1 would be identical. However, if the first
parameter needs to be 1, you
must
enter 1000. The habit of
always entering all four values helps to minimize input errors.
5.2.2 Command 1: Poll of Available Data
This command has no additional options after the command. The SDM-SIO4
returns one Campbell Scientific floating point number to indicate if data is
available as below:
NOTE
NOTE
NOTE
Summary of Contents for SDM-SIO4
Page 6: ...SDM SIO4 Table of Contents iv This is a blank page ...
Page 12: ...Section 1 Introduction 1 6 This is a blank page ...
Page 16: ...Section 2 Installation and Hardware Set Up 2 4 This is a blank page ...
Page 26: ...Section 3 Understanding How the SDM SIO4 Handles Data 3 10 This is a blank page ...
Page 32: ...Section 4 Programming the SDM SIO4 4 6 This is a blank page ...
Page 62: ...Section 5 Programming the Datalogger 5 30 This is a blank page ...
Page 76: ...This is a blank page ...
Page 81: ...This is a blank page ...