Sokol-M1+Modbus

From Escort Knowledge Base
Sokol-M1 + Modbus

General information

When working with the Sokol-M1 station, data can be retrieved not only via GSM or a direct USB connection, but also by polling using third-party software and various RS-485 converters.

Below are instructions for configuring, connecting, and polling the station using an RS-485 interface converter, as well as for polling via Modbus.

Configuring the station for Modbus operation

To connect the meteo station for Modbus polling via a computer or third-party hardware/software using an RS-485 converter, you must configure the station itself.


Install the Sokol CFG configurator, as well as the system component and library files from Microsoft if necessary. The drivers can be found in the folder containing the Sokol CFG configurator or downloaded from this link. When these files are installed, a message should appear stating, “RuntimePack installed!”

You must also install the drivers to properly connect the station via USB and configure it.

Link to download drivers for the Sokol-M1 station


When you connect the USB cable from the station to the computer, the device should be recognized as "STMicroelectronics Virtual COM Port":

If the port is detected but marked with an exclamation point, either the device is out of power and there isn’t enough power for the COM port to function, or you need to switch USB ports and reconnect it several times. Do not connect the device via a USB hub.

Launch the Sokol Meteo Configurator, select the appropriate COM port, and click “Open Port.” Enter the password by clicking the “Enter Password” button. The default password is 222.


Next, select “Transmission Channel” as MB Only or GSM.

Important! In firmware version 1.3.5 and later, you must check the “Do not sleep” box.

Then click the “Set” button.


By default, the station is set to "1 network address." You can change or check this setting in the configurator under the "Server" tab.

Connecting the station. Power supply. Pinout.

Power supply

To ensure the station operates correctly via Modbus, verify the following connection points:

  • Station power supply. Be sure to turn the switch as follows: from the OFF position to ON, then back to OFF, and then to ON again. An external power supply must also be connected to the station

It is not possible to poll the station via Modbus without an external power source. Make sure the station is connected to an external power source.

Power supply pinout 8-25 VDC

Contact number Line Wire color
1 +12 brown
2 GND blue

Modbus station connection

Next, you need to connect the station to an RS-485 converter (such as the C200M2 or Bolid) via the station’s Modbus input. You can use any other RS-485 converter, provided you follow the pinout. The pinout for the station’s Modbus cable is as follows.

Modbus connector pinout:

Contact number Line Wire color
1 A yellow-green
2 B brown
3 GND blue

An alternative pinout is possible:

  • Orange - Line A;
  • White - Line B;
  • White-green - GND (ground)

Pinout and Connection of RS-485 Converters (C200M2)

To ensure the station operates correctly via the C200M2 or Bolid RS-485 converter, you must verify that the wires are connected correctly and that the pinout is correct. You must also install the correct drivers so that the converters are recognized by the computer system.


Drivers for the C200M2 Converter

Once the drivers have been installed correctly, the converter will appear in Device Manager as follows:


Pinout and wire colors for the C200M2 converter:

Pinout and Connection of RS-485 Converters (BOLID)

Bolid C2000-USB - link to download drivers.

Install the necessary drivers, depending on your operating system.


Once the drivers have been installed correctly, the converter will appear in the COM Ports as follows:


Pinout of the BOLID converter:

Example of a Modbus station request

You can poll the station using this command via any program designed for this purpose.

Via the RS-485 interface, using Modbus, you can poll the station with the following parameters/settings:

Protocol - LLS

Data rate - 19200 kbps

Data size - 8 bits

Parity check: None

Stop bits - 1

As an example of a request, we will use the Terminal.exe program


Request command: 01 03 00 00 00 5A C5 F1

01 – address

03 – code of the command

00 00 – the register number starting from which the number of registers is requested

00 5А – number of registers requested (5A – 90 registers)

С5 F1CRC-16 Modbus with byte order reversed;

In the Terminal app the "$" symbol is used as a separator


Answer:

01 03 B4 82 80 00 00 00 00 09 A1 27 1D 00 19 00 00 01 01 00 1D 00 00 00 92 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 01 10 0E 03

01 (address) 03 (command) B4 (number of bytes – 180 or 90 registers)

(Response decoding for stations with firmware versions below 1.4.5)


