EasyManuals Logo

Campbell CR1000 User Manual

Campbell CR1000
678 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #286 background imageLoading...
Page #286 background image
Section 7. Installation
but,
StringVar(3) still = "123<NULL>56789",
so,
StringVar(5) = StringVar(3,1,4+1)
'"56789"
StringVar(6) = StringVar(3) + 4 + StringVar(3,1,4+1)
'"123456789"
Some smart sensors send strings containing NULL characters. To manipulate a
string that has NULL characters within it (in addition to being terminated with
another NULL), use MoveBytes() instruction.
7.9.19.4 Inserting String Characters
Example:
Objective:
Use MoveBytes() to change "123456789" to "123A56789"
Given:
StringVar(7) = "123456789" 'Result is
"123456789"
try (does not work):
StringVar(7,1,4) = "A" 'Result is
"123A<NULL>56789"
Instead, use:
StringVar(7) = MoveBytes(Strings(7,1,4),0,"A",0,1) 'Result is
"123A56789"
7.9.19.5 Extracting String Characters
A specific character in the string can be accessed by using the "dimensional"
syntax; that is, when the third dimension of a string is specified, the third
dimension is the character position.
Table 49. Extracting String Characters
Expression Comments Result
StringVar(3) = "Go Jazz"
Loads string into variable
StringVar(3) = "Go Jazz"
StringVar(4) = StringVar(3,1,4)
Extracts single character
StringVar(4) = "J"
286

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Campbell CR1000 and is the answer not in the manual?

Campbell CR1000 Specifications

General IconGeneral
Power Requirements9.6 to 16 VDC
Data Logger Operating SystemCRBasic
Memory4 MB
Analog Inputs16 single-ended or 8 differential
Analog Input Resolution13 bits
Analog Input Range+/-2.5V
Digital I/O8
Pulse Counters2
Communication PortsRS-232
Operating Temperature-25°C to +50°C
Pulse Channels4

Related product manuals