How do you configure screen selection on a Windows-based operator panel with WinCC flexible via controller job 51?
Proceed as follows to configure screen selection via the controller. At the end of this description is a free download of a sample program.
|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.
|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.
Structure of PLC job 51:
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".
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).
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.
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.
Picture area "1":
Picture area "2":
Picture area "3":
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|
|HMI software||WinCC flexible 2005 SP1|
|HMI devices||MP 370 Touch|
|Controllers||S7 CPU 315-2DP|