How do you configure screen selection on a line or graphics operator panel via controller job 51?
Proceed as follows to configure screen selection via the controller. At the end of this entry is a free download of a sample program.
|1||Create area pointer:|
In ProTool you create the area pointer "Interface Area".
The length of 16 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 setting the separate parameters is available in the manual SIMATIC HMI Communication, Appendix B, "PLC Jobs".
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.
FC1 coordinates the PLC job. DB51 is the interface block in this case. Using the marker 0.0 "Start_select_screen" you can trigger screen selection once
of "Screen 1" with a positive edge. The marker is reset by FC1.
The attached download contains the archived STEP 7 project and integrated ProTool project, along with the functions described above.
Attachment1: Project_1.zip ( 215 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.
|Component||Product and version designation|
|PC operating system||Microsoft Windows XP SP2|
|Standard tools||STEP 7 V5.3 SP3|
|HMI software||ProTool V6.0 SP3|
|HMI devices||OP17 / OP27|
|Controllers||S7 CPU 316-2DP|