Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4PLCProgram<br />
4.2 Example for OB1 and OB100<br />
4.2 Example for OB1 and OB100<br />
General<br />
Example of OB1<br />
4-36<br />
12.01<br />
The PLC programs GPOB<strong>810D</strong>.AWL and GPOB<strong>840D</strong>.AWL are available in the<br />
<strong>ShopMill</strong> PLC library. The user can change these accordingly and recompile<br />
them.<br />
The source files contain calls for the standard basic program, the machine control<br />
panel, the <strong>ShopMill</strong> PLC program and the tool management. OB1 and<br />
OB100 are illustrated below, whereby the calls for the <strong>ShopMill</strong> PLC program<br />
and tool management are marked in bold type. The call sequence for the modules<br />
given in the example must not be changed.<br />
ORGANIZATION_BLOCK OB1<br />
VERSION: 5.2<br />
VAR_TEMP<br />
OB1_EV_CLASS: BYTE;<br />
OB1_SCAN_1: BYTE;<br />
OB1_PRIORITY: BYTE;<br />
OB1_OB_NUMBR: BYTE;<br />
OB1_RESERVED_1: BYTE;<br />
OB1_RESERVED_2: BYTE;<br />
OB1_PREV_CYCLE: INT;<br />
OB1_MIN_CYCLE: INT;<br />
OB1_MAX_CYCLE: INT;<br />
OB1_DATE_TIME:<br />
//Data for <strong>ShopMill</strong><br />
DATE_AND_TIME;<br />
START_UP: BOOL;<br />
// INSERT USER LOCAL DATA HERE<br />
// Insert user data from here<br />
END_VAR<br />
BEGIN<br />
//<br />
//<br />
//<br />
// Basic program<br />
CALL FC2;<br />
// INSERT USER PROGRAM PART 1 HERE<br />
// Insert user program part 1 from here<br />
//First cycle of OB1 store into “START_UP”<br />
L #OB1_SCAN_1;<br />
L 1;<br />
==I;<br />
= #START_UP;<br />
//Machine control panel/Operator panel<br />
L DB82.DBB0;<br />
L 0;<br />
==I ;<br />
SPB MOD0;<br />
//small operator panel<br />
L DB82.DBB0;<br />
L 1;<br />
==I ;<br />
E Siemens AG, 2001. All rights reserved<br />
<strong>SINUMERIK</strong> <strong>840D</strong>/<strong>810D</strong> Description of Functions <strong>ShopMill</strong> (FBSP) - 12.01 Edition