Vai al contenuto

An example of standard properties

Supposing you wish to use a WB to represent information relating to temperature control in more than one zone it is assumed that:The necessary variables are defined with logical names and parameters. For example: ZONE1_REAL, ZONE1_SET, ZONE2_REAL, ZONE2_SET, etc.A WB is created for a single zone, containing the components required for its management. For example: two DataDisplay and a DataSet: An example of standard properties-image_0If you wish to reuse the WB for more than one temperature control zone, the “label” property of the DataDisplay and DataSet (which cannot directly contain “ZONE1_REAL” or “ZONE1_SET”) must be parametrized, so that these can be specified only when the WB is used on the page.To do this, simply create a standard property and assign any name you choose to it (for example “zone”): An example of standard properties-image_0After creating the standard property, this can be used within the WB, wherever a label name is required, enclosing the property within two “#” characters.In the case of a DataDisplay “label” property, “#zone#_REAL” needs to be indicated, while “#zone#_SET” is required for the DataSet.During its use in a page, the WB will present the new “zones” property, which can be customized differently for each WB added.Two WB will be sufficient for our example, specifying “ZONE1” in the “zones” property of the first and “ZONE2” in the “zones” property of the second.Note: this property can be used in the WB wherever a label is required:Component propertiesConditionActionsScriptWarning: when custom properties are used to customize local WB variables (PLC variables or local with “@” prefix. E.g.: “plc#local1#”, or ” refixstom properties are used to customize local variables u ogni istanza depositata.“@#local1#)”, used as temporary data inside scripts or conditions, please keep in mind that if the result string is shared among multiple WB instances, the variable is eventually the same variable, with shared value controlling all the WB that are using it.To avoid possible problems it’s necessary to add another standard property (e.g.: “counter”) allowing to specify a number (or a string) different among every used WB instance (the variables used will be created with composite names. E.g.: “@#local1#_#counter#”).