Detailed description
2.7 Program operation mode
Basic logic functions: Mode group, channel, program operation, reset response (K1)
114 Function Manual, 11/2006, 6FC5397-0BP10-2BA0
2.7.11 Eventdriven program calls
Application
In the case of certain events, an implied user program is to start. This allows the user to
activate the initial settings of functions or carry out initialization routines by part program
command.
Event selection
In MD20108 $MC_PROG_EVENT_MASK (event-controlled program call)
Which of the following events should activate the user program can be set channel-
specifically:
• Bit0 = 1: Part program start
• Bit1 = 1: Part program end
• Bit2 = 1: Operator panel reset
• Bit3 = 1: Power up (of the NC control)
The user program can be saved under the permanent path
/_N_CMA_DIR/_N_PROG_EVENT_SPF or a different program name can be specified in
MD11620 $MN_PROG_EVENT_NAME.
Other program name
In MD11620 $MN_PROG_EVENT_NAME (program name of PROG_EVENT)
a name is specified. The system then searches for the user program in the directories:
/_N_CUS_DIR/ for user cycles
/_N_CMA_DIR/ for manufacturer cycles
/_N_CUS_DIR/ for standard cycles
in the specified order. The first program found with the stored name is called when a
configured event occurs.
The same protection mechanisms that can be activated for cycles (protection levels for
writing, reading etc.) are activated.
Machine data MD20108 $MC_PROG_EVENT_MASK is ignored during the simulation.
Request which start event
In the user program, the system variable $P_PROG_EVENT can be used to request the
event, which enabled the part program.