0. 82 80 – firmware (82-1.3.0) and device type + register bank number + sensor error status (Technical information for device developers)

1. 00 00 - upper 16 bits of UNIX TIME

2. 00 00 - lower 16 bits of UNIX TIME

3. 09 A1 - temperature: unsigned; resolution 0.01 degrees, i.e. 09A1 – 2465 or 24.65°C

4. 27 1D - atmospheric pressure: unsigned; resolution 10 Pa; 271D – 10013, i.e. 100130 Pa

5. 00 19 - relative humidity: unsigned; resolution 1%; 19 – 25%

6. 00 00 - wind speed: unsigned; resolution 0.01 m/s

7. 01 01 - wind direction: unsigned; resolution 1 degree; 101 – 257°

8. 00 1D - precipitation level (built-in sensor on the station): unsigned; resolution 0.01 mm; 0.29

9. 00 00 - ultraviolet radiation level (built-in sensor on the station): unsigned; resolution 0.01 W/m²

10. 00 92 - illuminance level: unsigned; resolution 1 lux; 92 - 146

11. 00 00 - wind speed measured by the ultrasonic anemometer: unsigned; resolution 0.01 m/s

12. 00 00 - wind direction measured by the ultrasonic anemometer: unsigned; resolution 1 degree.

13. 00 00 - distance to the obstacle (snow cover): unsigned; resolution 1 cm. The DGV must have network address 160

14. 00 00 - solar radiation: unsigned; resolution 1 W/m². The pyrheliometer must have network address 181

15. 00 00 - BMVD1

16. 00 00

17. 00 00

18. 00 00

19. 00 00

20. 00 00

21. 00 00

22. 00 00 - BMVD2

23. 00 00

24. 00 00

25. 00 00

26. 00 00

27. 00 00

28. 00 00

29. 00 00 - BMVD3

30. 00 00

31. 00 00

32. 00 00

33. 00 00

34. 00 00

35. 00 00

36. 00 00 - BMVD4

37. 00 00

38. 00 00

39. 00 00

40. 00 00

41. 00 00

42. 00 00

43. 00 00 - BMVD5

44. 00 00

45. 00 00

46. 00 00

47. 00 00

48. 00 00

49. 00 00

50. 00 00 - BMVD6

51. 00 00

52. 00 00

53. 00 00

54. 00 00

55. 00 00

56. 00 00

57. 00 00 - BMVD7

58. 00 00

59. 00 00

60. 00 00

61. 00 00

62. 00 00

63. 00 00

64. 00 00 - BMVD8

65. 00 00

66. 00 00

67. 00 00

68. 00 00

69. 00 00

70. 00 00

71. 00 00 - particulate matter 2.5 μm: unsigned; resolution

72. 00 00 - particulate matter 10 μm: unsigned; resolution

73. 00 00 - CO2 level: unsigned; resolution

74. 00 00 - CO level: unsigned; resolution

75. 00 00 - NO level: unsigned; resolution

76. 00 00 - NO2 level: unsigned; resolution

77. 00 00 - SO2 level: unsigned; resolution

78. 00 00 - H2S level: unsigned; resolution

79. 00 00 - HCN level: unsigned; resolution

80. 00 00 - NH3 level: unsigned; resolution

81. 00 00 - CH2O level: unsigned; resolution

82. 00 00 - weather measurement errors (Weather Errors)

83. 00 00 - reserve 2

84. 00 00 - reserve 3

85. 00 00 - reserve 4

86. 00 00 - reserve 5

87. 00 00 - average wind speed over 10 min

88. 00 06 - wind gust over 10 min

89. 01 10 - events (Technical information for device developers)

0E 03 – CRC-16 modbus

(Response decoding for stations with firmware version 1.4.5 and above)

