MESIT Devices communication protocol

Description  
Communication line configuration
Communication station configuration
I/O tag configuration
Literature
Changes and modifications
Revisions of document

Description


MESIT Devices protocol is a binary protocol intended for communication with capacitive level sensor produced by MESIT. The current implementation supports reading its data space.

Communication line configuration


Communication line category: Serial, SerialOverUDP Device Redundant

Parameters of the asynchronous line according to design and type of connection of device:

  • standard settings from the manufacturer: 38400 Baud, 8 data bits, no parity, 1 stop bit

Communication station configuration


Communication protocol: MESIT Devices
The station address is a decimal number that is intended for addressing a device on a data bus with more SLAVE devices.


Station protocol parameters

Parameters may be entered in the dialog window of station configuration - Parameters tab. These parameters may be defined:

Table 1

Full nameDescriptionUnitDefault value
Full Debug
Received and sent data are recorded in the communication log.-YES
Master Address
A decimal number that identifies a sender (D2000 KOM).-1
Wait First Timeout
First waiting for a response after sending a request.Ms100
Wait Timeout
Waiting between individual readings of the response.Ms100
Retry Timeout
Waiting before repeating a request.Ms100
Max. Wait Retry
Maximum retries of reading response.-6
Retry Count
Maximum retries of sending a request.-2

I/O tag configuration


Allowed types of I/O tags: Ai, Ci, Di, TxtI, TxtO

I/O tag address consists of four parameters separated by a full stop. The format is: "M.R.O.L", where:

  • M - defines a number of the message (0-255)
  • R - defines the type of request (0-65535)
  • O - offset - a byte number (1, 2, etc.) in a received response where the first (lowest) byte is located
  • L - length of a request (in bytes) count that must be read from the received response. For numerical types of I/O tags, the values of parameter "L" can be only 1, 2, and 4. For text types of I/O tags, this parameter is limited by the maximum length of the data block of response.

All these parameters are entered as decimal numbers.

As an example, we may mention the reading of fuel temperature. It is read with the help of message number 0x0C and request type 0x50. In the response, this information is in two bytes that start with offset 0x09. It means, the address of I/O tag is "12.80.9.2".

Output I/O tag addressing

