beautypg.com

C.4 commands to transfer program with computer, Commands to transfer program with computer – Campbell Scientific CR10X Measurement and Control System User Manual

Page 254

background image

APPENDIX C. BINARY TELECOMMUNICATIONS

C-6

SIGNATURE ALGORITHM

• S1,S0 - represent the high and low bytes of

the signature, respectively

• M - represents a transmitted data byte

• n - represents the existing byte

• n+1 - represents the new byte

• T - represents a temporary location

• C - represents the carry bit from a shift

operation

1.

The signature is initialized with both bytes
set to hexadecimal AA.

S

1

(n) = S

0

(n) = AA

2.

When a transmitted byte, M(n+1), is
received, form a new high signature byte by
setting it equal to the existing low byte.
Save the old high byte for later use.

T

1

= S

1

(n)

S

1

(n+1) = S

0

(n)

3.

Form a temporary byte by shifting the old
low signature byte one bit to the left and
adding any carry bit which results from the
shift operation. A "shift left" is identical to a
multiply by 2. Ignore any carry bit resulting
from the add.

T

2

= shift left (S

0

(n)) + carry

4.

Form the new low signature byte by adding
the results of operation 3 to the old high
signature byte and the transmitted byte.
Ignore any carry bits resulting from these
add operations.

S

0

(n+1) = T

2

+ S

1

(n) + M(n+1)

As each new transmitted byte is received, the
procedure is repeated.

C.4

D

COMMANDS TO TRANSFER

PROGRAM WITH COMPUTER

D

Commands 1 and 2 (when entered from

the Keyboard/Display) and 7 have an additional 2
digit option parameters (7 is entered with the
Storage Module address, e.g., 71). The CR10X

will display the command number and prompt for
the option. If the keyboard display is not being
used, the CR10X will have already set the baud
rate to that of the device it is communicating with
and will be ready to send or receive the file as
soon as command 1 or 2 is entered.

TABLE C.4-1.

D

Command 1 and 2

Options

Command

Option Code Description

1 & 2

1x

Synchronously addressed

4x

Hardware enabled

x = Baud Rate Codes
0 - 300

1 - 1200

2 - 9600

3 - 76,800

After the option code is keyed in, key "A" to
execute the command. Command 2 will be
aborted if no data is received within 40 seconds.

WHEN COMMAND 2 IS EXECUTED ALL
DATA IN INPUT AND INTERMEDIATE
STORAGE ARE ERASED. This section
describes commands 1 and 2.

SENDING ASCII PROGRAM INFORMATION

Program listings are sent in ASCII. At the end
of the listing, the CR10X sends control E (5 hex
or decimal) twice.

Table 1.8-4 is an example of the program listing
sent in response to command. Note that the
listing uses numbers for each mode: The
numbers for

A

,

B

, and

C

modes are 10, 11, and 12, respectively.