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
Product Line
EcoStruxure Building Operation.
Environment
Building Operation Graphic Editor 2.0
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 to those issued in earlier releases, although visually there is very little change. 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 global scripts functionality. This requires the user to set the UseGlobalScripts attribute to True within the TGML graphic editor, this can be on a per graphic basis and ensures that existing graphics will still function. Once turned to True, all components that have scripts, and have 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, one for write. Both need to be bound to enable the component to function correctly. The components are designed in this way to allow use in BACnet where it may require to read the resultant Value but Write 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 includes the current PDF documentation:
Help-with-an-EBO-2-0-component EcoStruxure-Building-Operation/Graphic-Component-Library-Rev-AB1-002-pdf This article provides the necessary steps required to enable and get these new components working and does not provide in-depth functionality. With the release of EBO 2.0, a set of new components/snippets have been released in the latest build which are different to those previously issued although visually there should be very little change for your customer. In summary, the scripting, in most cases but not all, has been removed from the components themselves and put into single scripts which then means we can take advantage of the global scripts functionality. This requires the user to set the UseGlobalScripts attribute to True within the TGML graphic editor, this can be a per graphic basis and ensures existing graphics still function. Once turned to True, all components that have scripts, and have requirements for other global scripts to function correctly, can indeed function as designed. For example, the setpoint box requires global scripts to ensure units and decimal places displayed as designed/required due to the scripts. There are also 2 binds available on the box, one for reading, one for write. Both need to be bound to enable the component to function correctly. The components are designed in this way to ensure use in BACnet where we may require to read the resultant Value but Write 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 includes the current PDF documentation: • https://exchangecommunity.schneider-electric.com/t5/EcoStruxure-Building-Operation/Help-with-an-EBO-2-0-component/m-p/107342 • https://exchangecommunity.schneider-electric.com/t5/EcoStruxure-Building-Operation/Graphic-Component-Library-Rev-AB1-002-pdf/td-p/149876 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 doing adding any components and ONLY once on each Graphic page.
Add Component by dragging it into the Design window Example showing the Component: Analogue Single Line Text, 100W
Add Snippets to allow the relevant Bindings to be added to this component. To do this:
Select Snippets tab, Select
Select Global Bind Snippets
Drag the appropriate snippet onto the Component. EcoStruxure Analog Value bind snippet is added to the Analogue Value 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 Note: The default binding name displayed
View the graphic page Example: Showing forced value
View full article