0% found this document useful (0 votes)
143 views13 pages

SIMATIC PLC OB1 Program Overview

This document contains the code for the cyclic organization block OB1 of a SIMATIC 300 PLC. OB1 contains 32 networks of ladder logic that control various machine functions such as calling function blocks for axis control, spindle control, tool management, alarms, and handling communication between the PLC and CNC. The code is well documented with comments explaining the purpose of each network.

Uploaded by

Hoangvinh Duong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views13 pages

SIMATIC PLC OB1 Program Overview

This document contains the code for the cyclic organization block OB1 of a SIMATIC 300 PLC. OB1 contains 32 networks of ladder logic that control various machine functions such as calling function blocks for axis control, spindle control, tool management, alarms, and handling communication between the PLC and CNC. The code is well documented with comments explaining the purpose of each network.

Uploaded by

Hoangvinh Duong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...

\OB1 - <offline> 03/03/2005 15:24:39

OB1 - <offline>
""
Name: Family:
Author: Version: 5.3
Block version: 2
Time stamp Code: 2005/03/03 10:15:57Œß‘O
Interface: 2002/06/03 20:10:44Χ΋
Lengths (block/logic/data): 01198 01002 00028

Address Declaration Name Type Initial value Comment


0.0 temp OB1_EV_CLASS BYTE
1.0 temp OB1_SCAN_1 BYTE
2.0 temp OB1_PRIORITY BYTE
3.0 temp OB1_OB_NUMBR BYTE
4.0 temp OB1_RESERVED_1 BYTE
5.0 temp OB1_RESERVED_2 BYTE
6.0 temp OB1_PREV_CYCLE INT
8.0 temp OB1_MIN_CYCLE INT
10.0 temp OB1_MAX_CYCLE INT
12.0 temp OB1_DATE_TIME DATE_AND_TIME Data for ShopMill
20.0 temp START_UP BOOL HIER ANWENDER-Lokaldaten EINFUEGEN Insert User-data from here

Block: OB1 Cyclic Organization Block

Network: 1 FC2 CALL

FC2 is required to syncronize with NCK, at the beginning in OB1.

CALL FC 2 "GP_HP" -- cyclic Baseprogram

//First cycle of OB1 store into "START_UP"


L #OB1_SCAN_1
L 1
==I
= #START_UP

Network: 2 OB35 signal replace

M7.4 M7.1
S

Page 1..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Symbol information
M7.4 Arm_90a
M7.1 Arm90 ATC arm 90 angle rotate switch

Network: 3 OB35 signal replace

M7.5 M7.2
S

Symbol information
M7.5 Arm_270a
M7.2 Arm270 ATC arm 270 angle rotate switch

Network: 4 OB35 signal replace

M7.6 M7.3
S

Symbol information
M7.6 Arm_00a
M7.3 Arm00 ATC arm 00 angle rotate switch

Network: 5 1 Scan ON signal

#START_UP M1.4

Symbol information
M1.4 1SCN_ON 1 Scan ON Signal

Page 2..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 6 ShopMill Diagnostics FC34

Monitoring NCK signals for ShopMill

FC34
EN ENO

Symbol information
FC34 CMM_MONIT NCK-Signal Monitor

Network: 7 M decode clear at Program test

DB21.DBX33
.7 FC103
EN ENO

Symbol information
DB21.DBX33.7 "CHAN".E_ProgTest Program test active
FC103 M decode clear at P.Test

Network: 8 Basic Functions

DB121
FB121
EN ENO

#START_UP startup

Symbol information
FB121 Basic Function

Page 3..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 9 Machine Control Panel Functions

DB122
FB122
EN ENO

Symbol information
FB122 MCP Functions

Network: 10 Single block type control

DB112
M6.0 FB112
EN ENO

Symbol information
M6.0 SBLCHG
FB112 SBL type control

Network: 11 CNC Mode Control

This FB makes some important signals in its DB.


PLC programmer should refer these signals for current CNC mode.

DB123
FB123
EN ENO

Symbol information
FB123 Mode select control
DB123 OP_MODE

Page 4..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 12 ShopMill PLC Program

