show the entry list

Multi Panel -- Creating HMI configurations -- Remote access - tips and tricks for configuring  
How can you access tags of an operator panel using an Excel application with WinCC (TIA Portal)? 
OPC connection to a panel not possible with ProTool V6.0 SP1A  
Which settings do you have to make so that a ProTool project or WinCC flexible project can be transferred via TeleService Adapter IE? 
How do you use a key switch to lock/activate the call of specific screens? 
How do you temporarily lock multiple operator panels? 
How can you access tags of an operator panel using an Excel application with WinCC flexible 2008? 

How can you access tags of an operator panel using an Excel application with WinCC (TIA Portal)?Go to beginning
Part number:

Description
This FAQ response describes how with WinCC (TIA Portal) you can access the tags of an operator panel with an Excel application.

Instructions
WinCC flexible permits you to utilize the web service (SOAP). The web service (SOAP) is based on the Simple Object Access Protocol. This permits you to access the tags of an operator panel from an external application like Microsoft Excel, as in this example, over Ethernet.

Note
You can use all operator panels that support the "SOAP" web service.
 
No. Procedure
1

Setting in WinCC (TIA Portal)

  • Open the "Runtime settings" in the project navigation.
  • In the "Runtime settings" window you select the "Services" item.
  • Under "Read/write tags" you enable the
    "Web service SOAP" option.


Fig. 01

Note
You do not need a license for the SOAP web service.

2 Settings on the Operator Panel  

Establish Ethernet connection
Assign an IP address to the operator panel. For this you open the menu by going to
"Control Panel > Network and Dial-up Connections > SOC1 Ethernet Driver >
IP Address".

How to integrate an operator panel in a local network is described in Entry ID: 13336639

3 Setting in the Excel template
The figure below shows the opened Excel template.


Fig. 02

  1. Specifying the IP address
    Enter the IP address of the operator panel in the "B1" cell.
    In this example "172.16.34.200". 
     
  2. Reading out tags from or writing tags to the HMI operator panel:

Column "A" (Description)
In the "A" column under the "Description" header you can enter a description for the tags used.

Column "B" (Tag Name)
In the "B" column under the "Tag Name" header you enter the names of the HMI tags which are to be read out or written. Here you must pay attention to how the tags used are written (uppercase and lowercase, etc.).

Column "C" (Value)
In column "C" under the "Value" header is the value of the HMI tag read out or the value with which the HMI tag is to be written.

Column "D" (Read/Write)

Case 1: Write HMI tag (W)
If the HMI tag in column "C" is to be written, you enter the letter "W" in cell next to it in column "D".

Case 2: Read HMI tag
If the HMI tag in column "C" is to be read, you enter the letter "R" in cell next to it in column "D".

Column "E" (Status)
Column "E" shows the execution status (done/fault).
The status "fault" is output when, for example, the specified "Tag Name" is not in cell "B7".
Note
There is no further evaluation of possible "operating errors" or "wrong entries". The script saved can be changed accordingly as required.

  1. Buttons

"Update Data"
The "Update Data" button is used to update the tags in the Excel list.

"Info De / Info En"
You use the "Info De" (information in German) and "Info En" (information in English) to have an "Info page" displayed in the corresponding language. The info page gives a brief description of the handling in the Excel table.

  1. Operating option
    The Excel template enables up to 500 tags to be read out automatically. If an HMI tag is not to be read out or written, then you remove the relevant entry from column "D" (Read/Write).

Note
The Excel template "SOAP_Excel_Template.xls" includes a script.
You can open this script in the Excel editor under "Tools > Macro > Visual Basic Editor" and edit it accordingly.

4 Editing the Excel template
This FAQ response provides an Excel template ready for downloading. You can use this Excel template immediately without having to make any major changes.

If required, you can change the Excel template to your specifications. The Excel template attached includes a script. This script is used to read out/transfer values from/to the operator panel using predefined fields.

Extending the script
The specifications below refer always to the point from which they are called. The specification is always in this form "Z 57, S 36", for example. This specification is in the menu header if the Microsoft Visual Basic Editor is open.


Fig. 03

Open the script editor
Open the view for "Visual Basic" via the Excel menu bar.
"View > Toolbars > Visual Basic" (Excel 2003).

SOAP connection
You do not have to make any changes to the settings here.

Changing the user name / password (if necessary)
You must change the user name used and the password at two places.
- Z 57, S 36
- Z 96, S 36

Changing the input field for the IP address
The cell specification is done in the script at the places below.
This cell is queried at two places in the script.
- Z 43, S 19
- Z 81, S 19

Changing the specification for the cell of the HMI tag
The cell specification is done in the script at the places below.
Cell specification:   - Z 129, S 15
Column specification: - Z 135, S 39 

Evaluating "Read/Write" of the HMI tags
The evaluation is done in the script for...
Read: - Z 135, S 9
Write: - Z 161, S 9 

