In the interface documented by the X2View user manual, select Programmable → JS Script Editor, right-click the script list and create a new script. Set its name, description and execution mode. Menu wording may vary by software version; use the help documents bundled with your installed package.

Use Functions to select a built-in function and External Variables or Internal Variables to insert an existing tag name. Run Syntax Check before saving. The editor reports the line containing a syntax error. Validate the logic in a test project before uploading it to the target device.

Download X2View software and its bundled help documents