WEBfactory 2010

Signal Group Section

The Signals section is visible when a signal group is selected in the Signals tree menu. The Signal Group view displays the signals (and their properties) belonging to the selected signal group. The signals are listed inside of the main panel's grid.

Capture1557.jpg

The grid columns represent the various signal properties (the properties can be edited in the grid):

UI Option

Description

Active

If checked, the signal is active in WEBfactory Server.

Signal Name

The name of the signal in WEBfactory Studio. The maximum length of the signal name (the maximum number of characters) is 256.

Connector Address

The name (address) of the signal in the OPC server. The maximum length of the connector address (the maximum number of characters) is 256.

Description

Optional signal description.

Write Groups

The write group to which the signal belongs.

Log User Activity

If checked, the user activity for this signal will be logged.

Factor X1

A real value of the PLC used to transform the signal value using a mathematical formula into a SCADA readable value Y1. The transformation is based on a XOY coordinate system and needs 4 values (X1, X2, Y1, Y1) to be applied.

Capture1753.jpg

Factor X2

A real value of the PLC used to transform the signal value using a mathematical formula into a SCADA readable value Y2. The transformation is based on a XOY coordinate system and needs 4 values (X1, X2, Y1, Y1) to be applied.

Factor Y1

The SCADA value of the X1 PLC value. The transformation is based on a XOY coordinate system and needs 4 values (X1, X2, Y1, Y1) to be applied.

Factor Y2

The SCADA value of the X2 PLC value. The transformation is based on a XOY coordinate system and needs 4 values (X1, X2, Y1, Y1) to be applied.

Hysteresis

Sets an absolute (0.5) or relative (3%) minimum variation value for signal value visualization. The change of value will be displayed when the minimum variation is reached.

Here, hysteresis refers to the difference between consecutive values of a signal. Only field-level signal values are taken into account.

Log Hysteresis

Sets an absolute (0.5) or relative ( 3%) minimum variation value which is used when logging data in Float or Real format. The Log Hysteresis value will be used when the log condition for that signal is set to On Change. The signal value will be logged when the minimum variation value is reached.

This option is useful when the OPC Server is sending values with many decimals. If the 9th decimal is changing, when the log condition is set to On Change, the new value will be logged. In this case, the difference might not be relevant to the user. Using Log Hysteresis, the user can define a value of minimum variation for the new value to be logged.

The Log Hysteresis value can be absolute or relative. If both static and relative values are specified (eg. 0.5 AND 3%), the new value will be logged only if the change of value is more than 0.5 AND 3% from the previous value.

Here, hysteresis refers to the difference between consecutive values of a signal. Only field-level signal values are taken into account.

Alarm Hysteresis

Sets an absolute (0.5) or relative (3%) minimum variation value for alarm triggering. The alarm associated with the signal will be triggered when the minimum variation is reached.

Here, hysteresis refers to the difference between consecutive values of a signal. Only field-level signal values are taken into account.

Maximum

Sets the maximum signal value for writing. If a value bigger than this limit is written, the maximum value will be sent to the control unit.

Minimum

Sets the minimum signal value for writing. If a value smaller than this limit is written, the minimum value will be sent to the control unit.

Unit

Optional measurement unit for the signal's value. If present, the unit can be used further in visualizations.

VChannel

Marks the signal as a virtual signal in WEBfactoryStudio.

The virtual signal is created via a virtual channel (VChannel). The channel’s input parameters are signal variables. When the virtual channel is created, you define its input parameters (signal variables). Furthermore, you can create several virtual channels and link them to one another.

The virtual signals can be used to manipulate the signal's value using VB scripts or to generate collective alarms.

VChannel Type

Sets the VChannel type to Script or Collective alarm.

VChannel Init Value

Sets a constant (named MyInitValue). When the system starts, the MyInitValue constant will be made available.

Data Type

Set the data type for the WriteSignal () function. Can be:

  • Default - Float, Integer or Boolean

  • String

Use Substitute Value

Enables the usage of the substitute values. If checked, a substitute value is used when the minimum value is not reached or the maximum value is exceeded.

Substitute Value

The value of the Substitute Value.

Assigned to Log(s)

Indicates if the signal is assigned to a log.

Assigned to Alarm(s)

Indicates if the signal is assigned to an alarm.

Discrete Value Type

The combining group of discrete values. The discrete values are used by WEBfactory Scheduler to manipulate a device depending on the hour of the day.

