0% found this document useful (0 votes)
54 views

FB151

This document contains a program logic controller (PLC) function block for pitch error compensation. It includes networks that read variables from the global user data (GUD) to check the status of pitch activation signals for axes X, Y, and Z, and set control signals based on the values read. The function block polls the activation signals, reads the current path and program, allows selecting a program for pitch error computation, and sets the cycle start request signal.

Uploaded by

Hoangvinh Duong
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

FB151

This document contains a program logic controller (PLC) function block for pitch error compensation. It includes networks that read variables from the global user data (GUD) to check the status of pitch activation signals for axes X, Y, and Z, and set control signals based on the values read. The function block polls the activation signals, reads the current path and program, allows selecting a program for pitch error computation, and sets the cycle start request signal.

Uploaded by

Hoangvinh Duong
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

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

\FB151 - <offline> 10/28/2004 12:56:52

FB151 - <offline>
"PITCH"
Name: Family:
Author: Version: 0.1
Block version: 2
Time stamp Code: 03/07/11 10:47:54Œß‘O
Interface: 02/09/25 11:46:10Œß‘O
Lengths (block/logic/data): 02748 01952 00032

Address Declaration Name Type Initial value Comment


in
out
in_out
0.0 stat FB5_X FB5
130.0 stat FB5_Y FB5
260.0 stat FB5_Z FB5
390.0 stat FB2NOW FB2
624.0 stat FB4EEC FB4
720.0 stat FB4NOW FB4
816.0 stat FB5X_RD DINT L#0
820.0 stat FB5Y_RD DINT L#0
824.0 stat FB5Z_RD DINT L#0
828.0 stat FB4N_Prog STRING[32] '' Current Prog Name
862.0 stat FB4N_Path STRING[128] '' Current Path Name
992.0 stat FB4E_Path STRING[32] '/_N_CMA_DIR/' Pitch Error Prog. Name
1026.0 stat FB4E_Prog STRING[32] '_N_EEC_SPF' Pitch Error Path Name
1060.0 stat FB2N_Req BOOL FALSE Current Prog & Path Name Read
1060.1 stat FB4N_Req BOOL FALSE Current Prog. Select
1060.2 stat FB4E_Req BOOL FALSE Pitch Error Prog. Select
1060.3 stat EEC_WR BOOL FALSE
1060.4 stat EEC_RD BOOL FALSE
1060.5 stat EEC_CLR BOOL FALSE
1060.6 stat EEC_RUN BOOL FALSE Running state
1060.7 stat EEC_INT BOOL FALSE Interrupt State
1061.0 stat FB5X_Req BOOL FALSE
1061.1 stat FB5Y_Req BOOL FALSE
1061.2 stat FB5Z_Req BOOL FALSE
1061.3 stat EEC_Exec BOOL FALSE
1061.4 stat ACT_IR1 BOOL FALSE
1061.5 stat ACT_IR2 BOOL FALSE
1061.6 stat ACT_IR3 BOOL FALSE
1061.7 stat CS_IR BOOL FALSE
0.0 temp FB5X_Err BOOL
0.1 temp FB5X_Done BOOL
2.0 temp FB5X_Stat WORD
4.0 temp FB5Y_Err BOOL
4.1 temp FB5Y_Done BOOL

Page 1..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Address Declaration Name Type Initial value Comment


6.0 temp FB5Y_Stat WORD
8.0 temp FB5Z_Err BOOL
8.1 temp FB5Z_Done BOOL
10.0 temp FB5Z_Stat WORD
12.0 temp FB2N_Err BOOL
12.1 temp FB2N_Done BOOL
14.0 temp FB2N_Stat WORD
16.0 temp FB4E_Err BOOL
16.1 temp FB4E_Done BOOL
18.0 temp FB4E_Stat WORD
20.0 temp FB4N_Err BOOL
20.1 temp FB4N_Done BOOL
22.0 temp FB4N_Stat WORD

Block: FB151 Pitch Error Comp. Data Set


Rev. 2002-9-24 : YSNC
Rev. 2003-6-18 : YSNC

1: Poll action for reading GUD variables(_PITCH_*_ACTIVATE) [FB5 used]


2: Read the original (current) Path & Program [FB2 used]
3: Select Program for EEC [FB4 used]
4: Set Cycle start request signal
5: Set the original Path & Program [FB4 used]
6: Change to GUD screen

[Used Bit Memory]


1: M11.0 (Cycle start request signal)

[Used DB]
1: DB151 (Instance DB for FB151)
2: DB152 (NC var selector i/f for GUD variable(_PITCH_*_ACTIVATE))
3: DB153 (NC var selector i/f for Path & Program)

Page 2..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 1 Checking This block execution condition is ok or not


