Siemens SINUMERIK MC Commissioning Manual page 79

Mcu commissioning: nc, plc, drive
Hide thumbs Also See for SINUMERIK MC:
Table of Contents

Advertisement

Program code to be inserted into the hardware interrupt OB
SCL
// GP: "LBP_typeNCKProcessIRTFlags";
// NckEvent : Bool;
// Axis1InPos: Bool;
// Axis2InPos: Bool;
// Axis3InPos: Bool;
// AuxFunctionInChan1: Bool;
// AuxFunctionInChan2: Bool;
// TMCommand: Bool;
//Call with output parameters
"LBP_NCKProcessIRT"(Flags=>#GP);
//Use of the output parameters
IF #GP.IRFromNck THEN
#NckEvent := TRUE;
END_IF;
//Use of the flags for axis 1 to 3
IF #GP.InPosition[1] THEN
#Axis1InPos := TRUE;
END_IF;
IF #GP.InPosition[2] THEN
#Axis2InPos := TRUE;
END_IF;
IF #GP.InPosition[3] THEN
#Axis3InPos := TRUE;
END_IF;
//Use of the flags for channel 1 and 2
IF #GP.AuxFunction[1] THEN
#AuxFunctionInChan1 := TRUE;
END_IF;
IF #GP.AuxFunction[2] THEN
#AuxFunctionInChan2 := TRUE;
END_IF;
//Is a tool change pending?
IF #GP.TM THEN
#TMCommand := TRUE;
MCU commissioning: NC, PLC, Drive
Commissioning Manual, 02/2020, A5E47437618B AB
PLC commissioning
5.4 Creating a PLC program
79

Advertisement

Table of Contents
loading

Table of Contents