The Discrete Value Type containing several discrete values can be attached to a process signal (in the Signal list) so that WEBfactory Scheduler can assign the value of one of the Discrete Values inside the Discrete Value Type to the process signal when needed.

OPC enabled

Works in conjunction with the WEBfactory Server acting as an OPC server (usually the WEBfactory Server acts as an OPC client).

When this option is enabled, the signal value will be sent to the WEBfactory WCS OPC server, so other OPC clients can access the value from the WEBfactory Server like from an OPC server.

Tree menu actions (contextual menu)

Right-clicking on a Signal Group in the Signals tree menu will open the contextual menu. The Group contextual menu provides options such as adding or deleting signals, browsing the connectors for signals or exporting and importing signals.

Capture1558.jpg

UI Option

Description

Expand/Collapse

Expands/Collapses the clicked element. In the Group's case, the option is disabled because the Group cannot have any sub-items.

New Signal

Allows the user to add a new signal to the signal group.

Delete

Deletes the selected signal group.

Browse Connector

Opens the Browse Connector dialog, allowing the user to add the signals available to the connector to the Studio project.

Export Signals

Allows the user to export the signals belonging to the selected signal group to an XML file on the hard-drive.

Import Signals

Imports signals from an XML file to the selected signal group.

Signal Details

Toggles the Signal Details panel on or off.

Refresh

Reloads the signal list.

Main panel actions (contextual menu)

Right-clicking on a signal listed in the main panel while the a signal group is selected will open the contextual menu. The contextual menu allows the user to edit the cell from where the contextual menu was opened, manipulate signals (copy, move), create and delete signals and export or import signals.

Capture1559.jpg

UI Option

Description

Edit

Edits the content of the cell where the contextual menu was triggered.

Copy

Copies the selected signal(s) to clipboard, allowing the user to paste the clipboard content to another signal group.

Move Signals

Allows the user to move the selected signal(s) to another group on the same connector or on a different connector.

Capture1560.jpg

New Signal

Allows the user to create a new signal.

Delete

Deletes the selected signal(s).

Export Signals

Allows the user to export the selected signal(s) to an XML file on the hard-drive.

Import Signals

Imports signals from an XML file to the current signal group.

Signals Details

Toggles the Signal Details panel on or off.

Refresh

Reloads the signal list.

Signal Details panel

The Signal Details panel, located at the bottom of the main view, displays the complete set of signal properties. The same properties are available in the signals grid.

The Signal Details Panel section is structured as follows:

Signal Details Panel

The Signal Details panel, located at the bottom of the main view, displays the complete set of signal properties. The same properties are available in the signals grid. The Signals Details panel is split in two tabs: General, containing the general signal properties and VChannel, containing the virtual channels and scripts-related signal properties.

Capture2015.jpg

The General and VChannel tabs of the Signal Details panel

Any change applied in the Signal Details panel is applied only when the Save button is pressed.

General tab

The General tab contains the general signal properties. These properties can be found also in the signals grid.

UI Option

Description

Active

If checked, the signal is active in WEBfactory Server.

Signal name

The name of the signal in WEBfactory Studio.

Description

Optional signal description.

Connector address

The address of the signal in the OPC server.

Write group

The write group to which the signal belongs.

Discrete Value Type

The combining group of discrete values. The discrete values are used by WEBfactory Scheduler to manipulate a device depending on the hour of the day.

The Discrete Value Type containing several discrete values can be attached to a process signal (in the Signal list) so that WEBfactory Scheduler can assign the value of one of the Discrete Values inside the Discrete Value Type to the process signal when needed.

OPC enabled

Works in conjunction with the WEBfactory Server acting as an OPC server (usually the WEBfactory Server acts as an OPC client).

When this option is enabled, the signal value will be sent to the WEBfactory WCS OPC server, so other OPC clients can access the value from the WEBfactory Server like from an OPC server.

Log User Activity

If checked, the user activity for this signal will be logged.

Factor X1

A real value of the PLC used to transform the signal value using a mathematical formula into a SCADA readable value Y1. The transformation is based on a XOY coordinate system and needs 4 values (X1, X2, Y1, Y1) to be applied.

Capture1753.jpg

Factor X2

A real value of the PLC used to transform the signal value using a mathematical formula into a SCADA readable value Y2. The transformation is based on a XOY coordinate system and needs 4 values (X1, X2, Y1, Y1) to be applied.

Factor Y1

