beautypg.com

Communications protocol, 3 communications protocol – West Control Solutions N8100 User Manual

Page 28

background image

3.2.3

Communications Protocol

The protocol assumes half duplex communications. All communication is initiated

by the master device. The master sends a command or query to the addressed

slave and the slave replies with an acknowledgement of the command or the

reply to the query. All messages, in either direction, comprise:

(a) A Start of Message character

(b) One or two address characters (uniquely defining the slave)

(c) A parameter/data character string

(d) An End of Message character

Messages from the master device may be one of four types:

Type 1:

L {N} ? ? *

Type 2:

L {N} {P} {C} *

Type 3:

L {N} {P} # {DATA} *

Type 4:

L {N} {P} I *

where all characters are in ASCII code and:

L

is the Start of Message

character (Hex 4C)

{N}

is the slave Controller

address (in the range 1 -

32); addresses 1 - 9 may be

represented by a single digit

(e.g. 7) or in two-digit form,

the first digit being zero (e.g.

07).

{P}

is a character which identifies the parameter to be

interrogated/modified.

{C}

is the command (see below)

#

indicates that {DATA} is to follow (Hex 23)

{DATA}

is a string of numerical data in ASCII code (see Table 3-1)

*

is the End of Message character (Hex 2A)

No space characters are permitted in messages. Any syntax errors in a received

message will cause the slave controller to issue no reply and await the Start of

Message character.

3-2

O054-3

59125

{DATA} Content

Sign/Decimal Point

abcd0

+abcd

abcd1

+abc.d

abcd2

+ab.cd

abcd3

+a.bcd

abcd5

-abcd

abcd6

-abc.d

abcd7

-ab.cd

abcd8

-a.bcd

Table 3-1 {DATA} Element - Sign

and Decimal Point

This manual is related to the following products: