MORECHEMISTRY.COM::MORE CHEMISTRY ON THE WEB    
Home Member Area Links Events Publications Promotions
 

LabVIEW drivers - Bronkhorst FLOW-BUS protocol


The FLOWBUS protocol explained

Understanding a protocol isn't allways easy. The FLOWBUS (or FLOW-BUS) surely is such a protocol.

Principle

The principle of the FLOWBUS protocol is quite easy:

  • start communication
  • write setpoints/read process values
  • stop communication

The underlaying communication principle is even simpler:

  • send a control command
  • read the response (if any)

Any command or response has the following structure:

length node message
total message length node address of destination (in commands)
node address of source (in responses)
coded message

The actual command string depends on the chosen protocol:

RS232 ASCII protocol

All elements in the abovementioned structure are bytes coded as 2 ASCII character representing the hexadecimal value of the byte, e.g. a byte value of 148, which is 0x94, would convert to '94'. This implies the real length is allways twice the number of bytes occupied by the node address and the coded message.

All commands and responses are preceeded by ':' and terminated by '[CR][LF]'.

Enhanced binary protocol

All commands and responses are preceeded by '[DLE][STX]' and a byte representing the "message sequence number". All commands and responses are terminated by '[DLE][ETX]'.

Any data byte that contains 0x10, or rather [DLE], must be followed by an additional 0x10 to distinguish it from the [DLE] at the start of a message.

Control commands

Although the principle communication is quite simple the actual command structure is quite complex. This section explains some of the commands which are given in the instruction manual 'RS232 interface with FLOW-BUS protocol for digital multibus Mass Flow / Pressure instruments' (doc. 9.17.027Q).

These are the control commands for RS232 communication, using the RS232 ASCII protocol, required to write controller setpoints and to read process values.

N.B. All commands are followed by a carriage return and linefeed character.

Each command starts with the node address. For actual devices the node address may range from 3 to 127. Addresses 0 and 1 are for the interface.

The actual message starts with a communication command. There are 10 different communication commands of which the most common ones, "status message" (0x00), "send parameter" (0x01 or 0x02) and "request parameter" (0x04) will be used in the following examples.

What follows after the communication command depends on the actual command and whether commands are chained or not. The technique of chaining commands will not be explained in the following examples and hence all samples are for non chained commands.

The bytes that follow the communication command can be a single value or can be a constructed value from 2 or 3 contributing values, e.g. chained?, data type and data value. The actual device parameters are divided into processes, each with a number of values. The data type of the values depends on the parameter and can be one of the following: Character (or Byte) (U8), Integer (U16), Long (U32), Float (SGL) or String (STR).

 

#### Initialisation RS232 interface

SEND - RECEIVE - COMMENT : 05 00 01 00 0A 49 : 04 00 00 00 xx Init (0x49='I') instruction for node 0 process 0 : 05 00 01 00 01 01 : 04 00 00 00 xx PNA (Primary Node Address) = 1 : 05 00 01 00 02 7F : 04 00 00 00 xx SNA (Secondary Node Address) = 127 (0x7F) : 05 00 01 00 03 02 : 04 00 00 00 xx NNA (Next Node Address) = 1 : 05 00 01 00 04 20 : 04 00 00 00 xx LNA (Last Node Address) = 32 (0x20); last expected node address : 05 00 01 00 05 02 : 04 00 00 00 xx BM (Bus Master) = 2 (default) or = 1 (temporary) : 05 00 01 00 0A 52 : 04 00 00 00 xx Reset (0x52='R') instruction for module # explanation of the SEND messages : 05 00 01 00 aa bb : Start character 05 Length (':', length byte and '[CR][LF]' not included) 01 Node address 01 Communication command: Send parameter 00 Process number aa Initialisation step bb Parameter value Initialisation is required for FLOW-BUS/RS232 interfaces without switch and LED's only.
#### Write setpoint to node 3, process 1
SEND - RECEIVE - COMMENT : 06 03 01 01 21 hh ll : 04 03 00 00 05 hh=high byte, ll=low byte # explanation of the SEND message : 06 03 01 01 21 hh ll : Start character 06 Length (':', length byte and '[CR][LF]' not included) 03 Node address (0x03) 01 Communication command: write parameter with status response 01 Not chained (0x00) and process number (0x01) 21 Type (0x20: integer) and parameter index (0x01 setpoint) hh high byte (e.g. hh=3E ll=80 representing 32000) ll low byte #explanation of the abovementioned RECEIVE message : 04 03 00 00 05 : Start character 04 Length (':', length byte and '[CR][LF]' not included) 03 Node address 00 Communication command: status 00 Status OK 05 Status OK - pointer to implied byte of the calling command #### Read flow from node 3, process 0, parameter 0
SEND - RECEIVE - COMMENT : 06 03 04 01 20 01 20 : 06 03 02 01 20 hh ll hh=high byte, ll=low byte # explanation of the SEND message : 06 03 04 01 20 01 20 : Start character 06 Length (':', length byte and '[CR][LF]' not included) 03 Node address (0x03) 04 Communication command: ask for parameter 01 Not chained (0x00) and process number (0x01) 20 Type (0x20: integer) and parameter index (0..31 or FBnr) 01 Process number (0x01) 20 Type (0x20: integer) and parameter number (0x00: (FBnr 0) process value) #explanation of the abovementioned RECEIVE message : 06 03 02 01 20 hh ll : Start character 06 Length (':', length byte and '[CR][LF]' not included) 03 Node address 02 Communication command: write parameter 01 Not chained (0x00) and process number (0x01) 20 Not chained (0x00) and parameter index (0x01) hh high byte (e.g. hh=3E ll=80 representing 32000) ll low byte
#### Stop communication on RS232 interface SEND - RECEIVE - COMMENT : 05 01 01 00 11 01 (nothing) Close communication instruction # explanation of this message : Start character 05 Length (':', length byte and '[CR][LF]' not included) 01 Node address 01 Communication command: Send parameter 00 Process number 11 ? 01 ?

Comment

The instruction manuals provided by Bronkhorst (doc. 9.17.027Q and doc. 9.17.023V) are quite complete. Some information is either unavailable (e.g. list of init/reset codes) or obscured (e.g. process 1 is not explicitely named in the parameter properties table).

Therefore any driver based solely on these manuals is somewhat incomplete.

See also


Bart Boshuizen, 2012/08/21


© copyright 2000-2014, morechemistry.com
design by Bb.