BioMax2 / KBio2-Online
Installation and Programming Manual
www.kimaldi.com Page 46 of 91
9. Communications Protocol
The communications protocol with the BioMax2 / KBio2-Online electronics consists of
two aspects:
• Frame format
• Instructions (OpCode + Arguments) and events.
Communications between the BioMax2 / KBio2-Online electronics and the Host can be
via several communication channels and, in fact, the communications protocol will differ
in each case. ActiveX Kimaldi Bio-OCX (PrKBIOMAXctl) controls can be used, which
encapsulate all the details of the protocol and instructions.
If, however, KSP (see Subsection 6.2.4.) is used or your own serial frames are generated,
bear in mind the frame format and instructions detailed in the following sections.
9.1. Bio-OCX RS-232 or TCP/IP frame format
If the serial port, the TCP/IP socket or an external converter (e.g. RS232-WiFi) is used,
the frames should be in the following format:
<STX><OPC><NA><ARG><CRC><ETX>
Where:
<STX>: [ 1 byte ] Indicates the start of the frame. It is the ASCII char-
acter 0x02.
<OPC>: [ 2 char ] This parameter indicates the meaning of the frame
and enables you to interpret the data it contains. It is a byte
value expressed by two hexadecimal ASCII characters (rang-
ing from '0' to '9' or from 'A' to 'F'), representing a hexadeci-
mal two-digit value.
<NA>: [ 4 char: ] This parameter indicates the number of bytes
encoded in the data field. It is a 16 bit value expressed by four
hexadecimal characters representing a hexadecimal four-digit
value.
<ARG>: [ 2 x NA char ] This contains the frame information. This
field will be made up of <NA> pairs of hexadecimal ASCII
characters representing each of the <NA> information bytes.
<CRC>: [ 2 char ] This field contains a byte value resulting from add-
ing all the ASCII values from the frame in module 255 except
for <STX>, <CRC> and <ETX>. Expressed by two hexadec-
imal ASCII characters.
<ETX>: [ 1 byte] This indicates the end of the frame. It is the ASCII