Addition And Subtraction (Cycle Method) - Lightware RAP-B511-EU User Manual

Room automation panel
Table of Contents

Advertisement

 
7. LW3 Programmers' Reference
Examples
Change messages (CHG) can be seen after each response for the better understanding, which is not the part
of the command, but it can be set as described in the
Example 1 – addition
ç GET /CTRL/VARS/V1.Value
æ pw /CTRL/VARS/V1.Value=6
ç CALL /CTRL/VARS/V1:add(1)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=7
ç CALL /CTRL/VARS/V1:add(1)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=8
ç CALL /CTRL/VARS/V1:add(2)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=10
Example 3 – addition with 'max' value
ç GET /CTRL/VARS/V1.Value
æ pw /CTRL/VARS/V1.Value=16
ç CALL /CTRL/VARS/V1:add(2;10;20)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=18
ç CALL /CTRL/VARS/V1:add(2;10;20)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=20
ç CALL /CTRL/VARS/V1:add(2;10;20)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=20
Subscription
section.
Example 2 – subtraction
ç GET /CTRL/VARS/V1.Value
æ pw /CTRL/VARS/V1.Value=10
ç CALL /CTRL/VARS/V1:add(-2)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=8
ç CALL /CTRL/VARS/V1:add(-2)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=6
ç CALL /CTRL/VARS/V1:add(-10)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=-4
Example 4 – subtraction with 'min' value
ç GET /CTRL/VARS/V1.Value
æ pw /CTRL/VARS/V1.Value=14
ç CALL /CTRL/VARS/V1:add(-2;10;20)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=12
ç CALL /CTRL/VARS/V1:add(-2;10;20)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=10
ç CALL /CTRL/VARS/V1:add(-2;10;20)
æ mO /CTRL/VARS/V1:add
æ CHG /CTRL/VARS/V1.Value=10
Applied firmware package: v1.1.0b3b3 | LDC software: v2.5.1b5
RAP-B511 series – User's Manual
7.13.3. Addition and Subtraction (Cycle Method)
The value of a numeric variable can be increased by adding a positive value or it can be decreased by adding
a negative value. Minimum and maximum values can be defined as limits. This method has the feature that
if the value hits the limit (min/max), the value will be stepped to the other end of the interval.
Command and Response
ç CALL·/CTRL/VARS/V<loc>:cycle(<operand>;<min>;<max>)
æ mO·/CTRL/VARS/V<loc>:cycle
Parameters
Parameter
Parameter description
<loc>
The location of the variable
<operand>
The value that is added to the variable
<min>
The lowest allowed value (optional)
<max>
The highest allowed value (optional)
If the calculated value is beyond the limit (min/max), the value will be stepped to the other end of the interval.
Examples
Change messages (CHG) can be seen after each response for the better understanding, which is not the part
of the command, but it can be set as described in the
Example 1 – addition
ç GET /CTRL/VARS/V1.Value
æ pw /CTRL/VARS/V1.Value=18
ç CALL /CTRL/VARS/V1:cycle(1;10;20)
æ mO /CTRL/VARS/V1:cycle
æ CHG /CTRL/VARS/V1.Value=19
ç CALL /CTRL/VARS/V1:cycle(1;10;20)
æ mO /CTRL/VARS/V1:cycle
æ CHG /CTRL/VARS/V1.Value=20
ç CALL /CTRL/VARS/V1:cycle(1;10;20)
æ mO /CTRL/VARS/V1:cycle
æ CHG /CTRL/VARS/V1.Value=10
ç CALL /CTRL/VARS/V1:cycle(1;10;20)
æ mO /CTRL/VARS/V1:cycle
æ CHG /CTRL/VARS/V1.Value=11
Value
Value description
1-30
Negative value is also accepted
Integer
Negative value is also accepted
Integer
Negative value is also accepted
Integer
Subscription
section.
Example 2 – subtraction
ç GET /CTRL/VARS/V1.Value
æ pw /CTRL/VARS/V1.Value=13
ç CALL /CTRL/VARS/V1:cycle(-2;10;20)
æ mO /CTRL/VARS/V1:cycle
æ CHG /CTRL/VARS/V1.Value=11
ç CALL /CTRL/VARS/V1:cycle(-2;10;20)
æ mO /CTRL/VARS/V1:cycle
æ CHG /CTRL/VARS/V1.Value=20
ç CALL /CTRL/VARS/V1:cycle(-2;10;20)
æ mO /CTRL/VARS/V1:cycle
æ CHG /CTRL/VARS/V1.Value=18
84

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