Campbell Scientific CR6 CR6 Measurement and Control System - Page 140
CRBasic Example 8., Data Type Declarations
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 140 highlights
Section 7. Installation Table 20. Data Types in Final-Data Memory Name Argument Description Word Size (Bytes) Notes See Bool8 Data Type (p. 198). Resolution / Range NSEC NSEC Time stamp Divided up as four bytes of seconds since 1990 and four bytes of 8 nanoseconds into the second. Used to 1 nanosecond record and process time data. See NSEC Data Type (p. 202). String String ASCII string Minimum: 3 (4 with null terminator) Default: 24 Maximum: limited only to the size of available CR6 memory. Caution - when using a very long string in a variables declared as Public, the operations of datalogger support software (p. 604) will frequently transmit the entire string over the communication link. If communication bandwidth is limited, or if communication is paid for by they byte, declaring the variable as Dim may be preferred. String size is defined by the CR6 operating system and CRBasic program. When converting from STRING to FLOAT, numerics at the beginning of a string convert, but conversion stops when a non-numeric is encountered. If the string begins with a non-numeric, the FLOAT will be NAN. If the string contains multiple numeric values separated by nonnumeric characters, the SplitStr() instruction can be used to parse out the numeric values. See the sections String Operations (p. 284) and Serial I/O (p. 248).. Unless declared otherwise, string size is 24 bytes or characters. String size is allocated in multiples of four bytes; for example, String * 25, String * 26, String * 27, and String * 28 allocate 28 bytes (27 usable). Minimum string size is 4 (3 usable). See CRBasic Editor Help for more information. Maximum length is limited only by available CR6 memory. CRBasic Example 8. Data Type Declarations ' various data type declarations. 'Data type declarations associated with any one variable occur twice: first in a Public 'or Dim statement, then in a DataTable/EndTable segment. If not otherwise specified, data 'types default to floating point: As Float in Public or Dim declarations, FP2 in data 'table declarations. 'Float Variable Examples Public Z Public X As Float 'Long Variable Example Public CR6Time As Long Public PosCounter As Long Public PosNegCounter As Long 140