Max. number of HMI tags
The maximum number of tags to be read out is specified in the script at the following place: - Z 185, S 37 

Note
You can test the changes made immediately after saving in the Visual Basic Editor. This does not have to be closed for this.

5 Notes on HMI configuration
You call the configured HMI picture with the tags with the project tree under
"Pictures > 001_Application > Topic_001.1".

In Runtime you call the HMI picture under
"Sample application > Overview > SOAP".

Table 01

Note on security
Caution
The functions and solutions described in this article confine themselves predominantly to the realization of the automation task. Furthermore, please take into account that corresponding protective measures have to be taken in the context of Industrial Security when connecting your equipment to other parts of the plant, the enterprise network or the internet. More information is available in Entry ID: 50203404.

Download

  • Attachment 1:
    Attachment 1 includes the Excel template with the necessary settings for data exchange between the Comfort Panel and the Excel template over SOAP.
  • Attachment 2:
    Attachment 2 includes a TP1200 Comfort Panel configuration. By means of the configured picture you can use SOAP to access the tags stored in the Excel template.

Attachment 1: Excel_Template_SOAP.zip ( 29 KB )

Attachment 2: WinCC_SOAP_Connection_CODE.zip  ( 7383 KB )

Creation environment
HMI configuration:                WinCC Advanced V11 SP2 Update 5
Windows operating system:   Microsoft Windows XP SP3, Microsoft Windows 7
Excel version:                        Microsoft Excel 2003; Microsoft Excel 2010

Additional Keywords
SOAP connection, HMI Panel, HMI operator panel, Word, Table, Data exchange, Remote access

OPC connection to a panel not possible with ProTool V6.0 SP1A Go to beginning
Part number:

QUESTION:
Is it possible to establish an OPC connection to a panel with ProTool V6.0 SP1A?

ANSWER:  
No. An OPC connection with a panel is not possible since there is no DCOM interface implemented on the WinCE. 

However, an OPC connection is possible with a PC serving as control and monitoring station and ProTool/Pro V6.0 SP1A.

Which settings do you have to make so that a ProTool project or WinCC flexible project can be transferred via TeleService Adapter IE?Go to beginning
Part number:

Using the TS Adapter IE:
Using the TS Adapter IE (TSA-IE), you can transfer the configuration of a panel or PC connected to an Ethernet network via the telephone network.


Fig. 01

Settings of the TS Adapter IE
The example below shows the settings to be made on the TS Adapter IE in order to transfer a configuration from your local computer to a panel or Runtime PC.
 
No. Procedure
1 Open "Options" dialog
For project transfer via the telephone network and the TS Adapter IE (TSA-IE) in an Ethernet network, you must parameterize the integrated firewall of the TS adapter.
  • Start the TeleService program.
  • In TeleService, you open the dialog "Options > Administrate TS Adapter IE...".


Fig. 02

2 Enable protocols
The relevant protocols for incoming and outgoing calls must be enabled. Below is an explanation of the settings required for incoming calls. The settings for outgoing calls are to be made in the same way.
  • Enable the necessary protocols for transfer in the firewall settings of the TS Adapter.
  • Click on the "Save settings" button.


Fig. 03

3 Enable ICMP
The ICMP (Internet Control Message Protocol) allows the TS Adapter IE to access IP addresses in the Ethernet network.
  • Switch to the "Internet protocols" tab.
  • Enable the ICMP protocol.
  • Click on the "Save settings" button.


Fig. 04

4 Configure port release
In Expert mode the ports via which the configuration is transferred must be allowed in the firewall of the TS Adapter. Normally, the transfer is via Port 2308 or alternatively via Port 50523.
  • Switch to the "Expert mode" tab.
  • Release Ports 2308 and 50523 in the settings mask.
    Note:
    If you have an active firewall, you must release the following ports as well for the Internet services given below:
     
    Internet service

    Port

    MiniWeb 80
    Remote Control via Internet Explorer 5800
    Remote Control via Sm@rtClient 5900

    Other ports used by WinCC flexible are listed in Entry ID 24534065.

  • Save the setting made before you quit the settings mask.


Fig. 05

5 Settings for the outgoing calls
  • Now make the aforementioned settings for the outgoing calls too.

    Finally, the firewall of the TS Adapter IE is configured so that a transfer can be made by ProTool or WinCC flexible.

Keywords:
Operator panel, Panel

How do you use a key switch to lock/activate the call of specific screens?Go to beginning
Part number:

Description:
Operation of the controller via the operator panel can be released/locked not only via the user administration, but also using a key switch. This entry shows you one way to lock/activate access to specific screens using a key switch. This can be an external key switch that is connected to an ET200S, for example, or using a Mobile Panel with integrated key switch - see Fig. 01.

