Campbell Scientific CR5000 CR5000 Measurement and Control Module - Page 42

Internal Data Format, TABLE 2.2-1, CR5000 DATA TYPES, Resolution and Range Limits of FP2 Data

Page 42 highlights

Section 2. Data Storage and Retrieval When a new program is compiled that sends data to the PC card, the CR5000 checks if a card is present and if the card has adequate space for the data tables. If the card has adequate space, the tables will be allocated and the CR5000 will start storing data to them. If there is no card or if there is not enough space, the CR5000 will warn that the card is not being used and will run the program, storing the data in SRAM only. When a card with enough available memory is inserted the CR5000 will create the data tables on the card and store the data that is accumulated in SRAM (Section 2.3.4). Data stored on cards can be retrieved through the communication link to the CR5000 or by removing the card and inserting it in a PC card slot in a computer. The PCMCIA interface is much faster than the communication link. With large files transferring the PC card is faster than collecting the data over the link. The CR5000 uses an MS DOS format for the PC cards. Cards can be formatted in a PC or in the CR5000. 2.2 Internal Data Format TABLE 2.2-1 CR5000 DATA TYPES Data Type LONG IEEE4 FP2 Size 4 bytes 4 bytes 2 bytes Range -2,147,483,648 to +2,147,483,647 1.8 E -38 to 1.7 E 38 -7999 to +7999 Resolution 1 bit (1) 24 bits (about 7 digits) 13 bits (about 4 digits) Data are stored internally in a binary format. Variables and calculations are performed internally in IEEE 4 byte floating point with some operations calculated in double precision. There are two data types used to store data: IEEE4 four byte floating point and Campbell Scientific two byte floating point (FP2). The data format is selected in the instruction that outputs the data. Within the CR5000, time is stored as integer seconds and nanoseconds into the second since midnight, the start of 1990. While IEEE 4 byte floating point is used for variables and internal calculations, FP2 is adequate for most stored data. Campbell Scientific 2 byte floating point provides 3 or 4 significant digits of resolution, and requires half the memory space as IEEE 4 byte floating point (2 bytes per value vs 4). TABLE 2.2-2. Resolution and Range Limits of FP2 Data Zero 0.000 Minimum Magnitude ±0.001 Maximum Magnitude ±7999. The resolution of FP2 is reduced to 3 significant digits when the first (left most) digit is 8 or greater (Table 2.2-2). Thus, it may be necessary to use IEEE4 output or an offset to maintain the desired resolution of a measurement. For example, if water level is to be measured and output to the nearest 0.01 foot, the level must be less than 80 feet for low resolution output to display the 0.01 foot increment. If the water level is expected to range from 50 to 90 feet the data could either be output in high resolution or could be offset by 20 feet (transforming the range to 30 to 70 feet). 2-2

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238

Section 2.
Data Storage and Retrieval
2-2
When a new program is compiled that sends data to the PC card, the CR5000
checks if a card is present and if
the card has adequate space for the data
tables.
If the card has adequate space, the tables will be allocated and the
CR5000 will start storing data to them.
If there is no card or if there is not
enough space, the CR5000 will warn that the card is not being used and will
run the program, storing the data in SRAM only.
When a card with enough
available memory is inserted the CR5000 will create the data tables on the card
and store the data that is accumulated in SRAM (Section 2.3.4).
Data stored on cards can be retrieved through the communication link to the
CR5000 or by removing the card and inserting it in a PC card slot in a
computer.
The PCMCIA interface is much faster than the communication link.
With large files transferring the PC card is faster than collecting the data over
the link.
The CR5000 uses an MS DOS format for the PC cards.
Cards can be
formatted in a PC or in the CR5000.
2.2
Internal Data Format
TABLE 2.2-1
CR5000 DATA TYPES
Data Type
Size
Range
Resolution
LONG
4 bytes
-2,147,483,648 to +2,147,483,647
1 bit (1)
IEEE4
4 bytes
1.8 E -38 to 1.7 E 38
24 bits (about 7 digits)
FP2
2 bytes
-7999 to +7999
13 bits (about 4 digits)
Data are stored internally in a binary format.
Variables and calculations are
performed internally in IEEE 4 byte floating point with some operations
calculated in double precision. There are two data types used to store data:
IEEE4 four byte floating point and Campbell Scientific two byte floating point
(FP2). The data format is selected in the instruction that outputs the data.
Within the CR5000, time is stored as integer seconds and nanoseconds into the
second since midnight, the start of 1990.
While IEEE 4 byte floating point is
used for variables and internal calculations,
FP2 is adequate for most stored
data.
Campbell Scientific 2 byte floating point provides 3 or 4 significant
digits of resolution, and requires half the memory space as IEEE 4 byte
floating point (2 bytes per value vs 4).
TABLE 2.2-2.
Resolution and Range Limits of FP2 Data
Zero
Minimum Magnitude
Maximum Magnitude
0.000
±
0.001
±
7999.
The resolution of FP2 is reduced to 3 significant digits when the first (left
most) digit is 8 or greater (Table 2.2-2).
Thus, it may be necessary to use
IEEE4 output or an offset to maintain the desired resolution of a measurement.
For example, if water level is to be measured and output to the nearest 0.01
foot, the level must be less than 80 feet for low resolution output to display the
0.01 foot increment.
If the water level is expected to range from 50 to 90 feet
the data could either be output in high resolution or could be offset by 20 feet
(transforming the range to 30 to 70 feet).