C
ONFIGURATION
C
OMMAND
S
ET
- F
IRMWARE
R
EVISION
2.4.0_
BETA
-
V
ERSION
1.0.0
Example
AL0=TCP.Client.eConnected:SYS.Timer1.start,cyclic,60000
AL1=TCP.Client.eDisconnected:SYS.Timer1.stop
AL2=GPS.Nav.sSpeed<2&Sys.Trigger.s0=low:Sys.Trigger0=high&SYS.Timer0.start=Cyclic,1000&Sys.Counter
0.Set=0
AL3=SYS.Timer.e0:Sys.Counter0.Increment
AL4=GPS.Nav.sSpeed>=2&Sys.Trigger.s0=high:Sys.Trigger0=low&SYS.Timer0.stop&
[SEND DATA TO
SERVER]
&SYS.Timer1.start
AL5=SYS.Timer.e1:[
SEND DATA TO SERVER
]
$PFAL,TCP.Storage.AddProtocol,0,“[&(Time),&(Date),&(Lat),&(Lon),&(Alt),&(Speed),&(NavDist),&( Trigger0)]“
AL4=GPS.Nav.sSpeed>=2&Sys.Trigger.s0=high:Sys.Trigger0=low&SYS.Timer0.stop&SYS.Timer1.start&TCP.
Storage.AddProtocol,0,“[&(Time),&(Date),&(Lat),&(Lon),&(Alt),&(Speed),&(NavDist),&(Trigger0),&(Counter0)]“
AL5=SYS.Timer.e1:TCP.Storage.AddProtocol,0,“[&(Time),&(Date),&(Lat),&(Lon),&(Alt),&(Speed),&(NavDist),&
(Trigger0)]“
Comment
Timers allow the application to raise an event on a specified interval, so that timers can be used to send data
periodically at specified time intervals. In order to enable it, start for example a cyclic timer that starts its
executation whenever the connection to the server results true and stops its executation otherwise.
Next, customize a protocol that contains in a small size (offering cost-efficient) all information you need for each
logging report. The customized protocol can be constructed, using the „dynamic protocol“ feature (see entry
settings). To do this you have to gather all information your application needs.
For example:
event time
&(Time)
and/or
&(Date)
Location
&(Lat),
&(Lon)
and if needed
the
&(Alt)
too
Speed
&(Speed)
Miles
:
&(NavDist)
//
distance counter
Nav.Dist
can be used. This number is shown in
metres – so the server has to calculate it to miles/kilometres.
The moving vehicle status is not available directly
it has to be created anywhere.
Stop duration for a selected vehicle
has also to be created anywhere.
Furthermore 2 solutions:
Device creates this state and transmits it to server
Server creates this state (i.e. out of position and time data)
In our case let’s demonstrate an example how to monitor the stops of the vehicle. Logging a position each
minute might be too less awarding short stops for only a few seconds.
Using the speed of the device allows creating of stop conditions. When the speed is <2m/s a cyclic Timer
(1sec) and Counter will start up. Additionally, a Trigger can be used to display both states „standing“ and
„moving“ while a Counter contains the stop duration in seconds.
Standing:
If device stops moving, set the state to low (stopping), then start counting of seconds and set the „stop time
counter“ to 0, (for each second gone, increment the counter).
Moving
:
If device starts moving, set the state to high (moving), then stop counting of seconds, and send to server)
Additionally: reset cyclic send counter (this assures that the next „usual“ log report is written after 1 minute
after device starts moving - if this is not used, both cases are unsynchronized)
Now the [SEND DATA TO SERVER] – part:
Basically the command for adding a dynamic protocol to the TCP storage is:
$PFAL,TCP.Storage.AddProtocol,0,“my text“
As all information is available now, the dynamic protocol can be generated.
Additionally the counter
&(Counter0)
is shown, when the device starts moving again.
Finally AL4 and AL5 could look this way:
AL4=GPS.Nav.sSpeed>=2&Sys.Trigger.s0=high:Sys.Trigger0=low&SYS.Timer0.stop&SYS.Timer1.start&TCP.
Storage.AddProtocol,0,“[&(Time),&(Date),&(Lat),&(Lon),&(Alt),&(Speed),&(NavDist),&(Trigger0),&(Counter0)]“
AL5=SYS.Timer.e1:TCP.Storage.AddProtocol,0,“[&(Time),&(Date),&(Lat),&(Lon),&(Alt),&(Speed),&(NavDist),&
(Trigger0)]“
6.11.4 Special consideration when using firmware features
6.11.4.1 Using commands inside alarms
Send commands have a special option, which allows them to be re-executed inside an
alarm until they are succeed. This behaviour assures, that important information ca not
get lost due to bad GSM coverage. Usually Sending commands „just“ enqueue the
This confidential document is a property of FALCOM and may not be copied or circulated without previous permission.
Page 268 of 271