The SCADA value of the X1 PLC value. The transformation is based on a XOY coordinate system and needs 4 values (X1, X2, Y1, Y1) to be applied.

Factor Y2

The SCADA value of the X2 PLC value. The transformation is based on a XOY coordinate system and needs 4 values (X1, X2, Y1, Y1) to be applied.

Minimum

Sets the minimum signal value for writing. If a value smaller than this limit is written, the minimum value will be sent to the control unit.

Maximum

Sets the maximum signal value for writing. If a value bigger than this limit is written, the maximum value will be sent to the control unit.

Unit

Optional measurement unit for the signal's value. If present, the unit can be used further in visualizations.

Substitute value

Enables the usage of the substitute values. If checked, a substitute value is used when the minimum value is not reached or the maximum value is exceeded.

Hysteresis

Sets absolute or relative hysteresis value for signal visualization.

Here, hysteresis refers to the difference between consecutive signal values of a signal. Only field-level signal values are taken into account.

Log Hysteresis

Sets absolute or relative hysteresis value for logs.

Here, hysteresis refers to the difference between consecutive signal values of a signal. Only field-level signal values are taken into account.

Alarm Hysteresis

Sets absolute or relative hysteresis value for alarms.

Here, hysteresis refers to the difference between consecutive signal values of a signal. Only field-level signal values are taken into account.

Assigned to log(s)...

Notifies the user if the selected signal is assigned to any logs. Clicking on the link will open the logging panel.

Assigned to alarm(s)...

Notifies the user if the selected signal is assigned to any alarms. Clicking on the link will open the alarming panel.

VChannel tab

The VChannel tab allows the user to generate virtual signals in WEBfactoryStudio. The virtual signals can be used to create scripts for various tasks using different signal values or to generate collective alarms.

Learn more about WEBfactory 2010 Virtual Channels and Scripting here.

The virtual signals are created using VChannels (virtual channel). The VChannel's input parameters are the signal values. Several VChannels can be linked one to another.

Capture2026.jpg

The VChannel can be activated or deactivated using the Activate VChannel checkbox. The Calculation base of the VChannel can be either Script or Collective Alarm.

Script

The Script calculation base allows the user to define a VB script in the script editor using signal variables as input signals.

UI Option

Description

Initialization value

Sets a constant (named MyInitValue). When the system starts, the MyInitValue constant will be made available.

Data type

Set the data type for the WriteSignal () function. Can be:

  • Default: Float, Integer or Boolean

  • String

3000004.png

Input signal's index number. Input signals are referenced in the script by index numbers.

3000005.png

Move the input signal up in the list. The signal's index number changes.

3000006.png

Move the input signal down in the list. The signal's index number changes.

Add

Opens the Select Parameter window that allows the user to add signal as input signals.

Remove

Remove the selected input signal.

Signal value

Sets the starting signal value for the MySignalValue variable.

The MySignalValue variable is used to query the value of the virtual signal variable.

Result

The resulted value is calculated by testing the script and corresponds with the value of the VChannel at run time.

Execute

Runs the script.

3000007.png

Open the VChannel Library functions window and allows the user to add functions from the library to the script editor.

The script editor contextual menu gives the user quick access to Input Signals and Library Functions.

Collective Alarm

The Collective Alarms calculation base allow the user to integrate several alarms in a VChannel as a collective alarm. The value of the virtual signal at run time will be the number of active alarms from the Collective Alarms.

Capture2028.jpg

UI Option

Description

Signal Name

The name of the signal attached to the alarm.

Alarm Name

The name of the alarm.

Add

Opens the Collective Alarms window and allows the user to add alarms to the VChannel.

Remove

Removes the selected alarms.

Select Parameters Window

The Select Parameters window allows the user to add signal variables as input parameters in the VChannel scripts. The signals grid lists the available signals, displaying the Signal Name, Connector address and the OPC Enabled parameters of every available signal.

The user can select multiple signals to be added as input variables to the script calculation base of the VChannel by holding the Ctrl key and selecting the signals or toggle selections by using the Select All and Invert Selection buttons.

Capture2031.jpg
Filtering

The Select Parameters dialog supports filtering and the usage of wildcards.

Collective Alarms Window

The Collective Alarms window allows the user to select alarms and add them to the VChannel as collective alarms. The alarms are listed along with their Alarm Name and the name of the associated signal in the alarm grid.

Capture2029.jpg

Adding collective alarms

