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 165
9.2.70 SETIO
Syntax [command]
SETIO S1, F1
• S1 is the name of the Tag or Tag TagId.
• F1 is the value to give to the Tag.
Purpose:
Modifies the value of a Tag. The Tag must be writable (not for the read-only Tags).
Note:
In many cases this function is efficiently replaced by the TagName@ syntax. For example SETIO "MyTag", 10.2 is equivalent to
MyTag@=10.2
Example:
9.2.71 SETTIME
Syntax [Command]
SETTIME S1
• S1 is the new date / time to set.
• S1 can contain only the time. In that case the date is not modified.
• S1 can contain only a date. In that case the time is set to 00:00:00
Purpose:
Updates the eWON’s real time clock.
Note:
An event is generated in the events log.
Example
See also:
“TIME$” on page 166
9.2.72 SGN
Syntax [function]
SGN F1
Purpose:
Returns the sign of F1.
• If F1 is > 0, the function returns 1.
• If F1 = 0, the function returns 0.
• If F1 is < 0, the function returns -1.
Example:
SETIO "MYTAG", 10.123
REM The following are valid time updates
SETTIME "1/1/2000": REM Time is set to 01/01/2000 00:00:00
SETTIME "01/12/2000 12:00": REM Time is set to 01/12/2000 12:00:00
PRINT TIME$: REM suppose it returns "15/01/2000 07:38:04"
SETTIME "12:00": REM Time is set to 15/01/2000 12:00:00
SGN (-10) REM returns -1
SGN (-10.6) REM returns -1
SGN 10 REM returns 1