Contents:

  1. How to lock operation with key switch
  2. Programming in STEP 7
    2.1 Structure of the STEP 7 program
    2.2 Programming automatic screen selection
    2.3 Special feature of integrated key switch on Mobile Panel
    2.4 Data blocks used
  3. Configuring in WinCC flexible
    3.1 Configuring with external key switch
    3.2 Configuring a Mobile Panel with integrated key switch
    3.3 Parameterizing WinCC flexible Runtime
  4. Download


Fig. 01

Note:
As an alternative, you can also make the connection with the Industrial Ethernet.

Links:

  • Information about locking multiple operator panels
    Entry ID: 32967536
  • Information on user logon with chip card and card reader via RFID
    Entry ID: 26481978

1. How to lock operation with key switch
The operation lock in this example depends on the current position of the key switch and the screen that is open. If you call a released screen on the operator panel and then operate the key switch again, then the screen called is locked again. The locking can be realized by the deactivation of the separate objects in all the relevant screens or by the automatic screen selection for a screen that is not locked.
Object-related locking is implemented in the Start screen of the WinCC flexible project by deactivating the buttons.
This is also included in the sample project to demonstrate the automatic screen selection option. The screens to be locked are stored in a data block with a screen number. The screen numbers stored are compared with the current screen number. If the current screen number is stored in the data block and you operate the key switch again to lock operation, this starts the automatic screen selection.

2. Programming in STEP 7
Special features of the system must be taken into account when evaluating the position of the key switch integrated in the Mobile Panel. The external key switch is only simulated in this example. In a real system, you just have to replace the relevant parameter with the parameter of the (distributed) I/O (for example, E22.0).

2.1 Structure of the STEP 7 program
All the screens to be locked are stored in a matrix or data block. If operation is locked with the key switch, the basic screen is called automatically via the controller by a PLC job.

Large plants are usually divided into function groups. Similar to the entry dealing with "Locking multiple control panels" (see Entry ID: 32967536) the matrix is used as shown in Table 01.
 

Function group

Screen

01 02 03 04 05 06 07 08 09 10
FG 00 1 - - - - - - - - -
FG 01 10 11 - - - - - - - -
: : : : : : : : : : :
FG 10 - - - - - - - - - -
Table 01

Figure 02 outlines the basic program for locking operation with the key switch.


Fig. 02

2.2 Programming automatic screen selection
Automatic screen selection can be used instead of object-related locking. The function or function module FC 502 must be called and parameterized appropriately for each operator panel.

Description of function FC 502
The function module FC502 "** ActivateScreen" does the automatic screen selection after release is locked via the key switch. Release via the key switch is transferred to the function module by the "Unlock" parameter. If the screen currently displayed on the operator panel is stored with the corresponding screen number in data block "DB500" and released is locked through the key switch, then the screen specified in the parameter "StartScreen" is selected automatically. The external parameterization is done primarily with data blocks DB501 "DB_AreaPointerScreenNo", DB502 "DB_AreaPointerJobMailbox" and DB505 "DB_Unlock".


Fig. 03
 
Parameter Data type Interface Description
ActiveScreenNumber Word INPUT Current screen number of operator panel
Unlock Boolean INPUT Release via key switch
StartScreen Word INPUT Target screen with automatic screen selection
ScreenDB Any INPUT List of lockable screen numbers
Release Boolean OUTPUT Release via key switch
AP_JobMailbox Pointer INOUT Area pointer of controller job
StartsJob Boolean INOUT Start of controller job
JobActive Boolean INOUT Controller job is active
LoopCounter Word INOUT Loop counter
Table 02 - Parameters of FC 502 "** ActivateScreen"

2.3 Special feature of integrated key switch on Mobile Panel
The system permits the Mobile Panel to be disconnected from the interface box. Undocking must be taken into account in the STEP 7 program to ensure that the key switch position is not inconsistent in the control program.

In addition to function module FC 502 for automatic screen selection you also need function module FC 503 in the Mobile Panel. Function module FC 503 evaluates the current key switch position.

Description of function FC 503
The function module FC 503 "** Keyswitch MobilePanel" cyclically updates the key switch position on the Mobile Panel. The toggling life bit of the operator panel is used for updating and is transferred in the "AuxiliaryTag" parameter. The operator panel's life bit transferred by the controller's "Coordination" area pointer and must be specified in the "Coordination" parameter. The "Keyswitch_PLC" parameter gives the operator panel's current key switch position.
 

Key switch position

Position Process value
Center 0
Left 1
Right 2
Table 03 - Key switch positions of the Mobile Panel "Keyswitch_PLC"

The operator panel's life bit is monitored by both timers. If the life bit does not change within two seconds, the key switch position is set to invalid and the "Unlock" parameter is reset. External parameterization is done primarily with data block DB505 "DB_Unlock".


Fig. 04
 
Parameter

Data type

Interface Description
Timer_Low Timer INPUT Timer for evaluation of the life bit by the operator panel (Low and High signal)
Timer_High Timer INPUT
WatchDogTime S5Time INPUT Monitoring time of life bit
Valid Boolean OUTPUT Key switch position is valid
Unlock Boolean OUTPUT Release via integrated key switch
Coordination Word INOUT "Coordination" area pointer of HMI
AuxiliaryTag Int INOUT Update of the key switch position
Keyswitch_PLC Int INOUT Key switch position
Table 04 - Parameters of FC 503 "** Keyswitch MobilePanel"

2.4 Data blocks used
The following data blocks are used in this sample project:
 
Data block
Number Name Description
DB8 DB_Coordination DB for the HMI area pointer "Coordination"
DB500 DB_FunctionGroups DB contains the matrix for the screen numbers to be locked
DB501 DB_AreaPointerScreenNo DB for the HMI area pointer "Screen Number"
DB502 DB_AreaPointerJobMailbox DB for the HMI area pointer "Controller job"
DB505 DB_Unlock DB for operation locking and automatic screen selection
Table 05 - Data blocks used in STEP 7

3. Configuring in WinCC flexible
On a station operator panel, the external key switch is simulated by a button on the operator panel. When using the integrated key switch on the Mobile Panel, you must configure this explicitly on the operator panel.

3.1 Configuring with external key switch
The minimum configuration of WinCC flexible is described here.
 

No.

Procedure
1 Start WinCC flexible
  • Open or start WinCC flexible ES.
  • Mark the MP277, for example, and click on "OK".


Fig. 05

2 Add screens
  • Change the screen's name from "Screen_1" to "100_StartScreen" and change the screen number to "100".
  • In the project tree, create two folders under "Screens" and name them "FG00" and "FG01".
  • Add the screen "001_FG00_General" with screen number1" to the screen folder "FG00".
  • In screen folder "FG01" you create the screens "010_FG01" and "011_FG01" with screen numbers "10" and "11" respectively.


Fig. 06

3 Add libraries
  • Download the WinCC flexible library "ConfigScreen.wlf", that is available at the end of this entry under Download.
  • In the "Tools" window you right-click under the "Library" category to open the pop-up menu.
  • In the pop-up menu you click on "Library... > Open".
  • Then select the "ConfigScreen.wlf" library.


Fig. 07

4 Add screens from library
  • Use drag-and-drop to add the "Config" screen folder to the screens in the project tree.


Fig. 08

5 Add buttons
  • Add four buttons and arrange them as shown in Fig. 09.
  • Label the buttons as follows:

    "FG00"
    "FG01"
    "Config"
    "Terminate RT"


Fig. 09

6 Add system functions
  • Link the following system functions to the buttons under the "Press" event:
     
    No. Button System function
    1 "FG00" Activate screen
    -Screen name:
    -Object name:
    "FG00\001_FG00_General"
    0
    2 "FG01" Activate screen
    -Screen name:
    -Object name:
    "FG01\010_FG01"
    0
    3 "Config" Activate screen
    -Screen name:
    -Object name:
    "Config\500_Param"
    0
    4 "Terminate RT" Stop Runtime
    -Mode: "Runtime"


Fig. 10

7 Configure connection
  • In the project tree, click on "Communication > Connections".
  • Select the communication driver "SIMATIC S7 300/400".
  • Configure the appropriate connection parameters.


Fig. 11

8 Create area pointer
  • Click on the "Area pointer" tab in "Connections".
  • Create the area pointer "Screen number" and assign the corresponding address ("DB501.DBW0" in the first panel).

    Note:
    The tag address specified refers to the first panel. If you are using multiple panels, then the address must be changed accordingly - see DB501 in the STEP 7 project.
     
  • Activate the "Controller job" area pointer and assign the corresponding address ("DB502.DBW0" in the first panel).

    Note:
    The tag address specified refers to the first panel. If you are using multiple panels, then the address must be changed accordingly - see DB502 in the STEP 7 project.


Fig. 12

9 Create tags
  • Create the three following tags in the tag editor:
     

    No.

    Tag Address
    1 "DB_Unlock.Panel_01.Unlock_Release" DB505.DBX0.1
    2 "DB_Unlock.Panel_01.Unlock_Key" DB505.DBX0.0

    Note:
    The tag addresses specified refer to the first panel. If you are using multiple panels, then the address must be changed accordingly - see DB505 in the STEP 7 project.


Fig. 13

10 Connect tags
  • Activate the animations listed for the "FG00" and "FG01" buttons:
     
    No.

    Button

    Animation
    1 "FG00" Layout
    -Tag:
    -Value 0:
    -Value 1:
    "DB_Unlock.Panel_01.Unlock_Release"
    Foreground: gray
    Foreground: black
    Operability
    -Tag:
    -Status:
    -Area:
    "DB_Unlock.Panel_01.Unlock_Release"
    Activated
    from "1" to "1"
    2 "FG01" Layout
    -Tag:
    -Value 0:
    -Value 1:
    "DB_Unlock.Panel_01.Unlock_Release"
    Foreground: gray
    Foreground: black
    Operability
    -Tag:
    -Status: 
    -Area:  
    "DB_Unlock.Panel_01.Unlock_Release"
    Activated
    from "1" to "1"