Tree view

The tree view allows the user to select different connectors and different alarms for adding them as collective alarms.

Multiple items can be selected by clicking on them while holding down the Ctrl key.

Filter

The user has the possibility to filter the alarms based on the columns form the main view and their values.

Virtual Channels and Scripting

WEBfactory 2010 allows the creation of virtual signals (VChannels) which are not loaded using any connector. Virtual signals can be used for different purposes – e.g. sum calculation of various entry signals, collective alarms generation

  • Scripts make possible the merging of different process variables, via simple calculation specifications, as well as complex processing of script functions.

  • Scripts are always carried out on WEBfactory 2010 server-side.

  • Library functions make the use of recurring script blocs easy and maintainable.

  • Using the ReadSignal and WriteSignal functions, scripts may access process variables.

Creating VChannels

VChannels are created and compiled in the WEBfactory 2010Studio. The procedure of adding VChannels is analogue to the adding of regular signals.

Capture2187.jpg
  1. VChannels are color-coded differently (blue), unlike regular signals.

  2. In order to handle a signal as VChannel, the Activate VChannel check box must be set.

VChannel Configuration

The image below explains the configuration of VChannels:

Capture1561.jpg
  1. Entry parameters (entry signals). Each time an parameter value changes, the script of the VChannel will be triggered.

  2. VChannel calculation script (VBScript).

  3. The script can be test run directly after the configuration.

VChannels calculation basis

The VChannels calculation basis can be one of the following:

  • Script

  • Collective alarm

Script

When using a script as a base of calculation, generally all possibilities of the WindowsScriptingHost can be used. Using VBScript script language both simple functions (e.g. reading and writing process variables and database access) as well as complex operations at the operative system level (e.g. WMI, FSO) are possible.

The maximum size of the script is 5000 characters.

Collective alarm

A collective alarm allows various alarms to be summarized. The virtual signal value will show at run time the amount of selected activated alarms.

Examples
Summing of two process values and subsequent output

Script:

Sub GetResult()
	Result = X("Setpoint 1") + X("Setpoint 2")
End Sub

The process signals Setpoint 1 and Setpoint 2 are defined as entry signals for this VChannel:

Capture1562.jpg

Entry parameters can be accessed by different syntaxes in the script: X(„SIGNAL NAME“) or X(INDEX NUMBER OF ENTRY ITEM) – e.g. X(1).

Writing to other process signals depending on the entry signal

Script:

Sub GetResult() 
If (X(1) > 0) Then
            WriteSignal "Setpoint 1", 1,"",""
            WriteSignal "Setpoint 2", 1,"",""
            WriteSignal "Setpoint 3", 1,"",""
            Result = 1
        Else
            WriteSignal "Setpoint 1", 0,"",""
            WriteSignal "Setpoint 2", 0,"",""
            WriteSignal "Setpoint 3", 0,"",""
            Result = 0
        End If
End Sub

ReadSignal and AckAlarm are other WEBfactory 2010 standard functions.

Database query and result output in the VChannel script

In the following example, the number of rows in the Signals table is returned.

Script:

Sub GetResult() 
    Set cn = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    cn.Open("Provider=SQLOLEDB.1;Persist Security Info=False; Data Source=(local)\WEBfactory2010;Initial Catalog=DemoProject;User Id=sa;Password=webfactory")
    rs.Open "SELECT COUNT(*) FROM Signals", cn
    Result = rs.Fields(0).value
    cn.Close()
End Sub
Use of script libraries

Especially in the case of recurring functions (e.g. conversions) it is advisable to store them in a VChannel library.

In the following example the temperature value is converted from Celsius to Fahrenheit:

Capture1569.jpg

The call-up of this function in the VChannel:

Sub GetResult() 
    Result = ConvertTemp(X(1))
End Sub
VChannel Library Functions Window

The VChannel Library Functions window allows the user to add functions from the library to the script editor. The functions are listed in the grid along with their Name, Description and Code properties.

Capture2032.jpg

Scripts Library

Function builder

Functions can be defined and stored in the library using the Function Builder.

WF_SE_935.jpg

UI Option

Description

Name

Displays the name of the function.

Description

The function's description.

Code

The code editor can define functions or subs.

Functions:

WF_SE_936.jpg

Subs:

WF_SE_937.jpg

Add

Adds the function to the library.

Delete

Deletes the selected function from the library.

Save

Saves the changes.

Close

Closes the function library.