Technical data

Table Of Contents
Generating Block-Related Messages
System Software for S7-300/400 System and Standard Functions - Volume 2/2
24-22
A5E00739858-01
24.9 Enabling Block-Related, Symbol-Related, and Group
Status Messages with SFC 9 "EN_MSG"
Description
With SFC 9 "EN_MSG" (enable message), you can enable block-related, symbol-
related and group status messages that were previously disabled. You disabled the
messages either at a display device or using SFC 10 "DIS_MSG."
You specify the messages to be enabled using the MODE and MESGN input
parameters. Successful enabling of messages with SFC 9 "EN_MSG" is only
possible when SFC 9 is not already actively enabling messages.
You start the enabling function by assigning the value 1 to the REQ input
parameter of SFC 9.
How SFC 9 Functions
Enabling is executed asynchronously, in other words it can be active throughout
several SFC 9 calls (see also Meaning of the Parameters REQ, RET_VAL and
BUSY with Asynchronous SFCs:
When it is first called (REQ =1), SFC 9 checks the input parameters and
attempts to occupy the required system resources. If successful, the value
W#16#7001 is entered in RET_VAL, BUSY is set and enabling the message is
started.
If unsuccessful, the error information is entered in RET_VAL and the job is
terminated. BUSY must not be evaluated in this case.
If there are further calls in the meantime, the value W#16#7002 is entered in
RET_VAL (job still being executed by the CPU) and BUSY is set. Further calls
do not affect the current job.
The last time the SFB is called, the value W#16#0000 is entered in RET_VAL if
no error occurred. BUSY then has the value 0. If an error occurred, the error
information is entered in RET_VAL and BUSY must not be evaluated.
Parameter Declaration Data Type Memory Area Description
REQ INPUT BOOL I, Q, M, D, L REQ = 1: trigger enable
MODE INPUT BYTE I, Q, M, D, L,
constant
Parameter for selecting the messages to
be enabled
MESGN INPUT DWORD I, Q, M, D, L,
constant
Message number only relevant when
MODE is set to 5, 6, 7. This allows a single
message to be enabled.
RET_VAL OUTPUT INT I, Q, M, D, L Error information, see table.
BUSY OUTPUT BOOL I, Q, M, D, L BUSY = 1: the enable has not yet been
canceled.