![Instrumentation Systems & Services MicroSpeed 196 Скачать руководство пользователя страница 15](http://html1.mh-extra.com/html/instrumentation-systems-and-services/microspeed-196/microspeed-196_user-manual_2070190015.webp)
COMMUNICATION PROTOCOL:
The communication protocol is a 13-character command format. Each character has one
start bit, eight data bits, one stop bit, and no parity. The host sends messages in this
format and the addressed MicroSpeed 196 responds in the identical format. The time
from the end of the host message to the beginning of the MicroSpeed 196 message can
vary from 10 to 30 milliseconds, depending on the type of the host message. The
following diagram shows the command format.
0 1 2 3 4 5 6 7 8 9 10 11 12
stx device node node mess var# var# data data data data dec. etx
type addr addr type 10's 1's 1000's100's 10's 1's pt.
10’s 1’s
loc.
Char # Description
ASCII
Value Typical Keyboard
0
stx (start of transmission)
1
device type
2
node address (10’s digit)
30-39
3
node address (1’s digit)
4
message type
5
variable (10’s digit)
6
variable (1’s digit)
7
data (1000’s digit)
8
data (100’s digit)
9
data (10’s digit)
10
data (1’s digit)
11 decimal point location
12 etx (end of transmission)
02
03
30-39
30-33
30-39
30-39
30-39
30-39
30-39
30-39
30-34
03
hex ctrl-B
hex 0
hex 0-9
hex 0-9
hex 0-3
hex 0-9
hex 0-9
hex 0-9
hex 0-9
hex 0-9
hex 0-9
hex 0-4
hex ctrl-C
DESCRIPTION OF CHARACTERS:
Character 0 - stx -
This character is used to indicate the start of a message. The
MicroSpeed 196 uses this character to open a new segment in the receive buffer.
Character 1 - Device Type -
Always a 0 for the MicroSpeed 196.
Character 2 and 3 - Node Address (10’s and 1’s digits) -
Used to select an
individual MicroSpeed 196 on the communications link. Corresponds to Variable 19 on
the MicroSpeed 196. Character 2 is the 10's location and character 3 is the l’s location. A
node address of 00 is a
Global Command
. All MicroSpeed 196 units are affected
by a global command, but only address 01 will return a response to the host.
Character 4 - Message Type -
Tells what kind of message is being sent. This is also
the location at which the MicroSpeed 196 will indicate an error in a host communication.
Valid characters from the host are 0 (command), 1 (read variable), or 2 (write variable).
The MicroSpeed 196 will echo the host in this character location unless the host
communication message has an error; if this occurs, it will send back a 3 (error).
27
Characters 5 and 6 - Variable Number (10’s and 1’s digits) -
These are
variable number specifiers during read and write messages. In command messages, the
Character 6 (l’s) location specifies the type of command (start, stop, etc). In an error
response from the MicroSpeed 196, the error type is specified in Character 6.
Characters 7-10 - Data Field
-These characters hold the data being passed between
the host and the MicroSpeed 196. Ch#7 = 1000’s, Ch#8 = 100’s, Ch#9 = l0’s,
Ch#l1 = 1’s.
Character 1 1- Decimal Location -
This specifies the location of the decimal point
in the data field.
Value Entered Decimal Location
0 X . X X X
1 X X . X X
2 X X X . X
3 X X X X .
4 XXXX (no decimal point)
Character 12 - etx -
This character signifies the end of the message transmission.
USING THE SERIAL PROTOCOL:
Global Messages -
The global message is given using the
Node Address 00.
Only
Node 01
will return a response, but all Microspeed 196 units will act on the message.
Note: Global Read commands are not allowed and will prompt Node
01
to respond
with an error message.
Read a Variable - 1 -
Select the Node Address (you cannot do a global read). Enter
the message type as 1 (Ch#4). Enter the variable you wish to read into Characters 5 and
filled.
6. The MicroSpeed 196 will mirror the message string with the data and decimal field
Example:
Read Node 1, Variable 01, when Variable 01 = 1800
Message Sent - s t x 0 0 l l 0 l 0 0 0 0 0 e t x
Message Returned - stx00ll0l18004etx
Write to a Variable - 2 -
Used just like a read, only the message type is 2, and you
must fill the data field and decimal locator. A global write command is allowed.
Example:
Write Node 27, Variable 02, the Data 15.00
Message Sent - stx02720215001etx
Message Returned - stx02720215001etx
Command Messages - 0 -
There are 9 different command messages that can be sent
to the MicroSpeed 196. Enter the 0 as the message type (ch# 4) and the command type
(O-8) is entered into the character 6 location var# l’s).
28
Содержание MicroSpeed 196
Страница 1: ...MSMAN32C MicroSpeed 196...
Страница 19: ......