With the "Loop in Alarm" function, a single message is assigned a C function in Alarm Logging which serves to conduct a picture change or to call a faceplate in Runtime. WinCC uses the "OpenPicture()" standard function as the default picture function.
If your WinCC screen is split into header, footer and working areas by means of the "Basic Process Control" option and if only the picture in the working area is changed during a picture change (i.e. the header and footer areas remain the same), the original form of the standard "OpenPicture()" function is unsuitable for a picture change. The reason for this is that the "OpenPicture()" function performs a picture change for the whole WinCC screen as standard. The opened WinCC picture then fills the whole WinCC screen - the header and footer areas disappear.
The following figure shows the WinCC standard "OpenPicture()" function. It uses the internal WinCC "SetPictureName()" function to set the "picture name" property for a screen window. The "szPictureName" parameter (third parameter) contains the name of the picture. Since the "lpszPictureName" and "lpszObjectName" parameters (first and second parameters) are configured with "ZERO", the picture change is performed for the entire WinCC screen. This behavior also applies to the internal "SetPropChar()" function for setting the picture name for a screen window.
Adapt the "OpenPicture()" function in line with your requirements or create a separate picture change function. The picture change function which is specified in "Loop in Alarm" functionality (picture function) expects precisely one "char*"-type parameter and the types "unsigned char", "short int", "long int", "float", "double", "bool" or "void" as the return value.
- Using Basic Process Control functions for screen management
If you are working with Basic Process Control, you can use the "SSMRTChangeWorkField()" split screen manager.
- Using separate functions for screen management
If you are not using Basic Process Control for screen management, you generally have separate project or standard functions for screen management. Use one of these functions for "Loop In Alarm" functionality or adapt one of these functions.
The function which is configured for "Loop in Alarm" is only called in Runtime when the "Loop in Alarm" button in the alarm control is clicked if you have specified a precise string (picture name) in the "Picture name / Call parameter" input field. The function is not called if you have not specified a string or if you have specified multiple strings (i.e. the string contains spaces).
There is detailed information available in the WinCC Online Help under:
- "WinCC Information System > Working with WinCC > Setting Up an Alarm System > Configuring the Message System > Using Single Messages > Linking a Picture to a Single Message"x
- "WinCC Information System > Options > Options for Process Control > OS Project Editor > Split Screen Manager >The "Loop in Alarm" Function"