Register number Register description
0 firmware and device type + register bank number + sensor error status (Technical information for device developers)
1 upper 16 bits of UNIX TIME
2 lower 16 bits of UNIX TIME
3 temperature: signed; resolution 0.01 degrees. The value “2457” equals 24.57 degrees
4 atmospheric pressure: unsigned; resolution 10 Pa. The value “10074” equals 100740 Pa
5 relative humidity: unsigned; resolution 1%
6 wind speed: unsigned; resolution 0.01 m/s. The value “256” equals 2.56 m/s
7 wind direction: unsigned; resolution 1 degree
8 Precipitation level: unsigned; resolution 0.1 mm. The value “29” equals 2.9 mm
9 Ultraviolet radiation level (built-in sensor on the station): unsigned; resolution 0.01 W/m2. The value “456” equals 4.56 W/m2
10 Illuminance level: unsigned; resolution 1 lux
11 Wind speed measured by the ultrasonic anemometer: unsigned; resolution 0.01 m/s. The value “256” equals 2.56 m/s
12 Wind direction measured by the ultrasonic anemometer: unsigned; resolution 1 degree
13 Distance to the obstacle (snow cover): unsigned; resolution 1 cm. The DGV must have network address 160
14 Solar radiation: unsigned; resolution 1 W/m2. The pyrheliometer must have network address 181
15 + 7*N[0:7] BMVD-N, signed value of sensor 1
15 + 7*N[0:7] + 1 BMVD-N, signed value of sensor 2
15 + 7*N[0:7] + 2 BMVD-N, signed value of sensor 3
15 + 7*N[0:7] + 3 BMVD-N, signed value of sensor 4
15 + 7*N[0:7] + 4 BMVD-N, signed value of sensor 5
15 + 7*N[0:7] + 5 BMVD-N, signed value of sensor 6
15 + 7*N[0:7] + 6 BMVD-N, signed value of sensor 7
71 Particulate matter 2.5 μm: unsigned; resolution
72 Particulate matter 10 μm: unsigned; resolution
73 CO2 level: unsigned; resolution
74 CO level: unsigned; resolution
75 NO level: unsigned; resolution
76 NO2 level: unsigned; resolution
77 SO2 level: unsigned; resolution
78 H2S level: unsigned; resolution
79 HCN level: unsigned; resolution
80 NH3 level: unsigned; resolution
81 CH2O level: unsigned; resolution
82 weatherErrors
83 Sokol-DS register 1
84 Sokol-DS register 2
85 (Microwave sensor water flow speed in mm/s) waterflow speed in mm/s (PWFL432-P)
86 (Microwave sensor distance in centimeters) distance in cm (PWRD81HB or PWFL432-P)
87 average wind speed over 10 min
88 wind gust over 10 min
89 events (Technical information for device developers)
90 + N[0:7] BMVD-N, signed value of sensor 8
98 Humidity from the DVP sensor when directly connected, in % (address 170)
99 Temperature from the DVP sensor in Celsius when directly connected (address 170)
100 PPFD (Sensor for measuring Photosynthetic Photon Flux Density.) Sokol-FAR (address 184)


If you specify a different register in the command as the starting point for the data to be unloaded, and specify a different number of registers to be requested, the response will contain fewer registers.



Example:

Request the 10 registers following the 5th

Request:

01 03 00 05 00 0A D5 CC


01 – address

03 – command

00 05 – Request to return registers starting from the 5th; that is, the response will include registers starting from the 6th

00 0А – Request to return 10 registers

D5 CC – checksum (byte order reversed)


Answer:

01 03 14 00 19 00 00 01 01 00 00 00 00 00 8D 00 00 00 00 00 00 00 00 81 FF

01 - address

03 - command

14 - number of bytes – 20, i.e., 10 registers

00 19 - humidity

00 00  - wind speed

01 01 - wind direction

00 00 - Precipitation level (unsigned); resolution 0.1 mm; 2.9

00 00 - Ultraviolet radiation level (unsigned); resolution 0.01 W/m²

00 8D - Illuminance level: unsigned; resolution: 1 lux; 92–146

00 00 - Wind speed measured by the UZ anemometer is unsigned; resolution 0.01 m/s

00 00 - The wind direction reading from the UZ anemometer is unsigned; resolution: 1 degree.

00 00 - The distance to the obstacle (snow cover) is unsigned; resolution is 1 cm. The DGV must have the network address 160

00 00 - Solar radiation: unsigned; resolution 1 W/m². The pyrheliometer must have the IP address 181

81 FF – checksum

Useful links

Analysis of a Modbus station request string (RUS)

Connecting the station via Modbus (VIDEO) (RUS)

Connecting the Station to Power supply (VIDEO) (RUS)