Value Change With Intervals (Case); Scan And Store - Lightware RAP-B511-EU User Manual

Room automation panel
Table of Contents

Advertisement

 
7. LW3 Programmers' Reference
7.13.4. Value Change with Intervals (Case)
This command can be used to change the value of a variable if it fits in any of the defined intervals.
Command and Response
CALL·/CTRL/VARS/V<loc>:case(<min> <max>
ç
æ mO·/CTRL/VARS/V<loc>:case
Parameters
Parameter
<loc>
The location of the variable
<min>
The lowest value of the interval
<max>
The highest value of the interval
<val>
The new value that will be valid if the current value is in the interval
The parameters are divided by a space character, and the interval groups are divided by semicolon. Up to 16
cases can be defined.
Examples
ç CALL /CTRL/VARS/V1:case(10 20 15)
æ mO /CTRL/VARS/V1:case
A typical example when two different ranges of values have to meet:
Incoming values: between 0 and 255 (e.g. the slider of a controller can have these values).
Outgoing values: between 0 and 100 (e.g. the controlled device accepts these values).
Defined cases:
Case 1
Case 2
Case 3
Case 4
Case 5
Case 6
Case 7
Case 8
Case 9
Case 10
The command looks like:
ç CALL /CTRL/VARS/V1:case(1 25 10;26 50 20;51 75 30;76 100 40;101 125 50;126 150 60;151 175 70;
176 200 80; 201 225 90; 226 255 100)
æ mO /CTRL/VARS/V1:case
<val>;)
Parameter description
Value
1-30
Integer
Integer
Integer
Min
Max
New value
1
25
10
26
50
20
51
75
30
76
100
40
101
125
50
126
150
60
151
175
70
176
200
80
201
225
90
226
255
100
Applied firmware package: v1.1.0b3b3 | LDC software: v2.5.1b5
RAP-B511 series – User's Manual
7.13.5. Scan and Store
This command can be used to get the value (or a part of the value) of an LW3 property. The defined path will
be scanned according to the pattern and the result will be the value of the variable (number or string type).
Command and Response
ç CALL·/CTRL/VARS/V<loc>:scanf(<path>.<property>;<pattern>)
æ mO·/CTRL/VARS/V<loc>:scanf
Parameters
Parameter
<loc>
The location of the variable
<path>.<property>
The LW3 property with node
<pattern>
The pattern that scans the property for the desired result
Pattern options
Pattern
%s
String of characters stopping at the first whitespace character
%<number>s
The next <number> of characters (string) stopping at the first whitespace
%c
One character
%<number>c
The next <number> of characters
%[<characters>]
Defined characterset, specified between brackets
%[^<characters>]
Negated characterset, specified between brackets which will be skipped
%*
Ignored part
<custom_text>
User-defined text
The patterns can be combined to get the desired result as shown in the examples.

ATTENTION!
Do not forget to escape the % character as shown in below example.
Examples
ç CALL /CTRL/VARS/V1:scanf(/CTRL/TCP/C1.ActiveRx;\%6c)
æ mO /CTRL/VARS/V1:scanf
ç GET /CTRL/VARS/V1.Value
æ pw /CTRL/VARS/V1.Value=autorx
A simple pattern has been applied: we need the first six characters from the property value.
Parameter description
Value
1-30
see below
Pattern description
85

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rap-b511-kRap-b511-wRap-b511-sRap-b511-ukRap-b511-us

Table of Contents