In addition to reading data, the protocol supports also the writing of values into device memory. It is performed with the help of text output I/O tags. The format of I/O tag address is M[.R][#Vh[.Vd]]

  • M - message number (0-255)
  • R - optional application type (0-65535)
  • Vh - optional message number of the reply to the sent message header (0-255). If a message with a message number other than Vh arrives in response, the writing will be considered unsuccessful. If Vh is not specified, each response is considered a positive confirmation.
  • Vd - optional message number of the reply to the sent message data (0-255). If a message with a message number other than Vd arrives in response, the writing will be considered unsuccessful. If Vd is not specified, each response is considered a positive acknowledgment.

Addresses of I/O tags for Capacitive level meter type LM1.2134:

Table 2

AddressI/O tag typeDescription
3.79.1.1CiBasic data - level meter status. The documentation states the following possible values:
  • 0 - Correct level meter function
  • 1 - Short-circuit in the tubes or water in the tank
  • 2 - Compensation sensor defect.
  • 3 - Mechanical defect on the tubes.
  • 4 - Permittivity out of limits. (outside the 2-4 interval)
  • 5 - Operating temperature exceeded. (outside the -40°C…80°C interval)
  • 6 - Compensation sensor position not preset. 
  • 7 - Analogue output error. 
  • 8 - Error of communication with slave probe 
  • 9 - Water presence. (between 3 and 60 seconds)
  • 10 - Water in the tank (over 60 seconds)
3.79.2.4AiBasic data - the volume of fuel in the tank. Linear conversion required A = 0.001, B = 0, the result is volume in liters.
3.79.6.4AiBasic data - relative permittivity. Linear conversion required A = 0.001, B = 0, the result is relative permittivity.
3.79.10.4AiBasic data - fuel temperature in °C.

3.105.1.2TxtI

Identification - text part of the serial number (two characters).

3.105.3.2Ci

Identification - numeric part of the serial number (2-byte value 0-65535).

3.105.5.9TxtI

Identification - 9-character product number (tested sample had "LM1.21345").

3.105.14.8TxtI

Identification - 8-character firmware version (tested sample had "LM1-2.50").


4.68
4.68#228
TxtO

Calibration - clear the current calibration curve by entering an empty value "".

4.83
4.83#235.233
TxtO

Calibration - write a new calibration curve. In the value of the I/O tag it is necessary to enter individual bytes in decimal form, which are separated by a "#" character.
A byte pair always represents one volume value as a 16-bit number (lower byte, higher byte). The first half of the values ​​corresponds to the real volume of fuel in the tank, the second half of the values ​​corresponds to the volume values ​​measured during calibration. Example:
writing  value "100#0#200#0#44#1#144#1#244#1#88#2#188#2#32#3#132#3#232#3#113#0#216#0#62#1#144#1#254#1#70#2#204#2#17#3#126#3#249#3"
means sending volumes of 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 113, 216, 318, 400, 510, 582, 716, 785, 894, 1017.
Of this, the first half of the values ​​are the amounts of fuel refueled in the tank:
100, 200, 300, 400, 500, 600, 700, 800, 900, 1000
and the other half are the values ​​measured by the level meter during calibration:
113, 216, 318, 400, 510, 582, 716, 785, 894, 1017
Note: the calibration is not in the official documentation of MESIT.


6
6#220
TxtO

Setting the time filter parameters. In the value of the I/O tag it is necessary to enter 2 bytes in decimal form, which are separated by a "#" character, in the form "Time#Type", e.g. "10#0", where:

  • Time - the size of the time filter window in seconds. The time filter works on the principle of a moving average. The allowed range is 1 - 120 seconds, a value of 1 means the filter is switched off.
  • Type - value 0 means that this is a normal filter. A value of 1 means that it is a working machine (e.g. an excavator) in which large level fluctuations can occur. In the case of a working machine, the filter hardening is switched on, which means counting the previous samples.

7
7#231
TxtO

Setting theft conditions. In the value of the I/O tag it is necessary to enter 6 bytes in decimal form, which are separated by the character "#", in the form "PeriodL#PeriodH#LossL#LossH#TimeL# TimeH", e.g. "60 # 0 # 1 # 0 # 10 # 0", where:

  • PeriodL, PeriodH - lower and higher byte of the fuel loss measurement period (in seconds). Allowed range is 10 - 64,799 seconds (i.e. 17:59:59)
  • LossL, LossH - lower and higher byte of the maximum allowed fuel loss (in liters), which is not yet theft. If the loss is higher, it is detected as theft.
  • TimeL, TimeH - lower and higher byte of the time of the state output closing time when theft is detected (in seconds). A value of 0 turns on the output permanently after the theft is detected. Allowed range is 0 - 64,799 seconds (i.e. 17:59:59)

9.70.1.1CiTime filter - time filter period (in seconds). The setting is possible within setting the time filter parameters.
9.70.2.1Di

Time filter - hardening of the time filter. A value of TRUE means that it is a working machine and that filter hardening is switched on. The setting is possible within setting the time filter parameters.


9.75.1.2Ci

Theft condition - fuel loss measurement period (in seconds). The setting is possible within the setting of theft conditions.

9.75.3.2CiTheft condition - the maximum allowable loss of fuel (in liters) for the period during which it is not yet theft. The setting is possible within the setting of theft conditions.
9.75.5.2Ci

Theft condition - the time of the length of switching on the status output when theft is detected (in seconds). The setting is possible within the setting of theft conditions.


12.78.1.2Ai

Accelerometer - the tilt of the X-axis. Linear conversion A=0.006, B=-180 is required, the result is an angle from the interval <-90°… 90°>.

12.78.3.2AiAccelerometer - the tilt of the Y-axis. Linear conversion A=0.006, B=-180 is required, the result is an angle from the interval <-90°… 90°>.
12.78.5.2AiAccelerometer - the tilt of the Z-axis. Linear conversion A=0.006, B=-180 is required, the result is an angle from the interval <-90°… 90°>.
12.78.7.2Ai

Accelerometer - acceleration of the X-axis. Linear conversion A=0.002, B=-8 is required, the result is acceleration in g from the interval <-8 … 8>.

12.78.9.2AiAccelerometer - acceleration of the Y-axis. Linear conversion A=0.002, B=-8 is required, the result is acceleration in g from the interval <-8 … 8>.
12.78.11.2AiAccelerometer - acceleration of the Z-axis. Linear conversion A=0.002, B=-8 is required, the result is acceleration in g from the interval <-8 … 8>.
12.78.13.2AiAccelerometer - X-axis calibration offset (deviation from the horizontal plane at the time of calibration). Linear conversion A=0.006, B=-180 is required, the result is an angle from the interval <-90°… 90°>.
12.78.15.2Ai

Accelerometer - Y-axis calibration offset (deviation from the horizontal plane at the time of calibration). Linear conversion A=0.006, B=-180 is required, the result is an angle from the interval <-90°… 90°>.

12.78.17.2Ai

Accelerometer - Z-axis calibration offset (deviation from the horizontal plane at the time of calibration). Linear conversion A=0.006, B=-180 is required, the result is an angle from the interval <-90°… 90°>.


12.80.1.2Ai

Fuel quality - bioindex. Linear conversion A=0.03125, B=0 is required, the result is a bioindex in % of the interval <0 … 100>.

12.80.3.2Ai

Fuel quality - viscosity. Linear conversion A=0.0003052, B=0 is required, the result is viscosity in mm2/s from the interval <0 … 20.00>.

12.80.5.2Ai

Fuel quality - density. Linear conversion A=0.0003052, B=0 is required, the result is density in kg/dm3 from the interval <0 … 20.00>.

12.80.7.2Ai

Fuel quality - relative permittivity. Linear conversion A=0.00012207031, B=0 is required, the result is relative permittivity from the interval <0 … 5.000>.

12.80.9.2Ai

Fuel quality - temperature. Linear conversion A=0.0003052, B=0 is required, the result is a temperature in °C from the interval <-55.0 … +125.0>.

12.80.11.4Ai

Fuel quality - volume at 15 ° C. Linear conversion A=0.001, B=0 is required, the result is the volume in liters adjusted to a temperature of 15 °C from the interval <0 … 10000.0>.

Literature


Changes and modifications


  • May 2015: completion of I/O tag configuration

Revision of document


  • Ver. 1.0 – December 3, 2014: implementation of a protocol
  • Ver. 1.1 - May 26, 2015: completion of I/O tag configuration
Napíšte komentár