Issue
Cannot find documentation on how to use the new Graphic components release with EBO 2.0
Getting the following errors when previewing my graphic page:
- "Script error in function "onLoad" .... ReferenceError: "_firstRun" is not defined
- "Script error in function "onChange" ... ReferenceError: "_setVisuals" is not defined
The component added to the graphic shows no binding label in the WorkStations edit bindings window
Product Line
EcoStruxure Building Operation.
Environment
- Building Operation Graphic Editor 2.0 and above
- GlobalScripts V2.0.0262 and above
Cause
With the release of EBO 2.0, a set of new components/snippets have been released, which are different from those issued in earlier releases, although there is very little change visually.
The scripting, in most cases but not all, has been removed from the components themselves and put into single scripts. This means we can take advantage of the functionality of the global script. This requires the user to set the UseGlobalScripts attribute to True within the TGML graphic editor, which can be on a per-graphic basis and ensures that existing graphics will still function.
Once turned to True, all components with scripts and requirements for other global scripts to function correctly can function as designed.
For example, the setpoint box requires global scripts to ensure units and decimal places are displayed as designed/required due to the scripts. There are also two binds available on the box, one for reading and one for writing. Both need to be bound to enable the component to function correctly. The components are designed this way to allow use in BACnet, where it may require reading the resultant Value but Writing at a specific Priority.
Without the scripts added to the graphic, the component cannot function.
For further details/questions, refer to the following Community Posts, which also include the current PDF documentation:
Help-with-an-EBO-2-0-component
EcoStruxure-Building-Operation/Graphic-Component-Library-Rev-AB1-002-pdf
NAM Standards Team TGML Component Library - Communities (se.com)
This article provides the necessary steps required to enable and get these new components working and does not provide in-depth functionality.
Resolution
- Within Graphics Editor, enable UseGlobalScripts. To do this:
- Select the -Tgml object shown in the Objects pane
- In the Properties pane
- Change the UseGlobalScripts from False to True
- In the Global Graphic Snippets:
- Drag the GlobalScripts V2.0.xxxx onto the -Tgml object.
- GlobalScripts then appends as shown below.
Note: This must be done before adding any components and ONLY once on each Graphic page.
- Add a Component by dragging it into the Design window.
- Add Snippets to allow the relevant Bindings to be added to this component. To do this:
- Select the Snippets tab, Select
- Select Global Bind Snippets
- Drag the appropriate snippet onto the Component.
- Save the graphic
- Preview - no errors should appear. If there are errors:
- Ensure that the scripts/components have been added in the correct order
- Ensure the correct Snippet has been added to the correct Component. Refer to the Graphic-Component-Library-Rev-AB1-002-pdf documentation for the tested snippets/component combinations.
- Open WorkStation and Edit Bindings on the saved graphic page
- View the graphic page