Integration into the User Program
4-20
C7-613 Control System
A5E00138934-03
4.5 FB “HMI API” for the Basic HMI Functions
Function
The “HMI API” FB contains the essential functions for running the HMI functions.
The FB “HMI API” has to be called cyclically or time-controlled in your program.
Generation
In SIMATIC Manager, open the “C7 613” library and copy the “HMI API” FB to the
block container of your project.
Structure and Description
The parameters of the “HMI API” FB are classified as follows:
• Parameters for specifying DB numbers: CFG_DB, EVENT_DB
• Status parameters that provide information about the status of the FB:
RETVAL, ADDINFO
• HMI parameters that are updated cyclically: LEDS, OBJ_TYPE, OBJ_NO,
KEYS
• Job compartment: JOB_ID, JOB_PAR1 to 3
Table 4-3 Parameters of the “HMI API” FB
Parameter
Declaration Data Type Memory
Area
Description
CFG_DB INPUT BLOCK_DB DB Number of the configuration DB
(CONFIG). This is the first DB with
configuration data (CONFIG,
SCREEN, MESSAGE, INFO)
EVENT_DB INPUT BLOCK_DB DB You can store the event buffer on
the MMC in this DB. The DB must
have been created beforehand
with a size of 6144 bytes.
(refer to Section 4.6.2).
0=no DB provided
LEDS INPUT DWORD M, D, L, E,
Const.
LED activation (see Section 4.5.1)
OBJ_TYPE OUTPUT BYTE M, D, L, A Type of object currently shown on
the display
1 = Process screen
2 = Message
3 = Info text
5 = Standard/special screen
OBJ_NO OUTPUT BYTE M, D, L, A Object number currently shown on
the display