K1: Mode group, channel, program operation, reset response
9.9 Program operation mode
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
585
9.9.12.3
Programming
User program
End of program
The following must be kept in mind, if the user program is to be activated through the part program start.
• The user program must be ended with
M17
or
RET
.
• A jump back by means of
REPOS
command is not permitted and leads to an alarm.
Block display
The display can be suppressed in the current block display using the
DISPLOF
attribute in the
PROC
statement.
Processing status
Via the user M function the PLC can be informed about the processing status of the event-driven user program.
Scan for triggering event
The event, which causes the activation of the user program, can be queried in the user program with the
following system variable:
$P_PROG_EVENT (event-driven program call active)
Query of the current channel
The application program is basically processed in the channel, in which the corresponding event has occurred.
The current channel is queried in the user program with the following system variables:
$P_CHANNO (query of the current channel number)
Value
Description
1
Activation through part program start
2
Activation through part program end
3
Activation through Operator panel reset
4
Activation through Power up
5
Activation after output of the last action block after Block search (see "Automatic start of an
ASUB after a block search [Page 510]")
Note
Power up is an event that takes place in all channels.