EasyManua.ls Logo

DLI DIN4 - Page 22

Default Icon
57 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 Scripting 21
7.4.1 Legacy functions
Legacy functions (written in CAPS) are executed in sequence with a "step delay" after them. The legacy functions
are designed so as to resemble the BASIC commands of the previous generations of EPCR/LPC controllers while
remaining compatible with the Lua language.
Arguments to the legacy functions can be written as e.g. ON(12345678), ON "12345678" or
ON("12345678").
The supported legacy functions are:
ON, OFF, CYCLE, RESTORE - perform the action on a list of relays by numbers (as a number or a string);
BEEP(ON) or BEEP(on) or BEEP(true) - turn beeper on;
BEEP(OFF) or BEEP(off) or BEEP(false) or BEEP(0) - turn beeper off;
BEEP(number>0) - turn beeper on for the specified number of seconds, then off;
SLEEP(number[,"unit"]) - suspend execution for the given amount of time (units default to "seconds",
but can be "seconds", "minutes", "hours" or "days"; abbreviations like "sec", "h", "d" are also accepted);
LOG "String" - write a message to the system log
DISPLAY "String" - display a string on the LCD when it's in relay mode. The following strings are
expanded:
%% - literal "%";
%o - state of relays, in the form "12456" (ON relays are listed);
%O - state of relays, in the form "++-+++--";
%n - serial number;
%f - firmware version;
%d - system time/date;
%M - MAC address of the power controller;
%i - IP address of the power controller;
%m - IP network mask;
%g - IP gateway;
\1 - move cursor to the beginning of line 1;
\2 - move cursor to the beginning of line 2;
\f - clear screen;
\v - clear end of current line;
WOL "MAC address" - attempt to wake device with specified MAC address up using Wake-on-Lan pro-
tocol (the device has to be in the same LAN segment);
TIME "server" - synchronize time with server specified by IP address or hostname in quotes; you can
use TIME() without arguments to synchronize with "pool.ntp.org" if the DNS is configured correctly.
You still need to enclose the function contents in a function name() ... end as explained above.
DLI DIN4 User’s Guide: 20170809T111540Z