P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
984 Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Example of a call for FB 9:
Interrupts, errors
The output parameters "Alarm1" to "Alarm6" and "Report" exist as information in the PLC and are output in the
event of M:N errors visualized on the HMI by the appearance of alarms 410900 - 410906.
If execution of an HMI function has failed (and an appropriate error message cannot be displayed), status
parameter "ErrorMMC" is set to 'logical 1' (e.g., booting error, when no connection is made).
Call example for FB 1 (Call in OB 100)
Example Override switchover
CALL FB 9, DB 109 (
Ack := Error_ack, //e.g., MCP RESET
OPMixedMode := FALSE,
ActivEnable := TRUE,
MCPEnable := TRUE); // Enable for MCP switchover
Note
Input parameter “MCPEnable” must be set to TRUE to enable the MCP switchover. The
default value of these parameters is set in this way and need not be specially assigned when
the function is called.
CALL "RUN_UP", "gp_par" (
MCPNum := 1,
MCP1In := P#I 0.0,
MCP1Out := P#Q 0.0,
MCP1StatSend := P#Q 8.0,
MCP1StatRec := P#Q 12.0,
MCP1BusAdr := 255, // Address of 1st MCP
MCP1Timeout := S5T#700MS,
MCP1Cycl := S5T#200MS,
MCP1Stop := TRUE, // MCP switched off
NCCyclTimeout := S5T#200MS,
NCRunupTimeout := S5T#50S);
// Auxiliary flags used M100.0, M100.1, M100.2, M100.3
//Edge positive of MCP1Ready must check the override
//and measures for activation
// Initiate MCP block
//This example applies to the feedrate override.
//The interface and input bytes must be exchanged for spindle override.
U DB10.DBX 104.0; //MCP1Ready
EN M 100.0; //Edge trigger flag 1
JCN smth1;