Campbell Scientific CR6 CR6 Measurement and Control System - Page 139

Table 20., Data Types in Final-Data Memory

Page 139 highlights

Section 7. Installation Table 20. Data Types in Final-Data Memory Name Argument Description Word Size (Bytes) Notes Resolution / Range Zero Minimum Maximum 0.000 ±0.001 ±7999. FP2 FP2 Campbell Scientific floating point Default final-memory data type. Use FP2 for stored data requiring 3 or 4 Absolute Value Decimal Location 2 significant digits. If more significant digits are needed, use IEEE4 or an 0 - 7.999 X.XXX offset. 8 - 79.99 XX.XX 80 - 799.9 XXX.X 800 - 7999. XXXX. IEEE4 IEEE4 or Float IEEE floating point 4 IEEE Standard 754 ±1.4E-45 to ±3.4E38 Long Long Signed integer Use to store count data in the range of ±2,147,483,648 Speed: integer math is faster than floating point math. Resolution: 32 bits. Compare to 24 4 bits in IEEE4. -2,147,483,648 to +2,147,483,647 Suitable for storing whole numbers, counting number, and integers in final-data memory. If storing nonintegers, the fractional portion of the value is lost. UINT2 UINT2 Unsigned integer Use to store positive count data ≤ +65535. Use to store port or flag status. See CRBasic example Load binary 2 information into a variable (p. 130). 0 to 65535 When Public FLOATs convert to UINT2 at final data storage, values outside the range 0 - 65535 yield unusable data. INF converts to 65535. NAN converts to 0. UINT4 UINT4 Unsigned integer Use to store positive count data ≤ 2147483647. Other uses include storage of long ID 4 numbers (such as are read from a bar 0 to 2147483647 reader), serial numbers, or address. May also be required for use in some Modbus devices. Boolean Boolean Signed integer Use to store true or false states, such as states of flags and control ports. 0 is always false. -1 is always true. 4 Depending on the application, any other number may be interpreted as true or false. See the section True = - True = -1 or any number ≥ 1 False = any number ≥ 0 and < 1 1, False = 0 (p. 164). To save memory, consider using UINT2 or BOOL8. Bool8 Bool8 Integer 8 bits (0 or 1) of information. Uses 1 less space than 32-bit BOOLEAN. True = 1, False = 0 Holding the same information in BOOLEAN will require 256 bits. 139

  • 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
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • 368
  • 369
  • 370
  • 371
  • 372
  • 373
  • 374
  • 375
  • 376
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • 387
  • 388
  • 389
  • 390
  • 391
  • 392
  • 393
  • 394
  • 395
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 418
  • 419
  • 420
  • 421
  • 422
  • 423
  • 424
  • 425
  • 426
  • 427
  • 428
  • 429
  • 430
  • 431
  • 432
  • 433
  • 434
  • 435
  • 436
  • 437
  • 438
  • 439
  • 440
  • 441
  • 442
  • 443
  • 444
  • 445
  • 446
  • 447
  • 448
  • 449
  • 450
  • 451
  • 452
  • 453
  • 454
  • 455
  • 456
  • 457
  • 458
  • 459
  • 460
  • 461
  • 462
  • 463
  • 464
  • 465
  • 466
  • 467
  • 468
  • 469
  • 470
  • 471
  • 472
  • 473
  • 474
  • 475
  • 476
  • 477
  • 478
  • 479
  • 480
  • 481
  • 482
  • 483
  • 484
  • 485
  • 486
  • 487
  • 488
  • 489
  • 490
  • 491
  • 492
  • 493
  • 494
  • 495
  • 496
  • 497
  • 498
  • 499
  • 500
  • 501
  • 502
  • 503
  • 504
  • 505
  • 506
  • 507
  • 508
  • 509
  • 510
  • 511
  • 512
  • 513
  • 514
  • 515
  • 516
  • 517
  • 518
  • 519
  • 520
  • 521
  • 522
  • 523
  • 524
  • 525
  • 526
  • 527
  • 528
  • 529
  • 530
  • 531
  • 532
  • 533
  • 534
  • 535
  • 536
  • 537
  • 538
  • 539
  • 540
  • 541
  • 542
  • 543
  • 544
  • 545
  • 546
  • 547
  • 548
  • 549
  • 550
  • 551
  • 552
  • 553
  • 554
  • 555
  • 556
  • 557
  • 558
  • 559
  • 560
  • 561
  • 562
  • 563
  • 564
  • 565
  • 566
  • 567
  • 568
  • 569
  • 570
  • 571
  • 572
  • 573
  • 574
  • 575
  • 576
  • 577
  • 578
  • 579
  • 580
  • 581
  • 582
  • 583
  • 584
  • 585
  • 586
  • 587
  • 588
  • 589
  • 590
  • 591
  • 592
  • 593
  • 594
  • 595
  • 596
  • 597
  • 598
  • 599
  • 600
  • 601
  • 602
  • 603
  • 604
  • 605
  • 606
  • 607
  • 608
  • 609
  • 610
  • 611
  • 612
  • 613
  • 614
  • 615
  • 616
  • 617
  • 618
  • 619
  • 620
  • 621
  • 622
  • 623
  • 624
  • 625
  • 626

Section 7.
Installation
Table 20.
Data Types in Final-Data Memory
Name
Argument
Description
Word Size
(Bytes)
Notes
Resolution / Range
FP2
FP2
Campbell Scientific
floating point
2
Default final-memory data type.
Use
FP2
for stored data requiring 3 or 4
significant digits.
If more significant
digits are needed, use
IEEE4
or an
offset.
Zero
Minimum
Maximum
0.000
±0.001
±7999.
Absolute
Value
Decimal Location
0 – 7.999
X.XXX
8 – 79.99
XX.XX
80 – 799.9
XXX.X
800 – 7999.
XXXX.
IEEE4
IEEE4
or
Float
IEEE floating point
4
IEEE Standard 754
±
1.4E–45 to
±
3.4E38
Long
Long
Signed integer
4
Use to store count data in the range of
±
2,147,483,648
Speed: integer math is faster than
floating point math.
Resolution: 32 bits.
Compare to 24
bits in IEEE4.
Suitable for storing whole numbers,
counting number, and integers in
final-data memory.
If storing non-
integers, the fractional portion of the
value is lost.
–2,147,483,648 to +2,147,483,647
UINT2
UINT2
Unsigned integer
2
Use to store positive count data ≤
+65535.
Use to store port or flag status.
See
CRBasic example
Load binary
information into a variable
(p. 130).
When
Public
FLOAT
s convert to
UINT2
at final data storage, values
outside the range 0 – 65535 yield
unusable data.
INF
converts to
65535
.
NAN
converts to 0.
0 to 65535
UINT4
UINT4
Unsigned integer
4
Use to store positive count data ≤
2147483647.
Other uses include storage of long ID
numbers (such as are read from a bar
reader), serial numbers, or address.
May also be required for use in some
Modbus devices.
0 to 2147483647
Boolean
Boolean
Signed integer
4
Use to store true or false states, such
as states of flags and control ports.
0
is always false.
–1 is always true.
Depending on the application, any
other number may be interpreted as
true or false.
See the section
True = -
1, False = 0
(p. 164).
To save
memory, consider using
UINT2
or
BOOL8
.
True = –
1 or any number ≥ 1
False = any number ≥ 0 and < 1
Bool8
Bool8
Integer
1
8 bits (0 or 1) of information.
Uses
less space than 32-bit BOOLEAN.
Holding the same information in
BOOLEAN will require 256 bits.
True = 1, False = 0
139