User manual
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
67
20.2 Counter Service
Counter is used to execute a Command String when the Counter value equals a preset value. There are total of 5
Counters.
20.2.1 Counter Service Command String Syntax and explanation
1
st
field
Service
type
2
nd
field
Service id
3
rd
field
Operation
type
4
th
field
Operation
argument
Explanation
CT
(1 to 5)
DE
1 TO 255
Decrement the value of Counter with
argument value
IN
1 TO 255
Increment the value of Counter with
argument value
RS
0
Reset the Counter value to zero
ST
-32768 to
32767
Set the “trigger” value
If Counter value equal this value, will
execute Command String
TR
(1 to 50)
0
Set Command String to be run, 0 to
cancel setting
Example: Set Counter #1 to execute Command String #10 if Counter value equal 100
CT 1 ST 100 CT 1 TR 10
Example: Increase Counter #1 value by 20
CT 1 IN 20
Example: Reset Counter #1 value to 0
CT 1 RS 0
Note
:
Initial Counter and trigger values are zero.
The Counter is recorded by a signed 16 bit register, if the Counter value is 32767 and you increase it by 1, the value
will change to -32768
There is no limit on no. of times of triggering. E.g. If you first set trigger value to 2 and reset Counter to 0, then you
increment counter by 2, then decrement by 2 and increment by 2 again. Then the associated Command String will be
executed twice.
20.2.2 Reading Counter Service Status
See Chapter for details.
20.3 Countdown Timer Service
Countdown Timer is used execute a Command String when the Timer value reach zero. Counting period is 1 second.
There are total of 10 Countdown Timers.
20.3.1 Countdown Timer Service Command String Syntax and explanation
1
st
field
Service
type
2
nd
field
Service id
3
rd
field
Operation
type
4
th
field
Operation
argument
Explanation
TM
(1 to 10)
ST
1 TO
2147483647
Initial value of Countdown Timer (in
seconds)
SW
0 TO 1
Start (1) or Stop (0) Timer
TR
(1 to 50)
0
Set Command String to be run, 0 to
cancel setting