Fig. 14

11 Add key switch
In this example, the key switch is simulated as a visual switch by WinCC flexible.
  • Open "Template".
  • Add a "switch" to the "template".
  • Change type from "Switch" to "Switch with text".

    Note:
    Alternatively you can also insert a "Switch with graphics" - as in the sample project.
     
  • Label the buttons as follows:
     

    Value

    Label
    0 Closed
    1 Open
     
  • Link the "DB_Unlock.Panel_01.Unlock_Key" tag with the switch.


Fig. 15

3.2 Configuring a Mobile Panel with integrated key switch
Below is a description of how to configure the key switch on the Mobile Panel.
Configuring is based on the description in section "3.1 Configuring with external key switch".
 
No. Procedure
1 Open/create a Mobile Panel project
  • Start WinCC flexible.
  • Open or create a WinCC flexible project in a Mobile Panel - see also Figure 05.
2 Create tags
  • Open the Tag Editor of the WinCC flexible project.
  • Create the following tags:
     
    No. Tag

    Connection

    Data type

    Address
    1 Keyswitch_PLC External Int DB 505.DBW14
    2 AuxiliaryTag External Int DB505.DBW12
    3 Position_Keyswitch Internal Int -

    Note:
    In the case of integrated project, you can also use the symbolic connection. The symbolic connection matches the tag name to the symbolic name - see Fig. 16.


Fig. 16

3 Configure system functions
  • For the following tags, you configure the listed system functions for the "Value change" event - see also Fig. 16:
     
    No. Tag System function
    1 AuxiliaryTag SetValue
    -Tag:
    -Value:
    Keyswitch_PLC
    Position_Keyswitch
    2 Position_Keyswitch SetValue
    -Tag:
    -Value:
    Keyswitch_PLC
    Position_Keyswitch

    Note:
    The "Position_Keyswitch" tag gives the current key switch position.
    In order to have the key switch position updated cyclically in the controller via the "Keyswitch_PLC" tag, you must add the "SetValue" system function to the "Value change" event of the "AuxiliaryTag" tag.


Fig. 17

4 Connect tag to key switch
  • Open the template.
  • Click on the key switch and open the Properties window if required.
  • Connect the "Position_Keyswitch" tag.


Fig. 18

3.3 Parameterizing WinCC flexible Runtime
The corresponding screens must be stored in the data block for the automatic screen selection to be activated during Runtime.
 
No. Procedure
1 Start WinCC flexible Runtime
  • Transfer the project to the operator panel or start the WinCC flexible Runtime.
  • Press on the "Config" button.


Fig. 19

2 Parameterize operator panel
  • Enter the number of function groups, the number of operator panels and the number of the operator panel.
  • Then click the "Screens" button.


Fig. 20

3 Parameterize function groups
  • Enter screen number "1" in "FG00".
  • Enter screen numbers "10" and "11" in "FG01".
  • Then press "Back".
  • Press the "Basic screen" button - see Fig. 20.


Fig. 21

4 Unlock function groups
  • Operate the key switch or press the key (1) for simulation of the key switch to release the screens.
  • Press the "FG01" button (2).


Fig. 22

5 Lock function groups
  • Lock function groups again with the key switch or simulation switch.

    Note:
    If the screen number is entered in the data block and you have parameterized FC 502 accordingly, then the parameterized screen - the basic screen, for example - is selected by the automatic screen selection.
  • Terminate the WinCC flexible Runtime.


Fig. 23

4. Download
Attachment 1 contains the sample project described including the Mobile Panel 277 with integrated key switch and the stationary operator panel with simulation switch.

Attachment 1: WinCC_flexible_Keyswitch_Interlock.zip ( 4859 KB )

Attachment 2 contains the WinCC flexible library "ConfigScreen.wlf" with the two configuration screens.

Attachment 2: WinCC_flexible_Library_ConfigScreens.zip ( 983 KB )

Runnability and test environment:
The following table lists the components that have been used to create this entry and verify the functions described.
 
Components Product and version designation
PC operating system Microsoft Windows XP SP2
Standard tools -
Engineering tool STEP 7 V5.4 SP4
HMI software WinCC flexible 2007 HF4
HMI system MP 277 & Mobile Panel 277

Keywords:
Operation lock, Key, Lock

How do you temporarily lock multiple operator panels?Go to beginning
Part number:

Description:
In many plants, multiple operator panels are used. This makes it necessary to interlock these operator panels to ensure that the plant is not operated by several operators at the same time.

Contents:

  1. Using Sm@rtAccess
  2. Conventional method - user configuration
    2.1 How to lock operation in the sample project
    2.2 STEP 7 programming
          a) Structure of the STEP 7 program
          b) Description of function FC 501
        
    c) Description of function FC 500
    2.3 WinCC flexible configuration
          a) Changing the configuration
          b) Settings on operator panel (WinCC flexible Runtime)
  3. Download

