Microlab 300 Host Protocol v1 0
Microlab 300 Host Protocol v1 0
Microlab 300 Host Protocol v1 0
Host communication
Microlab 300 series
Document version: v1.0
TABLE OF CONTENTS
1 Introduction ........................................................................................... 3
1.1 Purpose .......................................................................................................................................... 3
1.2 Scope ............................................................................................................................................. 3
1.3 Definitions, acronyms and abbreviations ....................................................................................... 3
1.4 References ..................................................................................................................................... 3
1.5 Overview ........................................................................................................................................ 3
4 Messages............................................................................................... 7
4.1 Message components .................................................................................................................... 7
4.2 Connect message .......................................................................................................................... 7
4.3 Send Result.................................................................................................................................... 8
1 Introduction
1.1 Purpose
This document defines the interface between a Laboratory Information System (LIS) and a Microlab 300
series instrument. The LIS is in this document referred to as ‘Host’.
1.2 Scope
The scope of this document is limited to defining the external interface of the Microlab 300.
Definition Description
1.4 References
[1]
1.5 Overview
Chapter 2 defines the low-level interface between analyser and Host.
Chapter 3 defines the format of the low-level packets transmitted between analyser and Host.
Chapter 4 defines the format of the individual messages that can be transmitted between PC and Host.
2 Hardware interfaces
Only TX and RX are used to transfer data. There will be no hardware handshaking.
Communication is fixed at 9600 baud, 8 databits, no parity, 1 stopbit (8-N-1).
Warning:
The XON-XOFF protocol (which can be set by Windows) must NOT be used, because this can interfere with
the protocol.
3 Data handling
3.1 General
Messages are transmitted in packets. Each packet starts with a header byte (FFh) followed by packet
information data. A packet is concluded with a checksum.
Every packet received correctly must be acknowledged by sending an acknowledge (ACK) packet. If a
packet is recevied incorrectly (ie, checksum incorrect) it must be responded to by sending a NAK packet.
The analyser also transmits ‘heartbeat’ packets. These must be responded to by sending a ‘heartbeat
acknowledge’ packet. If the analyser does not receive any response to its heartbeat requests, it concludes
that the host connection is no longer available.
FFh = Header
Length = The number of bytes in this packet, not including header and length bytes (=N-2).
Type and ID = Byte indicating type of message and ID.
Bit 7 6 5 4 3 2 1 0
Type ID
The ID is a modulo 32 number identifying a data packet. In case of ACK or NAK the ID field
is set to 0.
Block marker = A message may be split into blocks over multiple packets, since a packet can only hold
messages up to 252 bytes large. Bits 0 and 1 of this byte are used to identify if it is a first,
intermediate or last packet of a message. All unused bits should be set to 0.
Bit 1 0
0 0 Intermediate packet
0 1 First packet of a message
1 0 Last packet of a message
1 1 First and last packet of a message
Checksum = A module 256 addition of all packet bytes following the header byte until the checksum byte,
substracted from 256. Therefore, the module 256 sum of all bytes following the header,
including the checksum byte must be zero.
4 Messages
This section describes the messages that are sent from the analyser to the host or received by the analyser
from the host.
All texts are transmitted in unicode UTF-16. Each character is represented by a two byte value with the most
significant byte first.
Byte 1 2 3 4 5 6 7
Contents Length MSB LSB MSB LSB MSB LSB
Example 3 00h 4Ah 00h 56h 00h 39h
‘J’ ‘V’ ‘9’
Note: Length can also be 0.
Integer values are transmitted as 2 byte (16 bit) or 4 byte (32 bit) values, most significant byte comes first.
Integer values can be signed (Int16 or Int32) or unsigned (UInt16 or UInt32).
Byte 1 2 3 4
Contents MSB LSB
Example 00h 02h 68h A6h
000268A6h
=
157862
Example:
Transmitted: #FF#04#00#03#0A#EF (connect message)
Received: #FF#02#20#DE (acknowledge)
Example:
Transmitted: #FF#2F#00#03#04#06#00#33#00#2D#00#31#00#30#00#39#00#38#03#02#00
#4A#00#56#00#02#00#31#00#34#00#00#00#03#00#00#00#00#04#00#6E#00
#6F#00#6E#00#65#00#CF