forked from Ing-Dom/edomi_LBS_sirsydom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
19001650_lbs.php
83 lines (58 loc) · 1.28 KB
/
19001650_lbs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
###[DEF]###
[name = MinMaxFilter ]
[e#1 = Wert ]
[e#2 = Min ]
[e#3 = Max ]
[a#1 = Wert ]
[a#2 = Wert ungueltig ]
[a#3 = Vgl ]
###[/DEF]###
###[HELP]###
This LBS connects checks if the value at E1 is greater or equal than E2 and less or equal than E3. If so, the value from E1 will be sent to A1 and A3 will be 1, otherwise to A2 and A3 will be 0.
Inputs:
E1 - Wert:
E2 - Min:
E3 - Max:
Outputs:
A1 - Wert:
A2 - Wert ungueltig:
A3 - Vgl:
Versions:
V0.10 2018-06-10 SirSydom first aplha version
Open Issues:
Help
Author:
SirSydom - [email protected]
Copyright (c) 2018 SirSydom
Github:
https://github.com/SirSydom/edomi_LBS_logik
Links:
tbd
###[/HELP]###
###[LBS]###
<?
function LB_LBSID($id)
{
if($E=getLogicEingangDataAll($id))
{
if($E[1]['refresh']) // new telegram on E1
{
if($E[1]['value'] >= $E[2]['value'] && $E[1]['value'] <= $E[3]['value']) // E2 <= E1 <= E3
{
logic_setOutput($id,1,$E[1]['value']);
logic_setOutput($id,3,1);
}
else
{
logic_setOutput($id,2,$E[1]['value']);
logic_setOutput($id,3,0);
}
}
}
}
?>
###[/LBS]###
###[EXEC]###
<?
?>
###[/EXEC]###