Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 24372078, Entry date: 01/08/2007

How do you configure screen selection on a Windows-based operator panel with WinCC flexible via controller job 51?

  • Entry
  • Associated product(s)

Proceed as follows to configure screen selection via the controller. At the end of this description is a free download of a sample program.

No. Procedure
1 Create area pointer:
In WinCC flexible you activate the "PLC job
(Project tree > Communication > Connections > "Area pointer" tab > PLC job) and define an address area in the PLC. The length of 4 words is preset.

Fig. 01
2 Structure of a PLC job:
A PLC job consists of 4 data words. The first data word contains the job number. Depending on the function, up to three parameters are transferred in data words 2 to 4. The figure below shows the principle structure.

Fig. 02

Structure of PLC job 51:

Fig. 03

Detailed information on the topic of area pointers and assigning the individual parameters is available in the manual "WinCC flexible Communication Part 1" in the section entitled "Communication with SIMATIC S7 controllers > Area pointer".
The manual is available in Entry ID 18797552.

3 Functional sequence:
If the first word of the job mailbox is not equal to zero, the operator panel evaluates the PLC job. The operator panel then resets that data word to zero. For this reason you first enter parameters 1 and 3 and then the job number "51". 
4 Sample program/Configuration instructions:
In the sample program attached we have used DB51.DBW0 with a length of 4 words as the area pointer.

Via the controller you enter the screen number to be called in the second data word of the job mailbox (DB51.DBW2).
If necessary, you can enter the relevant field number of the screen entry in the fourth data word of the job mailbox (DB51.DBW6). The advantage of specifying a field number is that you guide the operator directly to an object in the picture (e.g. input field or button).


  • You can specify the field number in the configuration via the "Tab Order" function (View > Tab Order).
  • To be able to select the "Tab Order" function there must be no object selected/marked previously in the project window.

Fig. 04

Enter the job number "51" in the first data word of the job mailbox (DB51.DBW0). Via this change in statement/value the operator panel evaluates the PLC job and the screen is changed on the operator panel.

Upon completion of the screen change the operator panel overwrites the first data word (DB51.DBW0) once again with zero.

A PLC job must not be called continuously. A PLC job should not be present usually for longer than two PLC cycles.

5 Program description:
In order to better illustrate the PLC job 51, you can specify the "Screen Number" and "Field Number" in the sample project.
You start the PLC job with the "Start" button.
The evaluation is made in FC51.

Specification of the "Screen Number", "Field Number" and "Start" of the PLC job are normally done in the PLC program.

Picture area "1":
Picture area "1" shows the structure of the PLC job again with the separate parameters. The specified values are displayed in the output fields. The value "51" in the "Job Number" field only visible at most for a short time (it is automatically reset to zero by the operator panel).

Picture area "2":
Picture area "2" shows three I/O fields configured in addition to better illustrate the "Field Number" parameter.
By specifying a field number (4 to 6), the focus is placed on the relevant I/O field after picture change.

Picture area "3":
Picture area "3" shows the parameters specified for screen number (1 to 3) and field number (1 to 6). You start the job by pressing the "Start" button.

Fig. 05

The attached download contains the archived STEP 7 project and integrated WinCC flexible project, along with the functions described above.

 Attachment1:  Project_1.zip ( 2973 KB )

Runnability and test environment:
The example can be used on all the CPU types of SIMATIC S7-300, S7-400 and WinAC.
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 STEP 7 V5.3 SP3
Engineering tools -
HMI software WinCC flexible 2005 SP1
HMI devices MP 370 Touch
Controllers S7 CPU 315-2DP