Information on how to lock operation with a key switch is available in Entry ID: 32967530.

1. Using Sm@rtAccess
An operator panel that is configured as a Sm@rtServer can be remotely monitored or operated from another PC or operator panel as Sm@rtClient. The connection between Sm@rtClient and Sm@artServer is made exclusively in the Ethernet network. Communication between the S7 controller and the operator panel configured as Sm@rtServer must not necessarily be via Ethernet.


Fig. 01

Coordinated operator panels - see Fig. 01 - can be used for operating extensive or separated machines and plants. This permits the operator to operate and monitor the plant from different points. The operator sees exactly the same screen on each operator panel and configuration device. Operation locking is implemented by default in the Runtime option Sm@rtAccess. This ensures that you can only operate from one operator panel at a time.

Since there is only one single master configuration, changes to the configuration have to be made only once.

2. Conventional method - user configuration
In the conventional method, the logic for operation locking is in the controller. In this case, every operator panel accesses the S7 controller with an S7 connection via PROFIBUS or Ethernet, for example. The disadvantage of this method is that you have to configure each operator panel separately.


Fig. 02

This method can be used for operating extensive or separated machines and plants. There are many ways of programming operation locking. In this example, the configuration for each operator panel is identical except for the operation locking, because this has to be configured separately for each operator panel.

Large plants are usually divided into sections or function groups. This means that different parts of the plant can be operated in parallel by multiple operator panels. If multiple operator panels access the same part of the plant, then all the operator panels are locked except for the one first logged on. However, other parts of the plant can continue to be operated and monitored from the other operator panels.

2.1. How to lock operation in the sample project
The operation lock in this example depends on the screen currently open or the screen number currently being used. If tow operator panels transfer the same screen number to the controller, then one of these operator panels is locked for the function group. The operator on the locked operator panel can now only monitor the function group concerned.

Since different numbers of screens per function group are required depending on the plant, the number including the screen number can be specified individually in a matrix on the operator panel. In this example, you can specify up to ten screens per function group - see Table 01.
 

Function group

Screen

01 02 03 04 05 06 07 08 09 10
FG 00 1 - - - - - - - - -
FG 01 10 11 12 - - - - - - -
FG 02 20 21 - - - - - - - -
FG 03 31 - - - - - - - - -
Table 01

The operation lock is explained taking the example of a bottle washing and sorting machine.

Note:
The separated processes are only sketched out in the example!

The sample project is divided into the following plant parts and function groups:
 

No.

Function group Plant part

Screen number

1 FG 00 Complete plant 1
2 FG 01 Bottle removal 10-12
3 FG 02 Bottle washing 20-21
4 FG 03 Bottle sorting 30
Table 02

2.2 STEP 7 programming
The sample project is configured for ten operator panels and ten function groups. Operation locking is contained in function blocks FC510 and FC511 with function modules FC500 and FC501.

a) Structure of the STEP 7 program
The conventional process sequence of the individual function groups for the plant or machine is implemented in the functions provided for it (FC10, FC20 and FC30). The call is the same as for operation locking in OB1.

Note:
If not more than ten operator panels and not more than ten screens per function group are required, then you do not have to change anything in the STEP 7 program with regard to operation locking.


Fig. 03

b) Description of function FC 501
Function module FC501 "** Interlock Reset" is for resetting the current screen number of the operator panel as soon as communication between controller and operator panel is interrupted. This prevents that operator panel from continuing to lock a function group. To verify this, the operator panel's life bit that is transferred by the "Coordination" area pointer is evaluated. The reset is performed when the life bit remains unchanged after a specified span of time. FC501 is called in FC511 "General iReset" - see Fig. 03.


Fig. 04
 
Parameter Data type Interface Description
T_High Timer INPUT Timer for evaluation of the life bit by the operator panel (Low and High signal)
T_Low Timer INPUT
WatchDogTime S5Time INPUT Time for both timers
Coordination Word INPUT Coordination area pointer
ScreenNo Word INOUT Current screen number of operator panel
Table 03

c) Description of function FC 500
Function module FC500 "** Interlock Screens" is needed once for each function group and manages locking for this function group. The function module compares the current screen number of each operator panel (maximum of ten operator panels) with the entered screen number in data block DB500 for this function group. If the function group is not blocked by another operator panel, the operation is released for this operator panel.


Fig. 05
 
Parameter Data type Interface Description
ActScreenOP Pointer INPUT Current screen number of operator panel
ScreenFG Pointer INPUT Released screen numbers for the function group
Panel_release_FG Pointer INPUT Release or locking of panels for this function group
FG_inUseOf Int INOUT Function group is used by following panel
Table 04

2.3 WinCC flexible configuration
In principle, you must configure locking for each operator panel. For this you need to make changes in both the configuration and Runtime.

