Table of Contents

Scripts

The features of the ezeio MkII system provide tremendous configurability to create monitoring, alarming, controlling and automation solutions, but for some applications, this may not be enough. To allow users to create custom functionality, the ezeio™ system supports the PAWN script language. PAWN has a C-like syntax and executes completely inside the ezeio. The “Scripts” page allows users to write, compile and commit code to the ezeio. Extensions to the PAWN language and custom functions relating to the ezeio have been added (see Script reference). The custom functions allow access to, and in some cases, control over an ezeio's configuration and hardware. The “Scripts” can be used to do small tasks, like calculations too complex or verbose for a Field's Data expression. Or automation can created using state machine logic and/or PID loop. The custom PAWN functions that link the ezeio's configuration to the “User scripts” allows the allocation of tasks to be shared. Fields, alarms, schedules, timers and system statuses can drive or influence decisions made by the script. This can serve to minimize the amount of code and configuration required. This split in tasks can also be used to manage access. Simple set points and switches can be operated with minimal privilege, while configuration changes are allowed with “Can edit ezeio in group” and finally scripts could be restricted to 1 or 2 individuals.

More information on how PAWN is used for the ezeio MkII can be found in this document under "Script reference". More information on the PAWN language in general can be found on online. A PAWN scripting introduction is available at https://ezesys.com/files-docs , as a PDF download.

Script list (sidebar)

Upon entering the “Scripts” page, you will see a single script name “AUTO_USER” highlighted and checked as active in your side bar (or scripts list).

Add script “+” button - To add a new script, click the “+” plus symbol in the upper left corner of sidebars header.

Selecting a script - Click on a scripts name in the list to see its code in the editor window.

Script editor window

The header of the builder window contains the delete (trash can), restart, Compile, Commit buttons and the name field.

Name - Click in the name field to modify the name and click the “Compile” button, to save the change.

Delete - Clicking the trashcan button will bring up a “Delete script” dialog box. Clicking delete will permanently remove the script highlighted on the list.

Restart - Clicking the button with the counter clockwise arrow symbol will restart the script currently loaded in the editor

Compile - “Compile” button is used to check the check the code for errors and warnings. The results are shown in the summary in the top of the “Terminal” window. The code will not run or be downloaded to the ezeio.

Commit - When you are ready to run the script on the ezeio, click the “Commit” button. You will receive a green confirmation message

Script terminal window

Compiling or commiting a script will generate details on the size of the code and any errors or warnings will be listed numerically by line. When a script is successfully commited to an ezeio the terminal window will display all debug messages.

The partition between the “Editor” and “Terminal” windows can be raised or lowered to display more code or results