Getting started – Lenze ETC Motion Control User Manual

Page 66

Advertising
background image

Getting started

Creating a PLC sample program
Starting and configuring the PLC sample program

2

2.12
2.12.2

l

66

EDSTCXN EN 2.0

The function block M_FUNCTIONS evaluates the M−functions coming from
the NC. By means of the two following system variables, the block detects
whether a new M−function has been requested:

ƒ DB1_NC2SPS_MFKT_STROBE_BIT, DB1_SPS2NC_MFKT_QUITT_BIT

ƒ (DB1_X150_0_nc2plc_M_function_strobe_bit,

DB1_X32_0_plc2nc_acknowledgement_for_M_function_bit)

Via the following system variable, the block detects which M−function has
been requested:

ƒ DB1_NC2SPS_MFKT_W (DB1_W151_nc2plc_M_function_w )

As long as an M−function is active, a window opens in the ETC−MMI via the
bit DB2_HINT_OPTIONALLYSTOP_ACTIVE_BIT in the system variable
DB2_SPS2HMI_HINWEIS_AW.

ETCN031

After it has been detected that the new M−function is M14 or M15, the
M−function is processed in the program PLC_KEYS.

The output O_ToolDown is set and a timer of 5 s is started. If the input
I_ToolDown is set within the next 5 s, the function is switched, otherwise an
error message is displayed. The error message is realised via the function
SPSERROR, which opens an error window in the ETC−MMI via an error
number (F_TOOL_UP_KI).

ETCN032

Function M_FUNCTIONS

M14

Advertising