initialize ShopMill-PLC-Program

CALL FC 30 "CMM3" -- FC-Graphgroup CMM3


INIT_SD:=#START_UP //initialize ShopMill-PLC-Program

//Tool-Management-System
//CALL FB 110 , DB 110;

Network: 13 Axis Control Initialization

FC100
EN ENO

Network: 14 Hand wheel control

DB124
FB124
EN ENO

Symbol information
FB124 Hand Wheel

Network: 15 Override Control

FC105
EN ENO

Symbol information
FC105 Override Control

Page 5..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 16 Zero Return

FB125

DB125
FB125
EN ENO

Symbol information
FB125 Jog P/M key
DB125 ZRN

Network: 17 Spindle Control

DB126
FB126
EN ENO

Symbol information
FB126 Spindle Control

Network: 18 Basic Functions 2

DB130
FB130
EN ENO

startup

Symbol information
FB130 Basic 2
DB130 Basic2

Page 6..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 19 MCP Functions 2

FC106
EN ENO

Symbol information
FC106 MCP functions 2

Network: 20 Tool Management

DB131
FB131
EN ENO

Symbol information
FB131 Tool Management
DB131 TM

Network: 21

DB156
FB156
EN ENO

Symbol information
FB156 Tool Clamp/Pot

Page 7..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 22 Coolant Control

DB140
FB140
EN ENO

Symbol information
FB140 Coolant
DB140 Cool

Network: 23 Spare M codes

DB141
FB141
EN ENO

Symbol information
FB141 Spare M code
DB141 SpareM FB141 instance DB

Network: 24 M code Misc.

DB142
FB142
EN ENO

Symbol information
FB142 M code Misc

Page 8..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 25 Some Alarms

DB143
FB143
EN ENO

Symbol information
FB143 Alarm Generation
DB143 ALM

Network: 26 Door Interlock

DB144
FB144
EN ENO

Symbol information
FB144 Door interlock
DB144 Dr_INLK

Network: 27 4th/5th control

DB120.DBX2 DB145
46.1 FB145
EN ENO
DB120.DBX2
46.2

Symbol information
FB145 4th/5th axes
DB145 4-5axes FB145 instance DB

Page 9..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 28

DB147
FB147
EN ENO

Symbol information
FB147 Macro I/O control PLC to NCK and NCK to PLC

Network: 29 General PLC <-> NCK Data Transfer

FC115
EN ENO

Network: 30 M decode Finish Management

DB150
FB150
EN ENO

Symbol information
FB150 M code finish

Page 10..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 31 Pitch Error Comp. Data Set

DB151
FB151
EN ENO

Symbol information
FB151 PITCH
DB151 EEC

Network: 32 Absolute encoder setup

FC111
EN ENO

Symbol information
FC111 ABSO

Network: 33 Magazin(NS500) control block call

DB203
FB203
EN ENO

Symbol information
FB203 Magazin (NS500) control

Page 11..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 34 Alarm Process

FC110
EN ENO

Symbol information
FC110 Alarm Process

Network: 35 Alarms & Messages

F:\OEM\LANGUAGE\ directory
ALM_UK.com for English
ALM_JA.com for Japanese

The above files are recognized in F:\OEM\MBDDE.INI

CALL FC 10 "AL_MSG" -- Alarms & Messages


ToUserIF:=TRUE
Quit :=DB130.DBX2.3 "Basic2".alm_clr --

Network: 36 Read-in-disable Logic controlled by DB21.DBX6.1

DB21.DBX6.
M70.0 1

DB21.DBX6.
1

DB36.DBX60
M70.1 .4

Symbol information
M70.0 M5decode M5 Decode Keep
DB21.DBX6.1 "CHAN".A_RIdisable Read-in disable
DB36.DBX60.4 "SP".E_RefSyn1 Referenced/synchronized 1

Page 12..
SIMATIC N3883002\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\OB1 - <offline> 03/03/2005 15:24:39

Network: 37 Alarm Cancel

DB19.DBX20 DB19.DBX20
.2 .2
R

Symbol information
DB19.DBX20.2 "MMC".E_Cancel Cancel

Page 13

You might also like