JavaScript editor. ABB CP600 Panel Builder 600
বিজ্ঞাপন
বিজ্ঞাপন
34 JavaScript
JavaScript editor
PB610 Panel Builder 600 includes a powerful JavaScript editor.
Right-click in the editor to display available commands.
Execution of JavaScript functions
JavaScript functions are executed when events occur. For example, a user can define a script for the OnMouseClick event and the JavaScript script will be executed when the button is pressed on the HMI device.
JavaScript functions are executed only when the programmed event occurs and not cyclically. This approach minimizes the overhead required to execute logic in the HMI device.
PB610 Panel Builder 600 provides a JavaScript engine running on the client side. Each project page can contain scripts having a scope local to the page where they are added; global scripts can be created to be executed by scheduler events or alarm events.
In both cases scripts are executed on the client. This means that if more than one client is connected to the HMI device (for external computer running the HMI Client), each client will run the same script, providing different output results depending on the input, since inputs provided to different clients may be different.
For example, if a script acts according to the position of a slider and this position is different on the different clients, the result of the script will be different on each client.
JavaScript functions for page events
JavaScript editor will open when you add a JavaScript action inside an action list.
Copyright © 2011-2016 ABB. All rights reserved. Documentation Revision 2.00 - Date of issue: 2016-07-19
277
1. Select the even that will execute the action.
2. Add a JavaScript action from the Widget category.
3. Either leave the default function name, or type a new one.
4. Click OK to confirm: the JavaScript editor displays your function structure.
Execution of JavaScript functions
You can also open the JavaScript editor from the Script tab at the bottom of the workspace.
JavaScript functions for alarms and scheduled events
JavaScript code associated with alarms and scheduled events and not associated with a specific page, can be edited from the main Project properties page.
Path: ProjectView> double-click Project properties
278
Copyright © 2011-2016 ABB. All rights reserved. Documentation Revision 2.00 - Date of issue: 2016-07-19
ডাউনলোড
বিজ্ঞাপন