Siemens SINUMERIK MC Commissioning Manual page 78

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

Advertisement

PLC commissioning
5.4 Creating a PLC program
SCL
ActiveChan => "LBP_ConfigData".ActiveChan,
ActiveAxis => "LBP_ConfigData".ActiveAxis,
MaxNumUserDataInt => "LBP_ConfigData".MaxNumUserDataInt,
MaxNumUserDataHex => "LBP_ConfigData".MaxNumUserDataHex,
MaxNumUserDataReal => "LBP_ConfigData".MaxNumUserDataReal,
UserDataIntArray => NULL,
UserDataHexArray => NULL,
UserDataRealArray => NULL,
TMMagazines => NULL);
//INSERT USER PROGRAM HERE
Examples for calling LBP_MainBP [FC2]
Call LBP_MainBP [FC2] in Main [OB1], thus starting cyclic processing of the SINUMERIK PLC
basic program.
You can copy or enter the call in the editor or create it with drag and drop.
SCL
// Call of basic program as first FC
"LBP_MainBP"();
// Add user program here
Example for calling LBP_NCKProcessIRT [FC3]
If a command that requires a synchronous reaction in the PLC program is processed during
runtime in an NC part program, this reaction is executed in the part of the basic program that
is synchronous with the block (LBP_NCKProcessIRT [FC3]). You configure the signal
exchange and the hardware interrupt required for it in the NCK properties. You call
LBP_NCKProcessIRT [FC3] in the corresponding hardware interrupt OB, e.g. in Hardware
Interrupt [OB40].
You can copy this call to the editor or enter it or create it with drag and drop.
Example 1 without transfer of the output parameters
SCL
//Call without output parameters
"LBP_NCKProcessIRT"(Flags=>NULL);
Example 2 with transfer of the output parameters
In this example, "LBP_NCKProcessIRT" is called directly in the hardware interrupt OB with the
transfer of the output flags. The output flags are subsequently evaluated.
Variables to be declared in the "Temp" section of the hardware interrupt OBs
78
MCU commissioning: NC, PLC, Drive
Commissioning Manual, 02/2020, A5E47437618B AB

Advertisement

Table of Contents
loading

Table of Contents