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 143
• A block must be loaded for edition with the SETSYS command and a special field called "load". According to the source, this block
will be either the eWON system configuration, the eWON COM configuration, or one Tag configuration, or one user configuration.
• Then each field of this configuration can be accessed by the GETSYS or SETSYS commands.
This edition works on the record loaded values but does not actually affect the configuration.
• When edition is finished, the SETSYS command is called with a special field called "save" and the edited block is saved
(this is only necessary if the record has changed).
At that time the record edited content is checked and the configuration is actually updated and applied.
• The CFGSAVE command can be called to actually save the updated configuration to flash.
• SETSYS TAG,"load",XXXXXXX
The TAG load case is particular because is allows to load a Tag defined by its name, its ID or its Index.
If there are 6 Tags defined in the config, each Tag can be accessed by its index (0 to 5), its ID (the first item of a Tag definition when reloading the
config.txt file, the ID of a Tag is never reused during the live of a configuration until the eWON is formatted) or finally by its name.
• Recognized field values per group
The fields values are the same fields as those returned by the FTP get config.txt command. See the Chapter “Files Format” on page 120 for
a list of these fields.
Syntax
GETSYS SSS, S1
SETSYS SSS, S1, S2 / E2
• SSS is the source block: PRG, SYS, TAG, USR - This parameter must be typed as is (it could not be replaced by a string)!
• S1 is the field name you want to read or modify. S1 can be the action "load" or "save"
• S2 /E2 is the value to assign to the field, of which type depends on the field itself
Example:
See also:
“CFGSAVE” on page 133, “Configuration Fields” on page 170
Method XXX param Example Example explanation
Tag name access Tagname Setsys Tag,"load","MyTagName" Loads Tag with name MyTagName
Index access -Index Setsys Tag,"load",- 4 Loads Tag with index 4
TagId access Id Setsys Tag,"load",50 Loads Tag with id 50
Table 95: Setsys Tag,"load" examples
A% = GETSYS PRG, "TIMESEC"
REM Suppose Tag_1 exists and is memory Tag
SETSYS TAG,"load","Tag_1"
A$ = GETSYS TAG,"Name" : REM A$="Tag_1"
SETSYS TAG,"ETO","ewon_actl@ewon.biz" : REM EmailTo field of Tag_1
SETSYS TAG,"save" : REM save data in the config => update Tag_1
SETSYS TAG,"Name","Tag_2"
SETSYS TAG,"save" : REM update or create Tag_2 with Tag_1 cfg