Type | Format | Description |
Subroutine | FrameOpen(“FrameFile”) | Opens the frame file. |
Function | GetExplorerPath(“PathType”) | Returns the recently selected file’s path. |
Function | IsDirectory(“File or Folder Name”) | Checks if the file or folder exists in the Xpanel. |
Function | NumToAsc(Decimal value) | Converts a decimal value to an ASCII code value. |
Function | NumToStr(TargetValue, Value Type, Format) | Converts the numeric value to a string. |
Subroutine | PageOpen(“PageName”) | Opens the page. |
Subroutine | PrePage() | Moves to the previous page. |
Subroutine | PrePageEx() | Moves to the previous base page. |
Subroutine | RunApp(“ProgramName”, “ProgramParameter”) | Executes the external program. |
Subroutine | ScrCapture(“SeedName”, Location) | Saves the Xpanel screen in a BMP file. |
Subroutine | SetSpeed(Acc./Dec.) | Controls the process processing time of the script module. |
Subroutine | Sleep(Delay) | Delays the script program. |
Subroutine | SoftKeyboard(Show/Hide, X Coordinate, Y Coordinate) | Opens or closes the virtual keyboard. |
Function | StrToNum(Target String, Numeral System) | Converts the string to the numeric value. |
Subroutine | TimeStr(Acquired Value, “Format”) | Generates the time-displaying string. |
...
IsDirectory | Checks if the file or folder exists in the Xpanel. |
Function | n=IsDirectory(“File or Folder Name”) |
Description | Checks if the file or folder exists in the Xpanel. The parameter must be entered with the double quotation marks. If the file or folder exists, the function will return 1. If not, the function will return 0. |
Example | Checks if the USB Storage folder exists in Xpanel. VAR FolderCheck; FolderCheck = IsDirectory(“USB Storage”); |
...
NumToStr | Converts the numeric value to the string. |
Function | STR=NumToStr(TargetValue, Value Type, Format) |
Description | Recognizes the TargetValue as the data in Value Type. Then the value will be converted according to the Format. This function supports Value Type as shown below. _UINT_ : Unsigned Integer _INT_ : Signed Integer _FLOAT_ : Floating-Point _HEX_ : Hexadecimal Format must be written in the configuration as shown below. [Width] [. precision] Width: Assign the number of letters to be returned after the conversion. If you enter 3, the converted string will be composed of 3 letters. If the original value is greater than the Width value, the more significant digits will be deleted. In the opposite case, the spaces will be filled. If the Width contains a leading-zero, the spaces will be replaced with the zeros. Precision: Assign the Precision when you convert the floating-point number. Assign the significant digits for the decimal points to be converted. Precision must be smaller than the Width. |
Example | Stores 123 to Val1, 0123 to Val2, 123.46 to Val3. VAR Val1, Val2, Val3; Val1 = NumToStr(123.456, _FLOAT_, “3.0”); Val2 = NumToStr (123.456, _FLOAT_, “04.0”); Val3 = NumToStr (123.456, _FLOAT_, “6.2”); …… |
...
PageOpen | Opens the page. |
Subroutine | PageOpen(“PageName”) |
Description | Opens the page. You must enter the file name except for the extension. According to the page type, the pages will be opened with different operations. If there is no special configuration, the current page (existing page) will be closed. Popup Page: If you open the Popup Page with this function, the current page (existing page) will not be closed. Frame page: The page will be opened at the position where it is assigned in the frame. If you open the page in the same frame position, the page will be replaced with the new page. |
Example | Opens the page file named “PAGE”. PageOpen(“PAGE”); |
...
RunApp | Executes the external program. |
Subroutine | RunApp(“ProgramName”, “ProgramParameter”) |
Description | Executes the external program. ProgramName must include the file location and the extension. ProgramParameter is recognized as a string, therefore must be written with the double quotation mark. You can only execute the Windows program , or the program developed by the user. |
Example | Opens DOS and operates the ping test. RunApp(“Ping.EXE”, “-t 100.100.100.1”); |
...
ScrCapture | Saves the Xpanel screen in the BMP file. |
Subroutine | ScrCapture(“SeedName”, Location) |
Description | Saves the current Xpanel screen in a BMP image file. The file name will be created as shown below. “SeedName_HHMMSS.BMP” The image file will be saved in the path according to the value of Location. When you assign 0 at Location, it means the local. The value 1 means the SD/MMC and the value 2 means the USB. You can also assign the Location as shown below. 0: _LOCAL_ 1: _SDMEM_ 2: _USBMEM_ |
Example | Saves the current Xpanel screen as a BMP file in the SD/MMC memory. ScrCapture(“Mybmp”, _SDMEM_); |
SetSpeed | Controls the process processing time of the script module. |
Subroutine | SetSpeed(Acc./Dec.) |
Description | When you assign a value other than 0 to the Acc./Dec., the later commands will be processed faster. |
Example | The process will be faster after the calling SetSpeed function. TAG0 = TAG0 + 1; SetSpeed(1); TAG1 = TAG1 + 1; TAG2 = TAG2 + 2; |
...
StrToNum | Converts the string to the numeric value. |
Function | n=StrToNum(Target String, Numeral System) |
Description | Target String must contain the string that can be converted into a numeric value. If the Numeral System is 10, the function can process the string in the following format. [sign][digit][.digit][{d|D|e|E}[sign]digit] Assign (+) or (-) to the Sign. Digit must be assigned with a single or multiple digit-decimal. At least one decimal digit must be assigned before or after the decimal character(.). When the numeral system is decimal, you can process the exponent which is composed of an introductory letter (d|D|e|E)and an optionally signed integer. If the exponent or decimal point appears, the system will assume that the decimal number follows. This function returns 0 , if no conversion can be performed on the Target String.
Assign 0 or 2~36 to the Numeral System. If the Numeral System is 0, it will be processed according to the following rules.
If the Numeral System is greater than 10, the letters “a” through “z” (or “A” through “Z”) are assigned the values 10 through 35. This function only operates when the assigned value is smaller than the Numeral System. |
Example | Stores the 3140 to the variable VAL. VAR VAL; VAL = StrToNum(“3.14e3”,10); |
...
TimeStr | Generates the time-displaying string. |
Function | STR=TimeStr(Acquired Value, “Format”) |
Description | Assign the value acquired by GetTime(0) function or second-unit counter since Jan/01/1970 (UTC) to Acquired Value. “Format” will be composed with of the following symbols. %A : Full name of the day (e.g. Sunday) %B : Full name of the month (e.g. January) %b : Abbreviation of the month (e.g. Jan) %d : Date (1~31) %H : Hour in 24-hour format (0~23) %l : Hour in 12-hour format (1~12) %m : Month (1~12) %M : Minute (0~59) %p : Indicator of 12-hour format (AM/PM) %S : Second (0~59) %y : 2-digit year (e.g. 00, 99) %Y : 4-digit year (e.g. 2000, 1999) |
Example | Generates the string in Year/Month/Date Hour:Minute:Second format. CurTime = GetTime(0); StrTag = TimeStr(CurTime, “%Y/%m/%d/ %H:%M:%S”); |
...