a) Changing the configuration
In order to be able to release a function group for a panel, you must change the area pointers "Coordination" and "Screen number" according to the panel number.

The following data blocks are used for both area pointers in the sample project:
 
Area pointers DB no. Name of data block
Coordination DB8 "DB_Coordination"
Screen number DB501 "DB_AreaPointerScreenNo"
Table 05


Fig. 06

The following tags must be changed according to the panel number in each WinCC flexible project:
 
No. Tags Details
1 Name "DB_FunctionGroups.general.Panel_No[x-1]"
Path ...\Tags\FG\
Purpose Screen number  Screen name
500 "500_Param"
Connection Object Connection
IO field for "Panel No." Tag for IO field
No. Tags Details
2 Name "DB_FunctionGroups.general.Panel_x_release_FG[y]"
Path ...\Tags\
Purpose Screen number  Screen name
01 "001_FG00_General"
10-12 "01z_FG01"
20-22 "02z_FG02"
30-32 "03z_FG03"
Connection Object Connection

IO field for "Release"

Tag for IO field

Button for "On"

Tags in Properties under:
  • "Animations > Appearance"
  • "Animations > Enable Object"
Button for "Off" Tags in Properties under:
  • "Animations > Appearance"
  • "Animations > Enable Object"
Table 06

Key:
x = Panel number 
y = Function group
z = Sequence number


Fig. 07

The following properties must be changed according to the panel number:
 
Object Property Purpose
Symbolic IO field Animations > Appearance All screens of the function groups
Table 07


Fig. 08

b) Settings on operator panel (WinCC flexible Runtime)
On the operator panel you must enter the locking data in screen "500_Param" - see Fig. 09 - and in screen "501_Release" - see Fig. 10.

You must enter the following data in screen "500_Param":

  • Number of function groups
  • Number of operator panels
  • Panel number 

Click on the "Config" button in the basic screen.

Note:
Note that the tag "DB_FunctionGroups.general.Panel_No[x-1]" must be connected to the IO field "Panel no." as in Table 06 for No. 1 according to the panel number.


Fig. 09

The separate screen numbers that are used in the function groups concerned must be stored for the various function groups.

For this, in screen "500_Param" - see Fig. 09 - you click on the "Screens" button.

All the screens of the function groups are entered in screen "501_Release" - see Fig. 10. Screens not entered in this matrix are not released when selected in Runtime for this function group. Although you can use screen numbers from 1 to 32767 in WinCC flexible, only screen numbers 1 to 999 are possible in this configuration, because the IO fields are limited to three digits.


Fig. 10

Note:
In this configuration, there is one screen matrix for all operator panels. You can extend the configuration so that a separate screen matrix is stored in one or multiple data blocks for each operator panel. The advantage here is that you can lock operation of specific function groups in individual operator panels, for example, where visual contact to specific parts of a plant or function groups is restricted or non-existent. In this configuration, you can prevent selection of the function group by removing the corresponding button.

3. Download
Attachment 1 contains the sample project described with three WinCC flexible operator panels.

Attachment 1: WinCC_flexible_Interlock.zip ( 7910 KB )

Runnability and test environment:
The following table lists the components that have been used to create this entry and verify the functions described.
 
Components Product and version designation
PC operating system Microsoft Windows XP SP2
Standard tools -
Engineering tool STEP 7 V5.4 SP4
HMI software WinCC flexible 2007 HF4
HMI system MP 277 & MP377 & PC Runtime

Keywords:
Remote access

How can you access tags of an operator panel using an Excel application with WinCC flexible 2008?Go to beginning
Part number:

This FAQ response describes how you can access the tags of an operator panel with an Excel application.

Instructions
WinCC flexible permits you to utilize the web service (SOAP). The web service (SOAP) is based on the Simple Object Access Protocol. This permits you to access the tags of an operator panel from an external application like Excel over Ethernet.

The following example was created for an MP 277 Touch. Any other operator panel that supports the SOAP function can be used.

Test environment
Microsoft Excel 2003; Microsoft Excel 2007, Microsoft Excel 2010
Microsoft Windows XP SP3, Microsoft Windows 7

Excel template:

Attachment 1: SOAP_Excel_Template.zip ( 32 KB )

WinCC flexible 2008 SP3 Project
The project includes a picture with tags as well as the required device settings.

Attachment 2: Project_MP277_SOAP.zip ( 2209 KB )  
 
No. Procedure
1

Setting in the WinCC flexible configuration
In the Project Manager under "Device Settings > Device Settings > Runtime services" you check the check box Sm@rtAccess: Web service (SOAP).


Fig. 01

Note
Required license: WinCC flexible / Sm@rtAccess for Panel

2 Settings on the Operator Panel  

Establish Ethernet connection
Assign an IP address to the operator panel. For this you open the menu by going to
"Control Panel > Network and Dial-up Connections > ERTEC400 > IP Address".

