User guide
eWON 500-2001-4001-4002 User Guide - Programming the eWON
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 151
9.2.49 ONxxxxxx
There are some ONxxxxxx commands listed below.
These commands are used to register a BASIC action to perform in case of special conditions.
For every ONxxxxx command, the action to execute is a string that is used as a BASIC command line.
When the condition occurs, the command is queued in an execution queue and is executed when its turn comes.
These functions are:
When the command line programmed is executed, a special parameter is set in SETSYS PRG,"EVTINFO".
The value of the parameter depends on the ONxxxxxx function and it can be checked with the GETSYS command.
Warning:
For all ONxxxx command, if the last parameter is omitted, the action is canceled.
Example:
See also:
“GETSYS, SETSYS” on page 141, ONxxxxx (following chapters)
9.2.50 ONALARM
Syntax [command]
ONALARM S1,S2
• S1 is the Tag to scan for alarm state change
• S2 is the command line to execute in case of alarm state change.
Purpose:
Executes the S2 command line when alarm state on Tag with Tag name given by S1 changes.
The EVTINFO parameter (see GETSYS page 141) is set to the Tag id when command is called.
Note: ONALARM will execute the command when the alarm status gets the value "2",
that means that ONALARM DOES NOT DETECT
the "pre trigger" status (value=1).
Example:
See also:
“ALSTAT” on page 131, “GETSYS, SETSYS” on page 141, “ONxxxxxx” on page 151, “ONCHANGE” on page 152
ONxxxx command Description
ONTIMER Executed when one of the timers expires
ONCHANGE Executed when a Tag value changes
ONALARM Executed when a Tag alarm state changes
ONERROR Executed when an error occurs during BASIC execution
ONSTATUS Executed when a scheduled action is finished (success or failure)
ONPPP Executed when the PPP connection goes online or offline
Table 97: the various “ONXXXX” functions
ONTIMER 1
REM will cancel any action programmed on TIMER 1.
ONALARM "MyTag","goto MyTagAlarm"