Rice Lake 920i Installation Manual V1.05 User Manual

Page 84

Advertising
background image

80

920i

Installation Manual

DB.ALIAS

The

DB.ALIAS

command is used to get or set the alias

used by

iRite

programs to reference the speciÞed

database. Each database alias must be unique among
all databases and adhere to the following rules: 8
character maximum; must begin with an alpha
character or an underscore; can only contain AÐZ, aРz,
0Р9, or an underscore (_).

Example.

The following command assigns an alias of

TRUCKS_2 to the Þrst database on the memory card
installed in slot 2:

DB.ALIAS.1#2=TRUCKS_2<CR>

Sending the

DB.ALIAS

command alone, without

assigned data, returns the current database alias.

DB.CLEAR

To clear the contents of a database, send the following
command:

DB.CLEAR.n#x<CR>

Where:

n

is the database number within the memory card

x

is the slot number of the memory card (0 is the

onboard memory)

The

920i

responds with

OK<CR>

if the command is

successful,

??<CR>

if unsuccessful.

DB.DATA

The

DB.DATA

command can be used to send data to or

retrieve data from the

920i

.

Data can be sent to the indicator using the following
command:

DB.DATA.n#x = data{ | }<CR>

Where:

n

is the database number within the memory card

x

is the slot number of the memory card (0 is the

onboard memory)

data

represents a single cell of a row of data

{ | }

is a pipe character (ASCII 124), used to

delimit cell data. If the data being sent is not the
last cell of the row, append the pipe character to
the data to indicate that more data is coming for
that particular row. If the data being sent is the last
cell of the row, do not append the pipe character.

If the command is accepted, the

920i

responds with

OK<CR>

; if not, it responds with

??<CR>.

Example.

The following commands place the data

shown in Table 9-13 into the Þrst database in the
onboard memory:

DB.DATA.1#0=this|<CR>
DB.DATA.1#0=is|<CR>
DB.DATA.1#0=a|<CR>
DB.DATA.1#0=test<CR>

DB.DATA.1#0=aaa|<CR>
DB.DATA.1#0=bbb|<CR>
DB.DATA.1#0=ccc|<CR>
DB.DATA.1#0=ddd<CR>

Sending the

DB.DATA

command alone, without

assigned data, returns the database contents:

DB.DATA.n#x<CR>

The

920i

responds with the entire contents of the

database. Returned data is cell-delimited with the pipe
character (ASCII 124) and row-delimited with
carriage returns (ASCII 13).

For example, the following command could be used to
return the contents of database 1 in the onboard
memory:

DB.DATA.1#0<CR>

If the database contents are the records shown in
Table 9-13, 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. This
time-out should 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.

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.

Record

Cell

1

2

3

4

first

this

is

a

test

second

aaa

bbb

ccc

ddd

Table 9-13. Sample Database Contents

Advertising