Proceed as follows to configure screen selection via the controller. At the end of this entry is a free download of a sample program.
||Create area pointer:|
In ProTool you create the area pointer "Job Mailbox".
The length of 4 words is preset.
||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 setting the separate parameters is available in the manual SIMATIC HMI Communication for Windows-based Systems, Appendix B, "PLC Jobs".
The manual is available in Entry ID 1405528.
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 the parameters must be entered first in the job mailbox and only then the job number.
||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).
- 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.
To better illustrate the function of PLC job 51 you can specify the "Picture number" in sample project and and start the PLC job via a button.
Specification of the "Picture 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.
Picture area "2":
In picture area "2" you specify the screen number that is to be called.
(The picture number is then shown in the second data word -> Parameter 2).
Picture area "3":
You start the job by pressing the "Start" button in picture area "3".
(After pressing the "Start" button, the PLC job with number "51" is shown briefly in the first data word -> job number).
The attached download contains the archived STEP 7 project and integrated ProTool project, along with the functions described above.
Attachment1: Project_1.zip ( 382 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.
Table 1: Creation environment of the download attached
||Product and version designation|
|PC operating system
||Microsoft Windows XP SP2|
||STEP 7 V5.3 SP3|
||ProTool V6.0 SP3|
||MP 370 Touch 12"|
||S7 CPU 316-2DP|