(Cycle-start-condition Not Ready) & /EEC_Exec & M5.7 ===> Message

DB121.DBX3 DB82.DBX34 DB2.DBX184


.4 .0 #EEC_Exec M5.7 .7

DB126.DBX8
.3

DB121.DBX2
.6

DB82.DBX30
.1

Symbol information
DB82.DBX30.1 "CMM_PLC".CMM_OUT.base_sig.main_mode_mill.automatic
DB82.DBX34.0 "CMM_PLC".CMM_OUT.sub_mode_mill.tool
M5.7 EEC_MODE
DB2.DBX184.7 "ALMSG_DB".A7000xx[39] Alarm 700000-700063 (user area 0)

Network: 2 Block return

DB2.DBX184
.6 #EEC_Exec
RET
M5.7

Page 3..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Symbol information
DB2.DBX184.6 "ALMSG_DB".A7000xx[38] Alarm 700000-700063 (user area 0)
M5.7 EEC_MODE

Network: 3 Polling action set

DB11.DBX6.
M0.7 2 #FB5X_Req #FB5X_Req
S
#FB5Y_Req #FB5Y_Req
S
#FB5Z_Req #FB5Z_Req
S

Symbol information
M0.7 Flicker_2.0s Flicker Time 2.0 msec
DB11.DBX6.2 "BAG".E_JOG Active JOG mode

Page 4..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 4 Reading GUD:'_PITCH_X_ACTIVATE'

#FB5_X
EN ENO

#FB5X_Req Req Error #FB5X_Err

DB152.PITC Done #FB5X_Done


H_X Addr
State #FB5X_Stat
B#16#2 Area
B#16#1 Unit

0 Index1
0 Index2

M1.1 CnvtToken
DB152.PITC
H_XACT VarToken

#FB5X_RD RD

Symbol information
P#DB152.DBX0.0 DB152.PITCH_X
M1.1 AlwaysON Always on signal
P#DB152.DBX34.0 DB152.PITCH_XACT

Page 5..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 5 Reading GUD:'_PITCH_Y_ACTIVATE'

#FB5_Y
EN ENO

#FB5Y_Req Req Error #FB5Y_Err

DB152.PITC Done #FB5Y_Done


H_Y Addr
State #FB5Y_Stat
B#16#2 Area
B#16#1 Unit

0 Index1
0 Index2

M1.1 CnvtToken
DB152.PITC
H_YACT VarToken

#FB5Y_RD RD

Symbol information
P#DB152.DBX44.0 DB152.PITCH_Y
M1.1 AlwaysON Always on signal
P#DB152.DBX78.0 DB152.PITCH_YACT

Page 6..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 6 Reading GUD:'_PITCH_Z_ACTIVATE'

#FB5_Z
EN ENO

#FB5Z_Req Req Error #FB5Z_Err

DB152.PITC Done #FB5Z_Done


H_Z Addr
State #FB5Z_Stat
B#16#2 Area
B#16#1 Unit

0 Index1
0 Index2

M1.1 CnvtToken
DB152.PITC
H_ZACT VarToken

#FB5Z_RD RD

Symbol information
P#DB152.DBX88.0 DB152.PITCH_Z
M1.1 AlwaysON Always on signal
P#DB152.DBX122.0 DB152.PITCH_ZACT

Page 7..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 7 Reading GUD:'_PITCH_*_ACTIVATE' Done

M1.1 #FB5X_Done #FB5X_Req


R
#FB5X_Err

#FB5Y_Done #FB5Y_Req
R
#FB5Y_Err

#FB5Z_Done #FB5Z_Req
R
#FB5Z_Err

Symbol information
M1.1 AlwaysON Always on signal

Page 8..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 8 Check GUD:'_PITCH_*_ACTIVATE' = 1 or not

M1.1 CMP ==D #EEC_CLR

#FB5X_RD IN1
L#0 IN2

CMP ==D

#FB5Y_RD IN1
L#0 IN2

CMP ==D

#FB5Z_RD IN1
L#0 IN2

CMP ==D #EEC_WR

#FB5X_RD IN1
L#1 IN2

CMP ==D

#FB5Y_RD IN1
L#1 IN2

CMP ==D

#FB5Z_RD IN1
L#1 IN2
#

Page 9..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

CMP ==D #EEC RD

#FB5X_RD IN1
L#3 IN2

CMP ==D

#FB5Y_RD IN1
L#3 IN2

CMP ==D

#FB5Z_RD IN1
L#3 IN2

Symbol information
M1.1 AlwaysON Always on signal

Network: 9 Request to read Current Path & Program Names

