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 141
9.2.29 GETSYS, SETSYS
The GetSys and SetSys function are used to set or get some special parameters of the eWON. There are 5 types of parameters:
Each group has a number of fields that can be read of written.
• PRG group fields:
Group Description
PRG
Program parameters like the time in milliseconds or the type of action that
started the program
SYS Edition of the eWON system parameters
COM Edition of the eWON communication parameters
USER Edition of the eWON users list
TAG Edition of the eWON Tag list
Table 93: GETSYS and SETSYS parameters
Field name Description
ACTIONID
RW I
After execution of a scheduled action like:
SendSMS
SendMail
PutFTP
SENDTRAP
TCP/UDP Connect (see OPEN command)
The ACTIONID returns the ID of the action just executed. When the ONACTION event is executed,
this ActionId is stored in EVTINFO. Writing to this field is useful to read the current value of an action.
ACTIONSTAT
RO I
Current status of the action with ActionID given by ACTIONID. If ACTIONSTAT must be checked,
ACTIONID must first be initialized
Possible values of ACTIONSTAT are:
-1: in progress
-2: ID not found
0: done with success
>0: finished with error = error code
The eWON maintains a list with the status of the last 20 scheduled actions executed.
When more actions are executed, the older status is erased and its ACTIONSTAT may return –2,
meaning it is not available anymore
EVTINFO
RO I
The value of this field is updated before executing the ONXXXXX (ONSTATUS, ONERROR, etc.),
see the different ONXXXXX function for the meaning of the EVTINFO parameter
TIMESEC
RO I
Returns the time elapsed since 1/1/1970 in seconds. (Useful for computing time differences)
Warning: when you assign this value to a float variable the number is too big and rounding will occur
You should use an integer variable (ex: a%) to store this value
MSEC
RO I
Time in MSEC since eWON has booted
Max value is 134217727 then it wraps to 0
RUNSRC
RO I
When program is started, the source of the execution is given by this parameter:
1: Started from the Web site ‘Script Control’ window
2: Started by the FTP server because program has been updated
3: A ‘GO’ command has been executed from the script
4: Automatic program start at eWON boot
Table 94: PRG group fields