Wiki source code of Examples of sensors

Last modified by Андрей Калиновский on 2023/04/26 11:20

Show last authors
1 == **Simple sensors** ==
2
3 **Ignition** by discrete input
4
5 [[image:image-20230425143347-1.png]]
6
7
8
9 **Ignition** by analog input (the sensor will trigger if the voltage is more than > 6000 mV)
10
11 [[image:image-20230425143355-2.png]]
12
13
14 **Fuel dispensing** from counting pulse input
15
16 [[image:image-20230425143401-3.png]]
17
18 Depending on the pulse counting algorithm, the terminal selects the type of calibration "Accumulator" or "Difference from the previous".
19
20 Similarly, sensors for flow-through fuel flow meters are created - in this case, the type of sensor should be selected as "Fuel consumption".
21
22
23 **Grain level** received via RS485 interface
24
25 [[image:image-20230425143408-4.png]]
26
27
28 **Fuel level** received via RS485 interface
29
30 [[image:image-20230425143413-5.png]]
31
32 Because values ​​less than the first and greater than or equal to the last row are considered invalid and are ignored, it is recommended to add an input value higher than the maximum possible in the last row of the table. For example, 1024 or 4096 for sensors that transmit the maximum fuel level in the ranges of 0-1023 or 0-4095. The output value can be calculated linearly.
33
34
35 **Trailer temperature ** received via 1-Wire interface
36
37 [[image:image-20230425143421-7.png]]
38
39
40 == **Virtual** ==
41
42 {{video url="https://www.youtube.com/watch?v=c3DnKXC4Cto&list=PLnkd3b-WBcpHWYhylpHeysMaTpqLc4Tlm&index=3" width="50%"/}}
43
44 [[On-board voltage **ignition sensor **>>doc:Панель управления.Раздел "Объекты".Настройка зажигания по напряжению.WebHome]]
45
46
47 **GNSS signal suppression** received from the UMKa3xx terminal
48
49 [[image:image-20230425143428-8.png]]
50
51
52 For UMK-3xx terminals, the STATUS field is displayed in decimal form at the input *А(100), GNSS signal suppression changes the ninth bit. In the sensor, set the expression getbit(adc100,9)
53
54
55 **Fuel level ** with an aggregation function for summing or averaging.
56
57 [[image:image-20230425143435-9.png]]
58
59
60 [[image:image-20230425143440-10.png]]
61
62 The aggregating function "Sum" is used **when one fuel level sensor is installed in each tank** .
63
64 The aggregating function "Average" is used **when several fuel level sensors are installed in one tank** .
65
66 **Fuel level ** with ignition validation
67
68 When using standard fuel sensors with an inverted calibration table, an effect occurs when the voltage from the sensor drops to 0 when the ignition is turned off, which is detected as a full tank. For filtering, you can use validation by the ignition sensor.
69
70
71 To do this, we create physical sensors for ignition and fuel level, indicating the aliases ign and fuel
72
73 [[image:image-20230425143446-11.png]]
74
75 [[image:image-20230425143452-12.png]]
76
77 Then we create a virtual fuel level sensor with the expression **//if(ign, fuel, 0)//** - if the ignition is on, then we transfer the fuel as it is, otherwise we transfer 0 instead. Fill in the calibration table with 2 lines - 0 - 0 and maximum_tank_volume - maximum_tank_volume, which will cut off the 0 obtained from the formula condition. As a result, the system will consider invalid the fuel level obtained with the ignition sensor turned off.
78
79 [[image:image-20230425143501-13.png]]
80
81
82
83 **Fuel level ** on the sensor with the changed input number.
84
85 To do this, we create physical sensors with the Arbitrary type, calibration tables, old and new input numbers, and specifying fuel_old and fuel_new aliases.
86
87 [[image:image-20230425143510-14.png]]
88 Then we create a virtual fuel level sensor with the expression **//if(time > cdate('2021-12-22 00:00:00', 'yyyy-MM-dd HH:mm:ss'), fuel_new, fuel_old) -//** after 2021-12 -22 00:00:00 (UTC time) fuel is displayed from the new FLS, and up to this time inclusive from the old FLS.
89
90 [[image:image-20230425143516-15.png]]
91
92 ====== //An example of setting up an analog sensor in the article [["Setting up an analog FLS" >>https://wiki.glonasssoft.ru/bin/view/%D0%9F%D0%B0%D0%BD%D0%B5%D0%BB%D1%8C%20%D1%83%D0%BF%D1%80%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F/%D0%A0%D0%B0%D0%B7%D0%B4%D0%B5%D0%BB%20%22%D0%9E%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B%22/%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0%20%D0%B0%D0%BD%D0%B0%D0%BB%D0%BE%D0%B3%D0%BE%D0%B2%D0%BE%D0%B3%D0%BE%20%D0%94%D0%A3%D0%A2/]]// ======

Меню

GLONASSSoft wiki - 2023 г