How to integrate an operator panel in a local network is described in Entry ID: 13336639

3 Setting in the Excel template
The figure below shows the opened Excel template.


Fig. 02

  1. Specifying the IP address
    Enter the IP address of the operator panel in the "B1" cell.
    In this example "172.16.34.200". 
     
  2. Reading out tags from or writing tags to the HMI operator panel:

Column "A" (Description)
In the "A" column under the "Description" header you can enter a description for the tags used.

Column "B" (Tag Name)
In the "B" column under the "Tag Name" header you enter the names of the HMI tags which are to be read out or written. Refer here to the more detailed information given in table section "4" below.

Column "C" (Value)
In column "C" under the "Value" header is the value of the HMI tag read out or the value with which the HMI tag is to be written.

Column "D" (Read/Write)

Case 1: Write HMI tag (W)
If the HMI tag in column "C" is to be written, you enter the letter "W" in cell next to it in column "D".

Case 2: Read HMI tag
If the HMI tag in column "C" is to be read, you enter the letter "R" in cell next to it in column "D".

Column "E" (Status)
Column "E" shows the execution status (done/fault).
The status "fault" is output when, for example, the specified "Tag Name" is not in cell "B7".
Note
There is no further evaluation of possible "operating errors" or "wrong entries". The script saved can be changed accordingly as required.

  1. Buttons

"Update Data"
The "Update Data" button is used to update the tags in the Excel list.

"Info De / Info En"
You use the "Info De" (information in German) and "Info En" (information in English) to have an "Info page" displayed in the corresponding language. The info page gives a brief description of the handling in the Excel table.

  1. Operating option
    The Excel template enables up to 500 tags to be read out automatically. If an HMI tag is not to be read out or written, then you remove the relevant entry from column "D" (Read/Write).

Note
The Excel template "SOAP_Excel_Template.xls" includes a script.
You can open this script in the Excel editor under "Tools > Macro > Visual Basic Editor" and edit it accordingly.

4 Special case when the HMI tags are in a subfolder
If the tags are created in a "subfolder" in the WinCC flexible configuration, you must put the name of the folder containing the HMI tags first in column "B" (Tag Name").

Note the syntax below for this.

Case 1: Write HMI tag (W)

HMI tags are directly in the main folder.
- Enter only the name of the HMI tag in column "B".

Case 2: Read HMI tag (R)

HMI are directly in the main folder.
- Enter only the name of the HMI tag in column "B".

Case 3: Write HMI tag (W)

HMI tags are in a subfolder.
- In column "B" you enter the name of the HMI tag including the subfolder.
Syntax: subfolder name\tag name
(subfolder name and tag name are separated by one backslash).

Case 4: Read HMI tag (R)

HMI tags are in a subfolder.
- In column "B" you enter the name of the HMI tag including the subfolder.
Syntax: subfolder name\\tag name
(subfolder name and tag name are separated by two backslashes).

5 Editing the Excel template
This FAQ response provides an Excel template ready for downloading. You can use this Excel template immediately without having to make any major changes.

If required, you can change the Excel template to your specifications. The Excel template attached includes a script. This script is used to read out/transfer values from/to the operator panel using predefined fields.

Extending the script
The specifications below refer always to the point from which they are called. The specification is always in this form "Z 57, S 36", for example. This specification is in the menu header if the Microsoft Visual Basic Editor is open.


Fig. 03

Opening the script editor
Open the view for "Visual Basic" using the Excel menu bar:
"View > Toolbars > Visual Basic" (Excel 2003).

SOAP connection
You do not have to make any changes to the settings here.

Changing the user name / password (if necessary)
You must change the user name used and the password at two places.
- Z 57, S 36
- Z 96, S 36

Changing the input field for the IP address
The cell specification is done in the script at the places below.
This cell is queried at two places in the script.
- Z 43, S 19
- Z 81, S 19

Changing the specification for the cell of the HMI tag
The cell specification is done in the script at the places below.
Cell specification:   - Z 129, S 15
Column specification: - Z 135, S 39 

Evaluating "Read/Write" of the HMI tags
The evaluation is done in the script at the places below.
Read: - Z 135, S 9
Write: - Z 161, S 9 

Max. number of HMI tags
The maximum number of tags is specified in the script at the place below.
- Z 185, S 37 

Note
You can test the changes made immediately after saving in the Visual Basic Editor. This does not have to be closed for this.

Note
More information is available in the manual "WinCC flexible Getting Started Options" in Entry ID: 18657078.

Addition Keywords
SOAP connection, HMI Panel, HMI operator panel, Word, Table, Data exchange, Remote access

 Entry ID:35915067   Date:2013-04-09 
I regard this article....as helpfulas not helpful                                 






























related links
Which settings do you have to mak ...
What are the options for using th ...
DP direct keys are disabled with ...
TS Adapter IE
STEP 7 Professional V11.0 SP1
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Help
Online Help
Guided Tour