Rice Lake 920i Installation Manual V3.05 User Manual

Page 101

Advertising
background image

Serial Commands

95

If the database contents are the records shown in

Table 9-14, the indicator responds with the following

data, using pipe characters and carriage returns to

delimit the database cells and rows, respectively:

t h i s | i s | a | t e s t < C R > a a a | b b b | c c c | d d d < C R >

NOTE: There is no end of database notification at the end of
the

DB.DATA

command

transmission. Use a receive

time-out to determine command completion. The time-out
value will vary based on baud rate.

You should determine the number of records currently

in the database both prior to and after sending the

DB.DATA

command to verify that the correct number

of records are received. The number of records can be

determined with the

DB.SCHEMA

command.

NOTE: The 62K of onboard (slot 0) memory can be allocated
to up to eight auxiliary databases. However, the size of any
one database may limit the size and number of other
databases.

DB.SCHEMA

The

DB.SCHEMA

command is used to get or set the

structure of a database.

DB.SCHEMA.n#x<CR>

The

920i

responds to the command above by returning

the following:

<Max Records>,<Current Record Count>,
<Column Name>,<Data Type>,<Data Size>
,...<CR>

The

<Column Name>

,

<Data Type>

, and

<Data Size>

elements repeat for each column in the database.
The

<Column Name>

follows the rules for alias

names: 8 character maximum; must begin with an

alpha character or an underscore; can only contain

A–Z, a–z, 0–9, or an underscore (_).
The

<Data Type>

is represented by a numeric field:

The

<Data Size>

value must match the data type. A

range of data size values is allowed only for the

string data types:

The

DB.SCHEMA

command can also be used to modify

the schema, but only when the indicator is in setup

mode and only if the database does not contain any

data.

Value

Type

1

Byte

2

Short (16-bit integer)

3

Long (32-bit integer)

4

Single (32-bit floating point)

5

Double (64-bit floating point)

6

Fixed string

7

Variable string

8

Date and time

Table 9-15. Data Type Field Codes

Size

Value

Byte

1

Short

2

Long

4

Single

4

Double

8

Fixed string

1–255

Variable string

1–255

Date and time

8

Table 9-16. Data Size Field Codes

Advertising