DB11.DBX6.
#EEC_CLR 2 #EEC_Exec #FB2N_Req
S
#EEC_WR #ACT_IR1 #EEC_Exec
P S
#EEC_RD

Symbol information
DB11.DBX6.2 "BAG".E_JOG Active JOG mode

Page 10..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 10

#EEC_CLR #ACT_IR2 #EEC_Exec


N R
#EEC_WR

#EEC_RD

Page 11..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 11 Read Current Path & Program Names

#FB2NOW
EN ENO

#FB2N_Req Req Error #FB2N_Err

2 NumVar NDR #FB2N_Done

DB153.Prog State #FB2N_Stat


Name Addr1

Unit1
Column1

Line1

DB153.Path
Name Addr2

Unit2
Column2
Line2

Addr3
Unit3

Column3

Line3
Addr4
Unit4

Column4
Line4

Page 12..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Addr5
Unit5
Column5

Line5
Addr6

Unit6
Column6
Line6
Addr7
Unit7

Column7
Line7
Addr8

Unit8
Column8
Line8

#FB4N_Prog RD1

#FB4N_Path RD2
RD3

RD4
RD5
RD6

RD7
RD8

Page 13..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Symbol information
P#DB153.DBX0.0 DB153.ProgName
P#DB153.DBX10.0 DB153.PathName

Network: 12

#FB2N_Done #FB2N_Req
R
#FB2N_Err

Network: 13 Request to set the EEC program

#FB2N_Done #FB4E_Req
S

Page 14..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 14 Set the EEC Program

#FB4EEC
EN ENO

#FB4E_Req Req Error #FB4E_Err

"PI".SELEC Done #FB4E_Done


T PIService
State #FB4E_Stat
1 Unit
#FB4E_Path Addr1

#FB4E_Prog Addr2
Addr3
Addr4

W#16#4 WVar1

W#16#4 WVar2
W#16#0 WVar3

W#16#0 WVar4
WVar5

WVar6
WVar7

WVar8

WVar9

WVar10

Page 15..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Symbol information
P#DB16.DBX0.0 "PI".SELECT

Network: 15 Reset Cycle Start Request Signal

M11.0 M11.0
R

Symbol information
M11.0 CS_ReqEEC C/S Request signal from EEC func.

Network: 16 Set Cycle Start Request Signal #1

M11.1 M11.0
S
M11.1
R

Symbol information
M11.1 CS_ReqEECsub C/S Request sub signal from EEC func.
M11.0 CS_ReqEEC C/S Request signal from EEC func.

Network: 17 Set Cycle Start Request Signal #2

#FB4E_Done #CS_IR M11.1


P S

Page 16..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Symbol information
M11.1 CS_ReqEECsub C/S Request sub signal from EEC func.

Network: 18 Program Set Done

DB21.DBX35
#FB4E_Done .5 #FB4E_Req
R
#FB4E_Err DB21.DBX35
.6

Symbol information
DB21.DBX35.5 "CHAN".E_ChanActive Channel active
DB21.DBX35.6 "CHAN".E_ChanInterrupt Channel interrupted

Network: 19 Running status for the EEC program

DB21.DBX35
#FB4E_Done .5 #EEC_RUN
S

Symbol information
DB21.DBX35.5 "CHAN".E_ChanActive Channel active

Page 17..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 20 Ending status for the EEC program

DB21.DBX35
.6 #EEC_RUN #EEC_INT
S
#EEC_RUN
R

Symbol information
DB21.DBX35.6 "CHAN".E_ChanInterrupt Channel interrupted

Network: 21 Request to set the orignal Path & Program

DB21.DBX35 T11
.7 #EEC_INT S_ODT #FB4N_Req
S Q S
S5T#1S TV BI #EEC_INT
R
R BCD

Symbol information
DB21.DBX35.7 "CHAN".E_ChanReset Channel reset

Page 18..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Network: 22 Set the orignal Path & Program

#FB4NOW
EN ENO

#FB4N_Req Req Error #FB4N_Err

"PI".SELEC Done #FB4N_Done


T PIService
State #FB4N_Stat
1 Unit
#FB4N_Path Addr1

#FB4N_Prog Addr2
Addr3
Addr4

W#16#4 WVar1

W#16#4 WVar2
W#16#0 WVar3

W#16#0 WVar4
WVar5

WVar6
WVar7

WVar8

WVar9

WVar10

Page 19..
SIMATIC N3883001\SIMATIC 300(1)\PLC315-2DP M/S 2AF03\...\FB151 - <offline> 10/28/2004 12:56:52

Symbol information
P#DB16.DBX0.0 "PI".SELECT

Network: 23 Program Set Done

#FB4N_Done #FB4N_Req
R
#FB4N_Err

Page 20

You might also like