SINUMERIK 840C
Software Versions 1, 2, 3, 4, 5 and 6
135 WB2/WD PLC Function Blocks
Package 0: Basic Functions
Planning Guide
Manufacturer Documentation
01.99 Edition
SINUMERIK 840C
Software Versions 1, 2, 3, 4, 5 and 6
135 WB2/WD PLC Function Blocks
Package 0: Basic Functions
Planning Guide
Manufacturer Documentation
Applies to:
Control
Software versions
SINUMERIK 840C/CE
(Standard/Export Version)
1, 2, 3, 4, 5 and 6
01.99 Edition
SINUMERIK® documentation
Printing history
Brief details of this edition and previous editions are listed below.
The status of each edition is shown by the code in the "Remarks" column.
Status code in ”Remarks” column:
A . . . New documentation
B . . . Unrevised reprint with new Order No.
C . . . Revised edition with new status.
If factual changes have been made on a page since the last edition, this is
indicated by a new edition coding in the header on that page.
Edition
Order No.
Remarks
06.93
6FC5197-2AA30-0BP0
A
12.93
6FC5197-3AA30-0BP0
C
10.94
6FC5197-4AA30-0BP0
C
09.95
6FC5197-5AA30-0BP0
C
04.96
6FC5 197-5AA30-0BP1
C
07.97
6FC5 197-6AA30-0BP0
C
01.99
6FC5 197-6AA30-0BP1
C
This manual is included in the documentation on CD-ROM (DOCONCD)
Edition
Order No.
01.99
6FC5198-6CA00-0BG1
For more information, refer to the Internet:
http://www.a&d.siemens.de/sinumerik
The publication was produced on the Siemens 5800 0ffice System.
The reproduction, transmission or use of this document or its
contents is not permitted without express written authority.
Offenders will be liable for damages. All rights, including created by
patent grant or registration of a utility model or design, are reserved,
Remarks
C
Other functions not described in this documentation might be
executable in the control. This does not, however, represent an
obligation to supply such functions with a new control or when
servicing.
We have checked that the contents of this publication agree with
the hardware and software described herein. The information given
in this publication is reviewed at regular intervals and any
corrections that might be necessary are made in the subsequent
printings. Suggestions for improvement are welcome at all times.
Subject to change without prior notice.
© Siemens AG 1993, 1994, 1995, 1996, 1997, 1998, 1999
All Rights Reserved
Order No. 6FC5197-6AA30-0BP1
Printed in the Federal Republic of Germany
Siemens-Aktiengesellschaft
Definitions
1
Data Sheets for Digital Functions
2
Data Sheets
for Scanning/Displaying Messages
3
Data Sheets for Sequencer Blocks
4
Block Data
5
Appendix
6
Preliminary Remarks
Notes for the reader
This documentation is intended for manufacturers of machine tools using SINUMERIK 840C.
The publication explains the application of the complete Software Package 0, Basic Functions,
which the machine tool manufacturer can incorporate in his PLC program.
The SINUMERIK documentation is organized in 4 levels:
•
General documentation
•
User documentation
•
Manufacturer documentation
•
Service documentation
The Manufacturer Documentation for the SINUMERIK 840C control is divided into the
following parts:
•
Interface Description
Part 1: Signals
Part 2: Connection Conditions
•
135 WB/WB2/WD PLC Planning Guide
•
Function Macros
•
Function Blocks
Paket 0:
Basic Functions
Paket 1/2: Tool Management
Paket 4/5: Computer Link
Paket 7:
Code Carriers
Paket 8:
PLC Controlled Data Input/Output
In addition, there are SINUMERIK publications applying to all SINUMERIK controls
(e.g. Measuring Cycles, Cycles Language CL 800).
Please contact your Siemens regional office for further details.
Technical Comments
SW
Package 0 version
File
1 and 2
16
P00416ST.S5D
3
20
P00420ST.S5D
4
21
P00421ST.S5D
5
22
P00422ST.S5D
6
23
This documentation is valid for software versions 1, 2, 3, 4, 5 and 6.
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaa
a
aaaa
aa
aaaaaa
aaaa
aa
aaaaa
aaaaaaaaaa
a
aaaaaaaaa
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaaaaaaaaaaaa
a
The diskette for package 0 contains package versions 16, 20, 21 and 22. Depending on the
SINUMERIK 840C software version being used, one of the following package 0 versions must
be used.
Contents
Page
1
Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1
1.2
1.2.1
1.2.2
1.2.3
1.3
1.3.1
1.3.2
1.4
1.4.1
1.4.2
Explanations of FB designations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview of PLC interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flags, data formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Class DB data blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Class DX data blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Function blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Class FB function blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Class FX function blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
Data Sheets for Digital Functions
FB 30
FB 32
FB 33
FB 35
FB 36
FB 37
FB 39
FB 40
FB 41
FB 42
FB 43
FB 110
FX 31
FX 32
FX 35
FX 38
FX 81
FX 82
MUL:16
DIV:16
DIV:32
DIV/100
ADD:32
SUB:32
DUAL/BCD
COD:16
COD:32
COD:B4
COD:B8
SUCH
GRAYDUAL
DUALGRAY
RESREQ
PRO-KO1
IKONEN
STERNDRE
...........................
Multiplier:16 . . . . . . . . . . . . . . . . . . . . . . . . . .
16-bit binary divider . . . . . . . . . . . . . . . . . . . . .
Divider:32 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Divide by 100 . . . . . . . . . . . . . . . . . . . . . . . . .
Adder:32 bits . . . . . . . . . . . . . . . . . . . . . . . . . .
Subtracter: 32 bits . . . . . . . . . . . . . . . . . . . . . .
3-decade binary/BCD converter . . . . . . . . . . . . .
Binary/BCD converter . . . . . . . . . . . . . . . . . . . .
Binary/BCD converter . . . . . . . . . . . . . . . . . . . .
BCD/binary converter . . . . . . . . . . . . . . . . . . . .
BCD/binary converter . . . . . . . . . . . . . . . . . . . .
Search for word . . . . . . . . . . . . . . . . . . . . . . . .
Gray code/binary converter . . . . . . . . . . . . . . . .
Binary/Gray code converter . . . . . . . . . . . . . . .
Triggering link bus reset . . . . . . . . . . . . . . . . . .
Program coordination . . . . . . . . . . . . . . . . . . . .
Icon display . . . . . . . . . . . . . . . . . . . . . . . . . . .
Star-delta switchover . . . . . . . . . . . . . . . . . . . .
1–1
1–1
1–2
1–2
1–2
1–3
1–4
1–4
1–6
1–7
1–7
1–11
2–1
2–1
2–3
2–5
2–8
2–10
2–12
2–14
2–16
2–18
2–20
2–22
2–24
2–28
2–30
2–31
2–32
2–34
2–36
3
Data Sheets for Scanning/Displaying Messages
................
3–1
3.1
3.1.1
3.1.2
Error and operational messages (840C SW 1 and 2) . . . . . . . . . . . . . . . .
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program overview for error messages, operational messages and
message groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Block calls for EMs/OMs/MGs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FB 54, FB 57 Scan and display error messages . . . . . . . . . . . . . . . . . . .
FB 55, FB 58 Scan and display operational messages . . . . . . . . . . . . . .
FB 56, FB 59 Scan and display message groups
(SW1 and SW2 only) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Error and operational messages (840C SW 3 and higher)
............
3–1
3–1
3.1.3
3.2
3–2
3–6
3–7
3–8
3–9
3–10
3.2.1
3.2.2
3.2.3
3.2.4
General
.............................................
Program overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Block calls for EMs/OMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FB 45
ANLAUF
Initial settings for error messages and operational
messages . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FB 57
FM-ABFR
Scan error messages . . . . . . . . . . . . . . . . . . . .
FB 58
BM-ABFR Scan operational messages . . . . . . . . . . . . . . .
4
Data Sheets for Sequencer Blocks
4.1
4.1.1
4.1.1.1
4.1.1.2
4.1.1.3
4.1.1.4
4.1.1.5
4.1.1.6
4.1.2
4.4.2
4.5
Programming of sequencers (FB 91, FB 92) . . . . . . . . . . . . . . . . . . . . .
General notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequencers with OR branches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequencer with AND branching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequencer modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Status words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Behaviour when execution is aborted . . . . . . . . . . . . . . . . . . . . . . . . . .
Data sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FB 91
AK 2:V/R
Sequencer forwards/backwards . . . . . . . . . . . . .
FB 92
AK 3:AUT
Sequencer automatic . . . . . . . . . . . . . . . . . . . .
Programming examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming example for a driver control with FB 92 (AK 3:AUT) . . . . . .
Programming example for a tool change with FB 91 (AK 2: V/R) . . . . . . .
General notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
What is GRAPH 5? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The elements of GRAPH 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FB 93
ALS:V/R
GRAPH 5 sequencer forwards/backwards . . . . . .
FB 94
ALS:AUT
GRAPH 5 automatic sequencer . . . . . . . . . . . . .
Program examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program example for a drive control sequencer with
GRAPH 5 block FB94 (ALS:AUT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program example of a tool change with GRAPH 5 block FB 93 (ALS: V/R)
Function block FB 27 (SW 6.1 and higher) . . . . . . . . . . . . . . . . . . . . . .
5
Block Data
6
Appendix
6.1
6.2
Appendix 1
Appendix 2
4.1.3
4.1.3.1
4.1.3.2
4.2
4.2.1
4.2.2
4.2.3
4.3
4.4
4.4.1
..........................
3–10
3–11
3–12
3–13
3–13
3–14
3–15
4–1
4–1
4–1
4–6
4–9
4–11
4–14
4–15
4–16
4–17
4–17
4–23
4–27
4–27
4–30
4–30
4–32
4–35
4–39
4–41
4–41
4–49
4–54
4–54
4–57
4–59
............................................
5–1
.............................................
6–1
............................................
............................................
6–1
6–23
06.93
1 Definitions
1
Definitions
1.1
Explanations of FB designations
FB call
FB name
I,..
Parameter
Type of parameter
Allowed actual operand
I
Q
IB
I
Q
F
n.m Input
n.m Output
n.m Flag
BY Operand with
byte address
IB
QB
FB
DL
DR
PB
n
n
n
n
n
n
Input byte
Output byte
Flag byte
Data byte left
Data byte right
I/O byte
W
IW
QW
FW
DW
PW
n
n
n
n
n
Input word
Output word
Flag word
Data word
I/O word
Data block
Function block
Program block
Sequence block
Input
Output
Q,...
I,BI - Q
Q - Q,BI
I,BI - I
I-
Operand with
bit address
Q,BI
D,..
Operand with
word address
BO
T
C
$F...
$F...
$DW...
$DW...
*F...
*F...
*DW..
.
*DW...
BO Block
Not applicable
DB
FB
PB
SB
n
n
n
n
T
Timer
Not applicable
T
n No. of timer
C
Counter
Not applicable
C
n No. of counter
D
Data
KM
KY
KH
KS
KT
KC
KF
-%1
- %v1
I,BI
I,BI
I,BI
Input signal, statically effective
Input signal which is acknowledged by the FB
Input signal whose leading edge is evaluated
-Q
-/
I,..
$...
No DW allowed as parameter
Input signal which must be applied before the FB call
*...
Defined input signal which need not be applied,
e.g. NC signal
QI-
Q,BI
Q,BI
Q,BI
$...
*...
%1
%v1
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
Binary pattern, 16 positions
Two absolute values from 0 to 255
Hexadecimal number, max. of 4 positions
Two alphanumeric characters
Time (1.0 to 999.3)
Count (0 to 999)
Fixed-point number (-32768 to +32767)
Output signal, statically effective
Output signal which must be acknowledged by the
user
Output signal for one cycle (pulse)
Output signal on defined flag or data word which
can be evaluated immediately after the FB
Defined output signal, e.g. NC signal
Error number ACCU2 for system stop (STS); ACCU1
FB number
Additional specification of interface byte number
in high byte ACCU2
6FC5197- AA30
1–1
1 Definitions
1.2 Overview of PLC interface
06.93
1.2
Overview of PLC interface
1.2.1
Inputs
Inputs
Byte
No.
Bit No.
7
6
5
4
3
2
1
0
0
Physical interface with process image
(Input modules, DMP submodules, machine control panel)
127
128
Physical interface without process image
(Input modules, DMP submodules)
255
1.2.2
Outputs
Outputs
Byte
No.
Bit No.
7
6
5
4
3
2
1
0
0
Physical interface with process image
(Output modules, DMP submodules, machine control panel)
127
128
Physical interface without process image
(Output modules, DMP submodules)
255
1–2
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
06.93
1 Definitions
1.2.3 Flags, data formats
1.2.3
FY
Flags, data formats
0
.
24
25
.
.
.
.
.
99
100
.
.
.
.
.
199
200
.
224
.
.
.
255
Basic signals
e.g. auxiliary flags or
dynamically assignable by
interface signals
e.g. interface Channel 1
Channel 2
etc.
User assignable
Reserved for function
blocks (see note)
Area saved on change of level
and warm restart
Notes:
1. To simplify programming, the interface signals from data blocks can be copied into flag
area FY 25 - 99 using function macros FB 70, FB 71.
Function macros are function blocks programmed in Assembler and integrated in the PLC
operating system.
2. Flag area FY 224 - 255 is saved by the basic program integrated in the system software
on a level change and on a warm restart. The flag area is reloaded when the relevant
program has ended.
This flag area can also be used to store intermediate results.
Flag area FY 200 - 223 is used in part by function blocks (see FB Package Description). If
the user does not require these function blocks, these flags can be used in the same
manner as those in flag area FY 25 - 199.
Caution:
Flag area FY 200 - 255 is also used in part by SIMATIC FBs. Flag area FY 200 - 255 is saved;
this setting is performed via PLC MD.
Data formats:
All word-oriented interface signals are input and output as fixed-point numbers. Exceptions
are expressly indicated.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
1–3
1 Definitions
1.3 Data blocks
1.3
1.3.1
Data blocks
Class DB data blocks
Data blocks DB
Data blocks DB
DB
No.
04.96
1-149 are used or reserved for Siemens applications.
150-255 are available to the user.
DB desig.
DB name
Pack.
1
2
DIAG-DB
STATUS-DB
OS
OS
3
DATKAN-DB
Diagnostic DB
PLC status channel (up to SW2, not used in SW3), from
SW4 used for ”Rapid data channel” function
PLC data channel (up to SW2, not used in SW3), from
SW4 used for ”Rapid data channel” function
Error and operational messages
Interface NC channel 1
Interface NC channel 2
Interface NC channel 3
Interface NC channel 4
Interface NC channel 5
Interface NC channel 6
Reserved
Interface Signals for Safety Integrated
GI signals and 611D signals (GI=gearbox interpolation)
Decoded M functions (list)
Interface for spindle-specific signals
Interface for axis-specific signals
Reserved
Input buffer, computer link
Output buffer, computer link
Interface for data transfer NC <-> PLC
Data transfer control
Status DB computer link
Interface for operator panel
Interface for command channel
Interface for NC/PLC communication
Input signals from PLC 1
880/880 GAZ only
Output signals to PLC 1
880/880 GAZ only
Input signals from PLC 2
880/880 GAZ only
Output signals to PLC 2
880/880 GAZ only
Input signals from PLC 3
880/880 GAZ only
Output signals to PLC 3
880/880 GAZ only
Input signals from PLC 4
880/880 GAZ only
Output signals to PLC 4
880/880 GAZ only
Interface for general messages
Central DB in link RAM
880/880 GAZ only
MD words operating system
MD words function blocks
MD words user
MD bits operating system
MD bits function blocks
MD bits user
Icon control in MMC
Internal machine control panel
SE user words
SE user bits
4
10 *
11 *
12 *
13 *
14 *
15 *
16-17
28
29
30 *
31 *
32 *
33
34
35
36 *
37 *
38
40 *
41 *
48 *
50
51
52
53
54
55
56
57
58 *
59
60 *
61 *
62 *
63 *
64 *
65 *
66
67
68 *
71 *
FM/BM-DB
NS KN 1
NS KN 2
NS KN 3
NS KN 4
NS KN 5
NS KN 6
SI
NS ELG
DEC MFU
SPI SIG
ACHS SIG
E-PU
A-PU
DUE NC
SER SCH.
RK : ZW-DB
NS BEDT.
NS KK
NS COM
E : PLC 1
A : PLC1
E : PLC 2
A : PLC2
E : PLC 3
A : PLC3
E : PLC 4
A : PLC4
MELD
DB-ZENTRAL
MDG WO
MDF WO
MDA WO
MDG BI
MDF BI
MDA BI
IKO-DB
INT-MSTT
SEA WO
SEA BI
Abbreviations:
OS PLC operating system
CL Computer link
SE setting data
OS
OS
OS
OS
OS
OS
OS
OS
FB
OS
OS
OS
OS
CL
CL
OS
OS
CL
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
Note:
Data blocks marked * are generated and initialized by the PLC
operating system on each cold restart, after a general reset. These
blocks are always reinitialized with every automatic cold restart.
FB Description of
Functions
Safety Integrated
1–4
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
12.93
1 Definitions
1.3 Data blocks
DB
No.
DB design.
DB name
Pack.
76
77
78
79
80
81
82
83
Quit FM/BM
DB FM/BM
Quit FM/BM
QUITFMBM
LMDKN 1
LMDKN 2
LMDKN 3
LMDKN 4
EM/OM acknowledgement signals (up to SW2)
DB status words for EMs/OMs (up to SW2)
EM/OM acknowledgement signals (up to SW2)
EM/OM acknowledgement signals (up to SW2)
List for M decoding, NC Channel 1
List for M decoding, NC Channel 2
List for M decoding, NC Channel 3
List for M decoding, NC Channel 4
0
0
0
0
UR
UR
UR
UR
99
100
101
102
103
104
105
.
.
.
Log-Part
NCDAT-T
EIN ASS
AUS ASS
ZWSP-WZD
WZ-V-BO
Assignment user-interface/logical peer destination
Texts for file transfer display (operator request)
Input user interface
Output user interface
Buffer for tool data
Tool management, operator interface
Reserved
.
.
.
CL
CL, 4
CL
CL
CL, 4
122
Reserved
125
126
127
128
129
130
S-SIGNALE
FORM-DB
ZUST-DB
E-PUFFER
A-PUFFER
Standard signals
Format list
Status DB
Input useful data DB
Output useful data DB
Reserved
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
ZW-STAZ
ZW
DYNPUFF 1
DYNPUFF 2
DYNPUFF 3
DYNPUFF 4
DYNPUFF 5
DYNPUFF 6
DYNPUFF 7
DYNPUFF 8
ZW-DATVT
ZW-BT
ZW-ANZBT
ZW-MESS
TO-DATVT
TO-DATLS
ZW-WZV
Status DB for tool life, quantity
Status word DB for punched tape input
Dynamic buffer
Dynamic buffer
Dynamic buffer
Dynamic buffer
Dynamic buffer
Dynamic buffer
Dynamic buffer
Dynamic buffer
Status word DB data distributor 1)
Status word DB operator panel 1)
Display parameters, operator panel
Interface, measurement
TO memory distributor
Buffer for read/write TO data (FB 61/FB 62)
Status words, tool management
CL
CL
CL
CL
CL
CL
CL
6
6
6
6
6
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Abbreviations:
Note:
OS PLC operating
system
0
FB Package 0
CL Computer link
UR User
1
FB Package 1
6
FB Package 6
Data blocks marked * are generated and initialized by the PLC
operating system on each cold restart, after a general reset. These
blocks are always reinitialized with every automatic cold restart.
Data blocks marked 1) are created contiguously according to the
tool management configuration.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
1–5
1 Definitions
1.3 Data blocks
12.93
DB
No.
DB desig.
DB name
Pack.
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
KENN 1
KENN 2
KENN 3
IDENT 1
IDENT 2
DUPLO
ANWEND 1
ANWEND 2
ANWEND 3
ANWEND 4
ANWEND 5
ANWEND 6
ANWEND 7
D-NR. 1
D-NR. 2
D-NR. 3
D-NR. 4
D-NR. 5
D-NR. 6
D-NR. 7
D-NR. 8
D-NR. 9
ERSATZPL
WZAUF1 L1
WZAUF2 L1
WZAUF1 L2
WZAUF2 L2
ADAGE1 L1
ADAGE2 L1
ADAGE1 L2
ADAGE1 L2
ADALAGE
Identifiers
Identifiers
Identifiers
Ident. number
Ident. number
Duplo number
User data 1)
User data 1)
User data 1)
User data 1)
User data 1)
User data 1)
User data 1)
Reference list 1)
Reference list 1)
Reference list 1)
Reference list 1)
Reference list 1)
Reference list 1)
Reference list 1)
Reference list 1)
Reference list 1)
Replacement location number 1)
Tool holder L1 1)
Tool holder L1 1)
Tool holder L2 1)
Tool holder L2 1)
Adapter geometry L1 1)
Adapter geometry L1 1)
Adapter geometry L2 1)
Adapter geometry L2 1)
Adapter position 1)
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Abbreviations:
Note:
OS PLC operating
system
0
FB Package 0
CL Computer link
UR User
1
FB Package 1
Data blocks marked * are generated and initialized by the PLC
operating system on each cold restart, after a general reset. These
blocks are always reinitialized with every automatic cold restart.
Data blocks marked 1) are created contiguously according to the
tool management configuration.
DBs 150 to max. DB 182 are needed when tool management is used. The
actual number of data blocks depends on the "width" of the magazine
table (see documentation: SINUMERIK 840/840C/880/880 GA2, Function
Blocks for PLC 135 WB, Package 1 and 2: Tool Management).
1.3.2
Class DX data blocks
Data blocks DX
Data blocks DX
1–6
0-105 are used or reserved for Siemens applications.
106-255 are available to the user.
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
01.99
1 Definitions
1.4 Function blocks
1.4
Function blocks
1.4.1
Class FB function blocks
Function blocks FB
Function blocks FB
FB
No.
0-199 are used or reserved for Siemens applications.
200-255 are available to the user.
FB desig.
FB name
Pack.
11 *
12 *
17
27
30
EINR-DB
WDTGR
STATUS
IM308C
MUL:16
Create data blocks
Retriggering cycle monitoring
PLC status channel (840C SW 1 and 2)
Profibus interface for 840C (SW 6.1 and higher)
Multiplication of two 16-bit binary numbers
OS
OS
0
0
0
32
33
DIV:16
DIV:32
Division of two 16-bit binary numbers
Division of two 32-bit binary numbers
0
0
35
36
37
DIV/100
ADD:32
SUB:32
Division by 100
Addition of two binary numbers
Subtraction of two binary numbers
0
0
0
39
40
41
DUAL/BCD
COD:16
COD:32
0
42
COD:B4
43
COD:B8
Convert binary to BCD, 4 decades
Convert fixed-point binary number (16 bits) to BCD
number
Convert fixed-point binary number (32 bits) to BCD
number (flags used: FW 220, 238)
Convert BCD number (4 decades) to fixed-point binary
number
Convert BCD number (8 decades) to fixed-point binary
number
0
UP:57/58
UP:FB49
UP:FB45
BTR 8-16
Initial settings for error messages/operational messages
Initial settings for error messages/operational messages
(840C SW 3)
Buffer, error/operational messages
Auxiliary signals for EMs/OMs
Auxiliary signals for EMs/OMs
(840C SW 3)
Subroutine FB57, FB58
Subroutine FB49
Subroutine FB45
Block transfer between 8 bit and 16 bit memory
FM-ANZ
BM-ANZ
MG-ANZ
FM-ABFR
BM-ABFR
MG-ABFR
BLOCK-TR
NCD-LESE
NCD-SCHR
PCD-LESE
PCDSCHR
Display error messages (840C SW 1 and 2)
Display operational messages (840C SW 1 and 2)
Display message groups (840C SW 1 and 2)
Scan error messages
Scan operational messages
Scan message groups (840C SW 1 and 2)
Block transfer
Read NC data
Write NC data
(applies to 880 only)
Read PLC data from PLC 1/2/3/4
Write PLC data to PLC 1/2/3/4
(applies to 880 only)
0
0
0
0
0
0
OS
OS
OS
OS
OS
45
45
GST-FMBM
ANLAUF
47
48
48
49
50
51
52 *
PSP:FMBM
54
55
56
57
58
59
60
61
62
63
64
*
*
*
*
*
FMBM:HSG
FMBM:MMC
0
0
0
0
0
0
0
0
0
0
0
OS
Abbreviations:
Note:
OS PLC operating system
0 FB Package 0
Blocks marked * are function macros which are integrated in
the PLC operating system.
(see description of FUNCTION MACROS)
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
1–7
1 Definitions
1.4.1 Class FB function blocks
FB
No.
12.93
FB desig.
FB name
Pack.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
M-STACK
STACK-M
T:RI->ACH
AP RUF
G-DECOD
T:NS->EAM
T:EAM->NS
T:NCK->DB
T:DB->NCK
T:SPI->DB
T:DB->SPI
T:ACH->DB
T:DB->ACH
T:MS->KN
T:MS->ACH
Transfer flags --> flag stack
Flag stack
--> transfer flags
Transfer direction keys (840C T version) to axes
Aperiodic program call
G functions decoding
Transfer interface DB to I/Q/F
Transfer I/Q/F to interface DB
Transfer NC channel --> DB channel
Transfer DB channel --> NC channel
Transfer spindle --> DB spindle
Transfer DB spindle --> spindle
Transfer axis --> DB axis
Transfer DB axis --> axis
Transfer machine control panel --> NC channel
Transfer machine control panel --> DB axis (840C M version)
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
OS
88 *
89 *
BA-LAMPE
BAA-LESE
Mode LED driver
Read block start address
OS
OS
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113*
114
115
116
117
118
119
120
AK2:V/R
AK3:AUT
ALS:V/R
ALS:AUT
RK:S880
RK:TWZD
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Sequencer forwards/reverse
Sequencer reverse
Sequencer forwards/reverse Graph 5
Sequencer automatic Graph 5
Computer link FB
Reserved, transfer tool data
Reserved
Reserved
Reserved
RK:GLOBA Global functions
RK:MELDG Messages
RK:NCDAT File transfer (operator request)
Reserved
Reserved
Reserved
Reserved
UP:FB101
Subroutine for FB 101
UP:RK880
Subroutine
Reserved
SUCH
Search for word
SUCHROUT Search routine
LEERPL1
Search for empty location without default
SUCH-SYM Direction of search, symmetrical
SUCH-VOR Forward search
SUCH-RWS Backward search
WZV-INIT
Initialize tool management
EINR-MAG
Create magazine table
WZ-GR:ST
Standard tool size
Reserved
Reserved
Abbreviations:
0
0
0
0
CL, 4
CL, 5
CL
CL
CL
CL, 4
CL, 4
CL, 4
CL
CL
CL
CL
CL, 4
CL, 4
CL
0
1
1
OS
1
1
1
1
1
1
Note:
OS
0
1
4
PLC operating system Blocks marked * are function macros which are integrated in the
FB Package 0
PLC operating system
FB Package 1
(see description of FUNCTION MACROS).
FB Package 4 of
computer link
CL Computer link
1–8
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
06.93
1 Definitions
1.4.1 Class FB function blocks
FB
No.
FB desig.
FB name
121
122
123
124
125
LEERPL2
WZ-BS
UP: T=ID
UP: T=PL
Reserved
Search for empty location with default
Prepare tool
Subroutine tool search T = ident
Subroutine tool search T = location
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160 1)
161 1)
162 1)
163 1)
164 1)
165 1)
166 1)
167 1)
168 1)
169 1)
170 1)
Pack.
UP:ZW-SP
TRANSFER
Transfer tool data
Reserved
TOS-VER
Subroutine
UP: MD-B
Subroutine MD bits
UP: MD-W
Subroutine MD words
RI-AUSW
Direction selection
TODAT-W
Reserved
D-NR:WZW Prepare D number after tool change
WZDAT-LS Read tool data
Subroutine
DYN-PUFF
Management of data I/O buffers
DAT-VERT
Processing of data I/O buffers
UP: FB139
Subroutines of FB 139
UP: KC-0
Subroutines of FB 139
UP: KC1-4
Subroutines of FB 139
UP: KC5-7
Subroutines of FB 139
UP:KC8+9
Subroutines of FB 139
BEL-CDTR
Load tool with code carrier
ENT-CDTR Unload tool with code carrier
CT-FORMAT Formatting
Reserved
Reserved
Reserved
Reserved
NP-SIF
Subroutine
AD-AD
Subroutine
RK: AW-SS User interface for CL (processing)
LOCHSTEG Punched tape input
STAZ/VWG Tool life monitor (prewarning limit)
STUE/VWG Monitor for no. of pieces (prewarning limit)
WZ-SPER
Tool lockout
BCD-DUAL BCD/binary conversion
Central calling block
Subroutine check
Spare
Spare
Transfer tool selection
Reserved
Signal: load spindle
Signal: unload spindle
Acknowledge spindle
Spare
Assignments, buffer
Abbreviations:
Note:
1
6
Blocks marked 1) are part of the user interface example of tool
management.
FB Package 1
FB Package 6
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
6
6
6
6
6
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1–9
1 Definitions
1.4.1 Class FB function blocks
FB
No.
FB desig.
171 1)
172 1)
173 1)
174 1)
175 1)
176 1)
177 1)
178 1)
179 1)
180 1)
181 1)
182 1)
183 1)
184 1)
185 1)
186 1)
187 1)
188 1)
189 1)
190 1)
191 1)
192 1)
193 1)
194 1)
195
196
197
198
199
WZ-LISTE
TAUSCHL
FIFO
06.93
FB name
Pack.
Magazine assignments
Selection tool according to T number
Load/unload magazine from preselect/spindle
Spare
Display tool data from buffer assignments
Change tool data from buffer assignments
Display tool data from magazine assignments
Change tool data from magazine assignments
Selection tool according to cursor position from magazine
assignments
Additional cutter from buffer and magazine
Additional cuffer from loading
Load
Unload
Spare
Manual acknowledgement
Abort manual magazine/spindle
Display next cutter
Reactivate tool
Delete last cutter
Select loading display, punched tape
Acknowledge punched tape positive/negative
Abort punched tape
Spare
Spare
Reserved
Reserved
Open tool list
Open swap list
Buffer processing
Abbreviations:
Note:
1
Blocks marked 1) are part of the user interface example of tool
management.
FB Package 1
1–10
© Siemens AG 1993 All Rights Reserved
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
6FC5197- AA30
SINUMERIK 840C (PJ)
09.95
1.4.2
1 Definitions
1.4.2 Class FX function blocks
Class FX function blocks
Function blocks FX 0-99 are used or reserved for Siemens applications.
FX No. FX desig.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
:
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
:
54
SI
SIMULAT
WZ-GRIEP
BEL-CDTR
ENT-CDTR
UP-CDTR
DAT-EIN
DAT-AUS
DAT-UHR
GRAYDUAL
DUALGRAY
RECHNEN
MESSEN
RESREQ
PRO-KO1
PRO-KO2
RK:WZABF
RK: WZM
RK: WZBEL
RK: WZENT
RK:WZBGB
RK:KASSE
UPWZKASS
EA-TRAN
UPWZDIAL
FX name
Pack.
Self-start-up
Reserved
Reserved
Reserved
Reserved
Reserved
Simulation of a part program
Presetting tool size via EPROM
Reserved
Reserved
Reserved
Reserved
Reserved
Load code carrier
Unload code carrier
Subroutine code carrier
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
PLC-controlled data input
PLC-controlled data output
Date/time
Reserved
Reserved
Gray code/binary converter
Binary/gray code converter
Contour and technology calculation
Measuring in JOG mode
Triggering link bus reset
Reserved
Reserved
Program coordination (840C SW 2 and higher)
Subroutine FX 38
Computer link, interrogate tool
Computer link, report tool
Computer link, load tool
Computer link, unload tool
Computer link, load magazine assignment data
Tool cassette processing
Reserved
Reserved
Subroutine tool cassette processing
Data transfer I/O buffer Tool management
Subroutine tool dialog
Reserved
Reserved
Reserved
OS
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
1
1
1
1
1
1
7
7
7
CL
CL
CL
8
8
8
CL
CL
0
0
CP
CP
0
CL
CL
0
0
5
5
5
5
5
5
5
5
5
1–11
1 Definitions
1.4.2 Class FX function blocks
FX No. FX desig.
55
56
57
58
59
60
DIAGNOSE
ALLFUNK 1
ALLFUNK 2
SINFUNKT
PLCFUNKT
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
:
99
12.93
FX name
Pack.
Diagnostics main module
General functions 1
General functions 2
SINUMERIK-dependent functions
PLC-dependent functions
Reserved
Reserved
Logging measuring data
Transfer part program
Process part program
Printer output
Subroutine
Send data to MMC (reserved for OEM customers)
Receive data from MMC (reserved for OEM customers)
Decode axis-specific G functions (840C SW 3 and higher)
Reserved
Reserved address calculation flag area
Reserved
Reserved
Reserved
IKONEN
Icon display
STERNDRE Star-delta switchover (840C SW 3)
Reserved PG functions
Reserved PG functions
Reserved PG functions
Reserved PG functions
Reserved PG functions
Reserved PG functions
Reserved
PRO-MESS
TP-UEB
TP-BEARB
DRU-AUSG
PRO-UP1
OEM-SEND
OEM-EMPF
AX-G-FKT
8
8
8
8
8
OS
OS
OS
0
0
Reserved
Abbreviations:
0
1
5
7
FB Package 0
FB Package 1
FB Package 5
FB Package 7
8
OS
CP
CL
FB Package 8
PLC Operating System
Cycles Package
Computer Link
Caution:
1. Make sure that no confusion with SINUMERIK blocks is possible. The user must not utilize
a SINUMERIK standard block name, nor may he assign a SINUMERIK library number to
his user blocks.
2. In the range of FB 0 - FB 199
FX 0 - FX 99 SINUMERIK blocks have absolute priority.
If SINUMERIK blocks must be used at a later time that overlap user block numbers, the
user blocks must be given a new number.
END OF SECTION
1–12
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
2
Data Sheets for Digital Functions
FB 30 MUL:16
Multiplier:16
1. Description
The ”Multiplier:16” function block can be used to multiply two fixed-point binary numbers
(15+1 bits).
The result is a fixed-point binary number (31 + 1 bits).
The function block also scans the result for ”zero”.
If 8-bit numbers are to be multiplied, they must be transferred to 16-bit words.
Function:
2.
Y=AxB
Y = Z32, Z31; A = Z1; B = Z2
Block data
Lib. No.
: E88530-B 6030-A-_ _
FBs to be loaded
: FB30
DBs to be loaded
: None
Type of FB call
: Unconditional
DBs to be input
: None
Error messages
: None
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
2–1
2 Data Sheets for Digital Functions
FB 30 MUL:16 Multiplier:16
06.93
3. Block call
FB 30 MUL:16
I,W
– Z1
I,W
– Z2
Z3=0
– Q,BI
Z32
– Q,W
Z31
– Q,W
4. Signal descriptions
Z1,
Z2
Multiplicand, multiplier
The multiplicand must be stored in Z1, the multiplier in Z2.
Z3=0
Result = 0
A ”1” signal indicates that the arithmetic result is zero.
Z32,
Z31
Product H word, product L word
The high word of the arithmetic result is stored (with sign) in Z32, the low word in
Z31.
5. Program example
NAME
Z1
Z2
Z3=0
Z32
Z31
2–2
:
:
:
:
:
:
:
:
:
:
:
L
T
L
T
JU
MUL:
KF
FW
KF
FW
FB
16
FW
FW
F
FW
FW
+512
100
+1024
102
30
100
102
104.0
106
108
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 32 DIV:16 16-bit binary divider
FB 32 DIV:16
16-bit binary divider
1. Description
The ”Divider:16” function block is used to divide two fixed-point binary numbers (15+1 bits).
The result (quotient and remainder) is a fixed-point binary number (15 + 1 bits).
The function block also scans the result for ”zero”.
If 8-bit numbers are to be divided, they must be transferred to 16-bit words.
Function:
A
Y = –––
B
Y = Z3; remainder = Z4
A = Z1, B = Z2
2.
Block data
Lib. No.
: E88530-B 6032-A-_ _
FBs to be loaded
: FB32
DBs to be loaded
: None
Type of FB call
: Unconditional or conditional
DBs to be input
: None
Error messages
: None
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
2–3
2 Data Sheets for Digital Functions
FB 32 DIV:16 16-bit binary divider
06.93
3. Block call
FB 32 DIV:16
I, W –
Z1
OV
– Q,BI
I, W –
Z2
FEH
– Q,BI
Z3=0
– Q,BI
Z4=0
– Q,BI
Z3
– Q,W
Z4
– Q,W
4. Signal descriptions
Z1, Z2
The dividend must be stored in Z1, the divisor in Z2.
OV
A ”1” signal indicates overflow (divisor is negative).
FEH
Output FEH is set on division by zero.
Z3=0
A ”1” signal indicates that the arithmetic result is zero.
Z4=0
A ”1” signal indicates that the remainder is zero.
Z3, Z4
The result of the division is stored in Z3, the remainder in Z4.
5. Program example
NAME
Z1
Z2
0V
FEH
Z3=0
Z4=0
Z3
Z4
2–4
:
:
:
:
:
:
:
:
:
:
:
:
:
:
L
T
L
T
JU
DIV:
KF
FW
KF
FW
FB
16
FW
FW
F
F
F
F
FW
FW
+1025
100
+512
102
32
100
102
104.0
104.1
104.2
104.3
106
108
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 33 DIV:32 Divider:32
FB 33 DIV:32
Divider:32
1. Description
The ”Divider:32” function block divides two fixed-point binary numbers (31+1 bits).
The result (quotient and remainder) is a fixed-point binary number (31 + 1 bits).
The function block also scans the result for ”zero”.
Function:
Y=
A
––––
B
Y = Z32, Z31; remainder = Z42, Z41
A = Z12, Z11; B
2.
= Z22, Z21
Block data
Lib. No.
: E88530-B 6033-A-_ _
FBs to be loaded
: FB33
DBs to be loaded
: None
Type of FB call
: Unconditional
DBs to be input
: None
Error messages
: None
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–5
2 Data Sheets for Digital Functions
FB 33 DIV:32 Divider:32
06.93
3. Block call
FB 33 DIV:32
I, W –
Z12
OV
– Q,BI
I, W –
Z11
FEH
– Q,BI
I, W –
Z22 Z3=0
– Q,BI
I, W –
Z21 Z4=0
– Q,BI
Z32
– Q,W
Z31
– Q,W
Z42
– Q,W
Z41
– Q,W
4. Signal descriptions
Z12,
Z11
High-word dividend, low-word dividend
The high word of the dividend must be stored in Z12 and the low word in Z11.
Z22,
Z21
High-word divisor (bits 16 to 31), low-word divisor (bits 0 to 15)
The high word of the divisor must be stored in Z22 and the low word in Z21.
OV
Overflow
A ”1” signal signifies an overflow.
FEH
Fault (division by 0)
Output FEH is set on division by zero.
Z3=0
Quotient equal to zero
A ”1” signal indicates that the arithmetic result is zero.
Z4=0
Remainder equal to zero
A ”1” signal indicates that the remainder of the division is zero.
Z32,
Z31
High-word quotient (bits 16 to 31), low-word quotient (bits 0 to 15)
The high word of the arithmetic result (with sign) is stored in Z32, the low word in
Z31.
Z42,
Z41
High-word remainder (bits 16 to 31), low-word remainder (bits 0 to 15)
The remainder of the division is output in words Z42 (high word) and Z41 (low
word).
2–6
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 33 DIV:32 Divider:32
5. Program example
NAME
Z12
Z11
Z22
Z21
0V
FEH
Z3=0
Z4=0
Z32
Z31
Z42
Z41
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
L
KF
T
FW
L
KF
T
FW
L
KF
T
FW
L
KF
T
FW
JU
FB
DIV:32
FW
FW
FW
FW
F
F
F
F
FW
FW
FW
FW
+8
100
+1
102
+4
104
+0
106
33
100
102
104
106
108.0
108.1
108.2
108.3
110
112
114
116
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–7
2 Data Sheets for Digital Functions
FB 35 DIV/100 Divide by 100
06.93
FB 35 DIV/100
Divide by 100
1. Description
The "Divide by 100" function block divides a positive binary number (max. 6553500) by 100.
The result is also a binary number.
The divisor is not subjected to a range check.
2.
Block data
Lib. No.
: E88530-B 6035-A-_ _
FBs to be loaded
: FB35
DBs to be loaded
: None
Type of FB call
: Unconditional
DBs to be input
: None
Error messages
: None
2–8
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 35 DIV/100 Divide by 100
3. Block call
FB 35 DIV/100
I, W –
Z12
I, W –
Z11
Z2
– Q,W
4. Signal descriptions
Z12,
Z11
High word dividend, low word dividend
The high word of the dividend is stored in Z12 (right justified), the low word in Z11.
Z2
Result
Word in which the result of the division is stored (must always be interpreted as a
positive number).
5. Program example
NAME
Z12
Z11
Z2
:
:
:
:
:
:
:
:
:
L
KF
T
FW
L
KF
T
FW
JU
FB
DIV/100
FW
FW
FW
10
100
+1000
102
35
100
102
104
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–9
2 Data Sheets for Digital Functions
FB 36 ADD:32 Adder: 32 bits
06.93
FB 36 ADD:32
Adder:32 bits
1. Description
The ”Adder:32” function block adds two fixed-point binary numbers (31+1 bits).
The result is a fixed-point binary number (31 + 1 bit).
The function block additionally contains a scan of the result for "zero".
If 8-bit numbers are to be added, they must be transferred to 16-bit words.
Function:
Y=A+B
Y = Z32, Z31; A = Z12, Z11; B = Z22, Z21
2.
Block data
Lib. No.
: E88530-B 6036-A-_ _
FBs to be loaded
: FB36
DBs to be loaded
: None
Type of FB call
: Unconditional
DBs to be input
: None
Error messages
: None
2–10
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 36 ADD:32 Adder: 32 bits
3. Block call
FB 36 ADD:32
I, W –
Z12 Z3=0
– Q,BI
I, W –
Z11
OV
– Q,BI
I,W –
Z22
I,W –
Z21
Z32
– Q,W
Z31
– Q,W
4. Signal descriptions
Z12,
Z11
Summand 1, H word
L word
Z22,
Z21
Summand 2, H word
L word
Z3=0
A ”1” signal indicates that the arithmetic result is zero.
OV
A ”1” signal indicates an overflow.
Z32,
Z31
Sum, H word (with sign)
L word
5. Program example
NAME
Z12
Z11
Z22
Z21
0V
Z3=0
Z32
Z31
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
L
T
L
T
L
T
L
T
JU
ADD:
KF
FW
KF
FW
KF
FW
KF
FW
FB
32
FW
FW
FW
FW
F
F
FW
FW
+4
100
+256
102
+2
104
+128
106
36
100
102
104
106
108.0
108.1
110
112
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–11
2 Data Sheets for Digital Functions
FB 37 SUB:32 Subtracter: 32 bits
06.93
FB 37 SUB:32
Subtracter: 32 bits
1. Description
The ”Subtracter:32” function block is used to subtract two fixed-point binary values
(31+1 bits).
The result is a fixed-point binary number (31 + 1 bit).
The function block additionally contains a scan of the result for "zero".
If 8-bit numbers are to be subtracted, they must be transferred to 16-bit words.
Function:
Y=A-B
Y = Z32, Z31; A = Z12, Z11; B = Z22, Z21
2.
Block data
Lib. No.
: E88530-B 6037-A-_ _
FBs to be loaded
: FB37
DBs to be loaded
: None
Type of FB call
: Unconditional
DBs to be input
: None
Error messages
: None
2–12
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 37 SUB:32 Subtracter: 32 bits
3. Block call
FB 37 SUB:32
I, W –
Z12 Z3=0
– Q,BI
I, W –
Z11
OV
– Q,BI
I,W –
Z22
I,W –
Z21
Z32
– Q,W
Z31
– Q,W
4. Signal descriptions
Z12,
Z11
Minuend 1, high word
Low word
Z22,
Z21
Subtrahend 2, high word
Low word
Z3=0
A ”1” signal indicates that the arithmetic result is zero.
OV
A ”1” signal indicates an overflow.
Z32,
Z31
Difference, high word (with sign)
Low word
5. Program example
NAME
Z12
Z11
Z22
Z21
OV
Z3=0
Z32
Z31
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
L
T
L
T
L
T
L
T
JU
SUB:
KF
FW
KF
FW
KF
FW
KF
FW
FB
32
FW
FW
FW
FW
F
F
FW
FW
+8
100
+512
102
+4
104
+256
106
37
100
102
104
106
108.0
108.1
110
112
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–13
2 Data Sheets for Digital Functions
FB 39 DUAL/BCD 3-decade binary BCD converter
06.93
FB 39 DUAL/BCD
3-decade binary/BCD converter
1. Description
This function block converts a binary number (0-999) into BCD.
The binary number is not checked for validity.
If data words are to be converted, they must be located in a DB and this DB must be invoked
prior to conversion.
2.
Block data
Lib. No.
: E88530-B 6039-A-_ _
FBs to be loaded
: FB39
DBs to be loaded
: None
Type of FB call
: Unconditional or conditional (JU FB39 or JC FB39)
DBs to be input
: None
Error messages
: None
2–14
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 39 DUAL/BCD 3-decade binary BCD converter
3. Block call
FB 39 DUAL/BCD
I, W –
DUAL BCD
– Q,W
4. Signal descriptions
DUAL
Word containing the binary-coded number.
BCD
Word in which the BCD-coded number is to be stored.
5. Program example
NAME
DUAL
BCD
:
:
:
:
:
:
L
KF
T
FW
JU
FB
DUAL/BCD
FW
FW
+1234
100
39
100
102
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–15
2 Data Sheets for Digital Functions
FB 40 COD:16 Binary/BCD converter
06.93
FB 40 COD:16
Binary/BCD converter
1. Description
The ”Binary/BCD converter” function block converts a fixed-point binary number (15+1 bits)
into a signed BCD number.
Binary number
: 15 + 1 bits
Result
: 6-decade signed BCD number
2.
Block data
Lib. No.
: E88530-B 6040-A-_ _
FBs to be loaded
: FB40
DBs to be loaded
: None
Type of FB call
: Unconditional or conditional
DBs to be input
: None
Error messages
: None
2–16
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 40 COD:16 Binary/BCD converter
3. Block call
FB 40 COD:16
I, W – DUAL SBCD
– Q,BI
BCD2
– Q,BY
BCD1
– Q,W
4. Signal descriptions
DUAL
Binary number, permissible range -32768 to +32767
SBCD
Sign of BCD number; ”1” = negative
BCD2
BCD number, decades 4 to 5
BCD1
BCD number, decades 0 to 3
5. Program example
NAME
DUAL
SBCD
BCD2
BCD1
:
:
:
:
:
:
:
:
L
T
JU
COD:
KF
FW
FB
16
FW
F
FB
FW
-32768
100
40
100
102.0
103
104
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–17
2 Data Sheets for Digital Functions
FB 41 COD:32 Binary/BCD converter
06.93
FB 41 COD:32
Binary/BCD converter
1. Description
The ”Binary/BCD converter” function block converts a fixed-point binary value (31+1 bits) into
a signed BCD number.
Binary number
: 31+1 bits
Result
: 10-decade signed BCD number
2.
Block data
Lib. No.
: E88530-B 6041-A-_ _
FBs to be loaded
: FB41
DBs to be loaded
: None
Type of FB call
: Unconditional or conditional
DBs to be input
: None
Error messages
: None
2–18
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 41 COD:32 Binary/BCD converter
3. Block call
FB 41 COD:32
I, W – DU 2 SBCD – Q,BI
I, W – DU 1 BCD3 – Q,BY
BCD2 – Q,W
BCD1 – Q,W
4. Signal descriptions
DU 2
Binary number, range -32768 to +32767, high word
DU 1
Binary number, range -32768 to +32767, low word
SBCD
Sign of the BCD number, ”1” = negative
BCD3
BCD number, decades 8 to 9
BCD2
BCD number, decades 4 to 7
BCD1
BCD number, decades 0 to 3
5. Program example
NAME
DU 2
DU 1
SBCD
BCD3
BCD2
BCD1
:
:
:
:
:
:
:
:
:
:
:
:
L
T
L
T
JU
COD:
KF
FW
KF
FW
FB
32
FW
FW
F
FB
FW
FW
+1024
100
+4096
102
41
100
102
104.0
105
106
108
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–19
2 Data Sheets for Digital Functions
FB 42 COD:B4 BCD/binary converter
06.93
FB 42 COD:B4
BCD/binary converter
1. Description
The"Binary/BCD converter" function block converts a BCD number (+/-9999) into binary.
BCD number
: 4 decades + sign
Result
: Fixed-point binary number comprising 15+1 bits
2.
Block data
Lib. No.
: E88530-B 6042-A-_ _
FBs to be loaded
: FB42
DBs to be loaded
: None
Type of FB call
: Unconditional or conditional
DBs to be input
: None
Error messages
: None
2–20
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 42 COD:B4 BCD/binary converter
3. Block call
FB 42 COD:B4
I, W –
BCD DUAL
I, BI –
SBCD
– Q,W
4. Signal descriptions
BCD
BCD number, permissible range -9999 to +9999
SBCD
Sign of the BCD number, "1" = negative
DUAL
Binary number comprising 15 + 1 bits
5. Program example
NAME
BCD
SBCD
DUAL
:
:
:
:
:
:
:
:
:
L
T
L
T
JU
COD:
KH
FW
KF
FW
FB
B4
FW
F
FW
1024
100
+0
102
42
100
102.0
104
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–21
2 Data Sheets for Digital Functions
FB 43 COD:B8 BCD/binary converter
06.93
FB 43 COD:B8
BCD/binary converter
1. Description
The ”BCD/binary converter” function block converts a BCD number (+/– 99 999 999) into
binary.
Input, BCD number
: 8 decades + sign
Result
: Fixed-point binary number 31 + 1 bit
2.
Block data
Lib. No.
: E88530-B 6043-A-_ _
FBs to be loaded
: FB43
DBs to be loaded
: None
Type of FB call
: Unconditional or conditional
DBs to be input
: None
Error messages
: None
2–22
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 43 COD:B8 BCD/binary converter
3. Block call
FB 43 COD:B8
I, W –
BCD2 DU 2 – Q,W
I, W –
BCD1 DU 1 – Q,W
I, BI –
SBCD
4. Signal descriptions
BCD2
BCD number, decades 4 to 7
BCD1
BCD number, decades 0 to 3
SBCD
Sign of the BCD number; "1" = negative
DU 2
Binary number, bits 16 to 31
DU 1
Binary number, bits 0 to 15
5. Program example
NAME
BCD2
BCD1
SBCD
DU 2
DU 1
:
:
:
:
:
:
:
:
:
:
:
:
:
L
T
L
T
L
T
JU
COD:
KH
FW
KH
FW
KF
FW
FB
B8
FW
FW
F
FW
FW
0419
100
4304
102
+0
104
43
100
102
104.0
106
108
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–23
2 Data Sheets for Digital Functions
FB 110 SUCH Search for word
06.93
FB 110 SUCH
Search for word
1. Description
This block scans a specific data field for the specified search key. If the search key exceeds
one word, the related words may be located either in contiguous data words in a single data
block (serial) or in a group of corresponding data words in two or more data blocks (parallel)
(see figure). Information can be masked out by defining an appropriate mask.
The search key and the mask must be stored in free data words of the data block to be
searched prior to the scan.
If a value which is identical to the variable is found, the function block outputs the address of
the data word containing that value.
In the case of serial storage of data, where the information width exceeds one word, the
address of the high word is output, if it exists. Otherwise the low word is output.
Parallel storage
DB n
Serial storage
DB n+1
DB
DW0
DW0
Mask high word
Mask low word
DW1
(DWM)
Mask high word
Variable high
word
Variable low
word
DW2
(DWV)
Mask low word
DW3
(ANF)
Variable
high word
High word
.
Low word
.
.
.
.
.
.
.
.
.
.
.
.
.
DW1
(DWM)
DW3
(DWV)
DW5
(ANF)
Variable
low word
High
word
Low
word
.
.
.
DW40 (END)
Figure:
2–24
.
High
word
DW39
(END)
Example: Search key with two words
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2.
2 Data Sheets for Digital Functions
FB 110 SUCH Search for word
Block data
Lib. No.
: E88530-B 6110-A-_ _
FBs to be loaded
: FB110
DBs to be loaded
: None
Type of FB call
: Unconditonal (JU FB110)
DBs to be input
: DB for storage of data in series
DB - DBx (x = DB + ANZ - 1) for parallel storage of data
Error messages
: None
3. Block call
FB 110 SUCH
I,BY
–
DB
ENDE
– Q,BI
I,BY
–
DMV
GEF
– Q,BI
I,BY
–
DWM
ADR
– Q,BY
I,BY
–
ANZ
I,BI
–
P/R
I,BY
–
ANF
I,BY
–
END
I,W
–
ZW
*F 2.1 –
GST
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–25
2 Data Sheets for Digital Functions
FB 110 SUCH Search for word
06.93
4. Signal descriptions
DB
Number of data block
If P/R = 1: Number of first data block when ANZ > 1
DWV
Data word containing variable (search key)
Number of DW containing search key (first DW if ANZ > 1)
DWM
Data word containing mask
Number of DW containing mask (first DW if ANZ > 1). The mask is used to mask
out bits, i.e. only those bits in the data words are taken into account during the
search for which ”1” was defined in the mask.
ANZ
Number of data words in a search key
P/R
Parallel or serial
P/R = 1: Data are stored in parallel
P/R = 0: Data are stored serially
ANF
Start address
Start address (DW no.) of search area
END
End address
End address (DW no.) of search area
ZW
Status word
ENDE
End of search operation (static signal)
GEF
Found
Search key has been found (static signal)
ADR
Address (binary)
DW number of data word containing the value found (= search key)
GST
Initial state
Note:
All values must be specified in binary.
2–26
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FB 110 SUCH Search for word
5. Program example
NAME
DB
DWV
DWM
ANZ
P/R
ANF
END
ZW
ENDE
GEF
ADR
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
C
DB
L
KH
T
DW
L
KH
T
DW
T
DW
L
KH
T
DW
L
KF
T
FY
L
KF
T
FY
L
KF
T
FY
L
KF
T
FY
U
F
=
F
L
KF
T
FY
L
KF
T
FY
JU
FB
SUCH
FY
FY
FY
FY
F
FY
FY
MW
F
F
FY
110
FFF0
2
1234
1
101
1235
100
+110
100
+1
101
+2
102
+1
103
0.0
104.0
+10
105
+210
106
110
100
101
102
103
104.0
105
106
107
104.1
104.2
109
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–27
2 Data Sheets for Digital Functions
FX 31 GRAYDUAL Gray code/binary converter
FX 31
06.93
GRAYDUAL
Gray code/binary converter
1. Description
The ”GRAYDUAL” function block converts a Gray-coded numeric value (cyclically permuted
code) to a fixed-point binary number.
Input
: Gray-coded number with up to 15 tracks
Result
: Fixed-point number, 15 + 1 bits
Decimal
equivalent
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Representation
in Gray code
5-digit
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
Fig. 1: Gray code
2–28
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FX 31 GRAYDUAL Gray code/binary converter
2. Block data
Lib.-No.
: E88530-B 6231-A-_ _
FBs to be loaded
: FX31
DBs to be loaded
: None
Type of FB call
: Unconditional or conditional
DBs to be input
: None
Error messages
: % 1: Track 16 used by GRAY
3. Block call
FB 31 GRAY DUAL
I, W –
GRAY DUAL – Q,W
– %1
4. Signal descriptions
GRAY
GRAY-coded number, max. 15 tracks
DUAL
Binary number 15 bits (always positive)
permissible range: 0 to +32767
5. Program example
NAME
GRAY
DUAL
:
:
:
:
:
:
L
KF
+1234
T
FW 100
BA
FX
31
GRAY DUAL
FW 100
FW 102
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–29
2 Data Sheets for Digital Functions
FX 32 DUALGRAY Binary/Gray code converter
FX 32
06.93
DUALGRAY
Binary/Gray code converter
1. Description
Function block DUALGRAY converts a positive, fixed-point binary number to a Gray-coded
numeric value (cyclically permuted code).
Input:
Fixed-point binary number of up 15 bits, values from 0 to +32767
Result:
Gray-coded numeric value with up to 15 tracks (5-digit Gray code, see FX 31).
2. Block data
Lib.-No.
: E88530-B 6232-A-_ _
FBs to be loaded
: FX32
DBs to be loaded
: None
Type of FB call
: Unconditional or conditional
DBs to be input
: None
Error messages
: % 1: bit 16 used by binary
3. Block call
FB 32 DUAL GRAY
I, W –
DUAL GRAY – Q,W
– %1
4. Signal descriptions
DUAL
Fixed-point binary number, 15 bits, permissible range: 0 to +32767, lowest bit: .0
GRAY
GRAY-coded number, up to 15 tracks used (always positive)
5. Program example
NAME
DUAL
GRAY
2–30
:
:
:
:
:
:
L
KF
+1234
T
FW 100
BA
FX
32
DUAL GRAY
FW 100
FW 102
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
09.95
FX 35
2 Data Sheets for Digital Functions
FX 35 RESREQ Triggering link bus reset
RESREQ
Triggering link bus reset
1. Description
When this block is called, a link bus reset is triggered.
Depending on the ”NEUS” parameter, a PLC cold or warm restart is triggered.
"NEUS"=1, e.g. through connection with flag F01, => PLC cold restart is triggered.
"NEUS"=0, e.g. through connection with flag F00, => PLC warm restart is triggered.
Caution:
If the PLC machine data MD 6049.1, cold restart on reset=1, a PLC cold restart is always
triggered, independent of the ”NEUS” parameter.
The block is written in the C high-level language and must not be edited.
2. Block data
Lib. No.:
E88530-B 6235-A-_ _ (current version is 22)
FBs to be loaded:
None
FXs to be loaded:
None
DBs to be loaded:
None
DXs to be loaded:
None
Type of call:
Conditional
DBs to be input:
None
DXs to be input:
None
Error messages:
None
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–31
2 Data Sheets for Digital Functions
FX 38 PRO-KO1 Program coordination
FX 38
06.93
PRO-KO1
Program coordination
1. Description
Function blocks FX 38 and FX 39 (SW2 and higher) support program coordination in the NC.
The PLC basic program checks the channel-specific NC coordination commands, conditions
them suitably for MC-5 and transfers them to the user interface. FX 38 and FX 39 check the
interface data blocks DB 10 - DB 25 (DW 52 - DW 55) for a coordination command and
evaluate it.
On cold and warm restarts, the entire user interface area for program coordination is reset in
the channel data blocks (DW 52 - DL 62). The buffer (DW 56 - DL 62) is erased on reset,
thus enabling restart of the NC part program.
DW 61 contains a detailed error code:
The following error numbers exist (detailed error code in DW 61):
Process
Response
–
–
–
–
–
–
FB62 ended with error
Not all programs ended
Not all wait-M marks reached
The channels addressed are not enabled
Incorrect command code
Start command not enabled for block search
Read-in disable
None
None
Read-in disable
None
None
2.
Block data
Lib.No.
: E88530-B 6238-A-_ _
FBs to be loaded
: None
FXs to be loaded
: FX 38, FX 39
DBs to be loaded
: None
DXs to be loaded
: None
Type of FX call
: Unconditional
DBs to be input
: None
DXs to be input
: None
Error messages
: % 1: Block FX 39 not loaded
2–32
Detailed error code
1
2
3
4
5
6
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FX 38 PRO-KO1 Program coordination
3. Block call
FX 38 PRO-KO1
D, KF
–
NSBY –
– %1
4. Signal descriptions
NSBY
Interface byte
Interface byte in DB 36 to initiate a program with FB 62
5. Program example
NAME
NSBY
: BA FX 38
: PRO-KO1
: KF+5
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
Unassigned interface byte e.g. ”5”
6FC5 197- AA30
2–33
2 Data Sheets for Digital Functions
FX 81 IKONEN Icon display
FX 81
06.93
IKONEN
Icon display (SW 2 and higher)
1. Description
The function block supplies the interface in DB66 for display of ICONS integrated in the MMC.
A maximum of 4 different icons can be displayed. They appear in the two right-hand of the
three icon fields underneath the system clock. The 1st icon field (far left) is supplied by the
MMC sitself, the 2nd and 3rd fields are supplied by the FX81 as follows:
2nd field: ”Axis traversing” or ”Override = 0%”
3rd field ”Program running” or ”Program interrrupted” or Stop (M00/M01) or Block Search.
a
aaaaaa
a
a
a
a
a
aaaaaa
a
aa
aaa
Representation:
a
aaaaaaa
aaa
a
aa
aaa
aa
aa
aa
a
a
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
a
a
a
a
a
a
a
a
a
aaaaaaaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
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
a
aa
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
aa
a
a
a
Axis traversing
Feed override = 0%
The icons are displayed for all channels and axes.
The following priorities apply:
Axis traversing:
Override = 0%:
Program running:
Program interrupted:
As soon as an traversing command for any axis is active and
the overrride at the machine control panel is set to 0%.
When feed override is on 0% at one or more machine control
panel.
If the signal ”Program running” is active in any channel.
If the signal ”Program running” is not active in any channel
and if, in addition, a program interrupt has been triggered in
any channel by means of STOP, change of mode or
M00/M01 or if block search has been activated. In the case
of single block operation, ”Programm interrupted” is displayed after the respective block has been executed.
2. Block data:
FBs to be loaded:
FXs to be loaded:
DBs to be loaded:
DXs to be loaded:
Type of call:
DBs/DXs to be input:
Error messages:
2–34
None
FX81
None
None
Unconditional
None
None
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
2 Data Sheets for Digital Functions
FX 81 IKONEN Icon display
3. Block call
FX 81 IKONEN
Block data:
Processing time
Nesting depth:
Block length:
Assigned variables:
Call length:
0.2 ms
0
100
FW 250, FW 254
4
4. Program example
NAME
:
:
:
:
= F...
DO FX 81
IKONEN
A I...
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
2–35
2 Data Sheets for Digital Functions
FX 82 STERNDRE Star-delta switchover
FX 82
12.93
STERNDRE
Star-delta switchover
1. Description
The function block, "Star-delta switchover" (SW 3 and higher) performs a defined reversing
logic (time-controlled) from a star to a delta connection and vice versa. The block must be
called up separately for each spindle.
The function block can only be used with digital main spindle drives. Two separate contactors
perform the switchover which is executed in the following four steps:
Step 1:
Interface signal "Motor selection made" cleared and switchover process
signalled with motor selection bit 0
Step 2:
As soon as the return message "Pulse disable" and an acknowledgement
from the drive for the motor selection has been received, contactor 1 (old
state) is switched off
Step 3:
After a defined delay, contactor 2 (new state) is switched on
Step 4:
After another delay, the drive receives a message that the switchover has
been successfully completed.
If using a star-delta switchover, please follow the instructions in the
Planning Guide "SIMODRIVE 611-A/611-D Transistor PMW Inverters for
AC Feed Drives and AC Main Spindle Drives".
2. Block data
Lib No.:
FBs to be loaded:
FX 82
DBs to be loaded:
None
Type of call:
Unconditional
DBs to be input:
None
Error messages:
% 1: Stated spindle number is incorrect or the associated spindle is not
defined.
2–36
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
12.93
2 Data Sheets for Digital Functions
FX 82 STERNDRE Star-delta switchover
3. Block call
FX 82 STERNDRE
I,BI –
S-D
K-S
– Q,BI
D,KF –
SPIN
K-D
– Q,BI
D,KT –
TW
T
T
–
– %1
4. Signal description
S-D
Command for star-delta switchover
positive edge (0/1 edge):
star/delta switchover
negative edge (1/0 edge):
delta/star switchover
SPIN Spindle no. (1-6)
TW
Delay during switchover
Three different possibilities:
– TW = 0.0
– 0.0 < TW < 5.0
– TW > = 5.0
Use a standard value (100 ms)
Use a minimum value of 50 ms
Use a parameterized value, as parameterized
T
Time element for programming the delay
K-S
Contactor for star connection
K-D
Contactor for delta connection
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
2–37
2 Data Sheets for Digital Functions
FX 82 STERNDRE Star-delta switchover
12.93
aaaaaa
aaa aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaa
5. Program flowchart
aaaaaa
aaa
Initial setting?
n
Y
aaaaa
aaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaa
aaaaaaaa
aaaaaaaa
aaaaaaa
Clear status data
aaaa
aaaaaa
aaaaaa
aaaaaaaa
aaaaaa aaa
aaaaaa aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaa
aaaaa
aaaaaa
aaa
Parameter test ?
Y
n
a
aa
aa
a aaaaaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaa
Delay time still running?
aaaaaaaa
Determine flag for
delay time used
Y
n
n
a
aa
a
aa
aa
a
Switchover running?
Y
a
aaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaa
a
Check spindle no.
a
aa
a
aa
aa
a
n
a
aa
a
aa
aa
a
Y
a
aa
a
aa
aa
a
n
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaa
a
Edge available?
Error?
Y
a
a
aaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaa
a
a
a
a
a
a
a
a
a
aa
aa
aa
aa
a
PLC stop
Sequence processor
switch
Description ”Sequence processor switchover”:
Step 1:
–
–
Delete acknowledge bit ”Motor selection mode” (DB 31, DW K+74, bit 5)
Set motor selection bit according to switching command (DB 31, DW K+74,
bit 3), K = 0, 4, 8, 12, 16, 20.
Step 2:
Is not executed until pulse disable signalled by the drive and motor selection
acknowledged
– Switch on contactor 1
– Start defined delay time
Step 3:
Not executed until delay time has elapsed
– Switch on contactor 2
– Start defined delay time
Step 4:
Not executed until delay time has elapsed
– Acknowledgement "Motor selection made" to drive
END OF SECTION
2–38
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
03.95
3 Data Sheets for Scanning/Displaying Messages
3.1 Error and operational messages (840C SW 1 and 2)
3
Data Sheets for Scanning/Displaying
Messages
3.1
Error and operational messages (840C SW 1 and 2)
3.1.1
General
The FBs for error messages (EMs) and operational messages (OMs) are not called by the
operating system. They must be loaded in the PLC and called accordingly.
The bytes for error and operational messages are defined via PLC machine data.
Functions:
FBs to be loaded/called:
17
45
47
48
49
50
51
54
X
Error
messages
PLC
Scan and
display
*
*
X
*
X
X
X
Operational
messages
PLC
Scan and
display
*
*
X
*
X
X
X
Message
groups
PLC
Scan and
display
*
*
X
55
56
57
58
59
*
X
*
X
*
Explanation of table:
The table provides information on the desired functions and the functions blocks to be
loaded/called.
(x = only load FB, *= load and call FB)
The functions comprising error messages, operational messages and message groups operate
independently of each other and can be implemented in any combination.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
3–1
3 Data Sheets for Scanning/Displaying Messages
3.1 Error and operational messages (840C SW 1 and 2)
3.1.2
06.93
Program overview for error messages, operational messages
and message groups
Overview for error messages and operational messages
CRB
FB45
FB51
GSTEMOM
SR:
FB45
Store OP code of message byte
and error number if corresponding
PLC-MD for EM/OM is set.
CRB (cold
restart
branch)
Common to
EMs and OMs
Generate lists of EM and
OM bytes
FB48
UP
EMOM:
Generate auxiliary signals:
HSG
-
Acknowledge error messages
Evaluate signals from PLC1 and
PLC2
-
Scroll through message line, etc.
UP (cyclic user program)
3–2
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
03.95
3 Data Sheets for Scanning/Displaying Messages
3.1 Error and operational messages (840C SW 1 and 2)
Overview for error messages only
UP
FB57
FB49
FMABFR
SR:
FB50
FB47
SR:
*)
**)
PSP:
FMBM
Scan FMs
Error messages
only
Coordinate
buffer entry
FB54
FB
***)
FMANZ
FB17 (status channel)
UP (cyclic user program)
Explanation of error messages:
*)
Call only if PLC-MD signals from/to channel, axes, spindles are set
**)
Call only if a bit at the interface has changed.
***)
Call only possible with softkey "PLC interrupt" in PLC1.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
3–3
3 Data Sheets for Scanning/Displaying Messages
3.1 Error and operational messages (840C SW 1 and 2)
03.95
Overview for operational messages only
UP
FB58
FB49
BMABFR
SR:
FB50
FB47
SR:
*)
PSP:
FMBM
**)
Scan OMs
Coordinate
buffer entry
Operational
messages only
FB55
FB
BM***)
ANZ
FB17 (status channel)
UP (cyclic user program)
Explanation of operational messages:
*)
Call only if PLC-MD signals from/to channel, axes, spindles are set
**)
Call only if a bit at the interface has changed
***)
Call only possible with "PLC messages" softkey in PLC1
The program parts (FBs) for EMs and OMs can be used jointly or as alternatives.
3–4
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
3 Data Sheets for Scanning/Displaying Messages
3.1 Error and operational messages (840C SW 1 and 2)
Overview for message groups
Message groups (MGs) are displayed irrespective of whether the PLC machine data for
error messages or operational messages or no MD is set.
Program structure:
FB59
UP
MGABFR
Scan MGs
Message groups
only
FB56
FB
***)
MGANZ
Display MGs
FB17 (status channel)
UP (cyclic user program)
Explanation of message groups:
***) Call only possible with "PLC diagnostics" softkey in PLC1
A message is unambiguously assigned to each set bit in the interface signals provided for this
purpose.
Application:
Display of messages which are not to be shown on the message line (second line on the NC
monitor).
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
3–5
3 Data Sheets for Scanning/Displaying Messages
3.1 Error and operational messages (840C SW 1 and 2)
3.1.3
06.93
Block calls for EMs/OMs/MGs
Example
a) In the user's cold restart branch:
Name
:
: JU FB45
: GST-FMBM
:
EM and OM initial state
b) In the user's cyclic program part :
Name
Name
Name
Name
Name
:
: JU FB48
: FMBM:HSG
:
: JU FB57
: FM-ABFR
:
: JU FB58
: BM-ABFR
:
: JU FB59
: MG-ABFR
:
: JU FB17
: STATUS
:
EM and OM auxiliary signals
Scan EMs *)
Scan OMs *)
Scan MGs *)
PLC status channel
*) FB is called only if the corresponding function is required.
3–6
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
3 Data Sheets for Scanning/Displaying Messages
3.1 Error and operational messages (840C SW 1 and 2)
FB 54, FB 57
Scan and display error messages
1. Description
PLC error messages can be displayed on the screen of the SINUMERIK 840C by means of
function blocks FB54, FB57.
The bytes for error messages are defined via PLC machine data.
The error message buffer has a capacity of 44 entries.
The function blocks must be loaded in the PLC *). They must be called in the user program
because they are not called in the operating system.
Structure and description of the error messages are discussed in the Interface Description.
*) See block data
2.
Block data
Lib. No.:
E88530-B 6054-A-_ _
E88530-B 6057-A-_ _
FBs to be loaded:
PLC1:
DBs to be loaded:
None
Type of FB call:
Unconditional
DBs to be input:
None
Error messages:
None
FB45 - FB51, FB54, FB57, FB17
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
3–7
3 Data Sheets for Scanning/Displaying Messages
3.1 Error and operational messages (840C SW 1 and 2)
06.93
FB 55, FB 58
Scan and display operational messages
1. Description
PLC error messages can be displayed on the screen of the SINUMERIK 840C by means of
function blocks FB54, FB57.
The bytes for error messages are defined via PLC machine data.
The error message buffer has a capacity of 44 entries.
The function blocks must be loaded in the PLC *). They must be called in the user program
because they are not called in the operating system.
Structure and description of operational messages are discussed in the Interface Description,
Part 1: Signals.
*) See block data
2.
Block data
Lib. No.:
E88530-B 6055-A-_ _
E88530-B 6058-A-_ _
FBs to be loaded:
PLC:
DBs to be loaded:
None
Type of FB call:
Unconditional
DBs to be input:
None
Error messages:
None
3–8
FB45 - FB51, FB55, FB58, FB17
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
3 Data Sheets for Scanning/Displaying Messages
3.1 Error and operational messages (840C SW 1 and 2)
FB 56, FB 59
Scan and display message groups
1. Description
PLC message groups can be displayed on the screen of the SINUMERIK 840C by means of
function blocks FB56, FB59.
The message groups are displayed irrespective of whether the machine data for error
messages or operational messages is set. A message is assigned to each set bit.
The function blocks must be loaded in the PLC *). They must be called in the user program
because they are not called in the operating system.
Structure and description of message groups are discussed in the Interface Description,
Part 1: Signals.
*) See block data
2.
Block data
Lib. No.:
E88530-B 6056-A-_ _
E88530-B 6059-A-_ _
FBs to be loaded:
PLC:
DBs to be loaded:
None
Type of FB call:
Unconditional
DBs to be input:
None
Error messages:
None
FB56, FB59, FB17, FB45, FB51
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
3–9
3 Data Sheets for Scanning/Displaying Messages
3.2 Error and operational messages (840C SW 3 and higher)
10.94
3.2
Error and operational messages (840C SW 3 and higher)
3.2.1
General
The blocks for scanning and displaying alarms (error messages, EMs) and messages
(operational messages, OMs) are not called by the PLC operating system. They must be
loaded into the PLC and called accordingly in the ramp-up branch (OB 20) or cyclic branch
(OB 1).
Blocks to be loaded/called
Functions
FB
45
Ramp up
FB
46
FB
47
FB
48
FB
49
FB
50
*
FB
51
FB
57
FB
58
FX
73
FX
74
x
Cyclic operation
scan/display of
alarms
x
x
*
x
x
Cyclic operation
scan/display of
messages
x
x
*
x
x
Integrated
in the PLC
OS
*
*
Integrated
in the PLC
OS
Notes:
•
* =ˆ load and call block, x =ˆ load block
•
FB 46 only has to be called for alarm and message expansion.
•
The error and operational messages are enabled or defined via the PLC machine data.
•
All the required data blocks (DB 4, 76, 77, 78 and 79) are set up by FB 45 (GST-FMBM)
on cold restart.
•
The function macros FX 73 and FX 74 are used to send and receive information packages
to/from the MMC.
3–10
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
a
a
a
aaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
aa
aa
aa
a
a
a
SINUMERIK 840C (PJ)
DB 10...15
Channel
DB 32
Axis
DB 31
Spindle
DB 58
Alarms
Messages
© Siemens AG 1993 All Rights Reserved
FX 74
OEM-EMPF
Alarms
DB 4
DB 76
DB 77
DB 78
DB 79
6FC5 197- AA30
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaa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aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaaaaaaaaaaaaa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
10.94
3 Data Sheets for Scanning/Displaying Messages
3.2 Error and operational messages (840C SW 3 and higher)
Program overview
MMC
PLC
FX 73
OEM-SEND
Messages
FB 57 FM-ABFR
FB 58 BM-ABFR
FB 47 PSP:FMBM
FB 48 FMBM:MMC
FB 49 UP:57/58
FB 50 UP:FB49
FM/BM-DB
QUIT FM/BM
DB FM/BM
QUIT FM/BM
QUIT FM/BM
DB 63
Machine
data
3–11
3 Data Sheets for Scanning/Displaying Messages
3.2 Error and operational messages (840C SW 3 and higher)
3.2.3
10.94
Block calls for EMs/OMs
Example
a) In the user's cold restart branch (OB 20):
Name
Name
:
: JU FB 45
: ANLAUF
: JU FB 46
: ERWEIT
:
Initial settings for EMs & OMs
Expansion for DB 58*)
b) In the user's cyclic program part (OB 1):
Name
Name
Name
:
: JU FB 48
: FMBM:MMC
:
: JU FB 57
: FM-ABFR
:
: JU FB 58
: BM-ABFR
:
EM & OM auxiliary signals
Scan EMs *)
Scan OMs *)
*) Call the FB only if the function in question is required.
3–12
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
12.93
3 Data Sheets for Scanning/Displaying Messages
3.2 Error and operationalmessages (840C SW 3 and higher)
3.2.4
Data sheets
FB 45 ANLAUF
Initial settings for error messages and operational messages
1. Description
FB 45 (ANLAUF) must be loaded and called in the ramp-up branch (OB 20). This block does
the following:
•
Sets up all the required data blocks (DB 4, 76, 77, 78 and 79)
•
Clears data areas
•
Presets data
•
Prepares machine data for quicker access
2.
Block data
Lib. No.:
FBs, FXs to be loaded: FB 45, FB 51
DBs, DXs to be loaded: None
Type of FB call:
Unconditional, in OB 20
DBs to be input:
None
Error messages:
None
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
3–13
3 Data Sheets for Scanning/Displaying Messages
3.2 Error and operationalmessages (840C SW 3 and higher)
12.93
FB 57 FM-ABFR
Scan error messages
1. Description
PLC error messages can be displayed on the screen of the SINUMERIK 840C with function
block FB 57.
The bytes for error messages are defined in the PLC machine data.
Structure and description of the error messages are discussed in the INTERFACE
DESCRIPTION, PART 1 - SIGNALS.
2.
Block data
Lib No.:
E88530-B 6057-A-_ _
FBs to be loaded:
FB 45 - FB 51, FB 57
DBs to be loaded:
None
Type of FB call:
Unconditional, in OB 1
DBs to be input:
None
Error messages:
None
3–14
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
12.93
3 Data Sheets for Scanning/Displaying Messages
3.2 Error and operationalmessages (840C SW 3 and higher)
FB 58 BM-ABFR
Scan operational messages
1. Description
PLC operational messages can be displayed on the screen of the SINUMERIK 840C with
function block FB 58.
The bytes for operational messages are defined in the PLC machine data.
Structure and description of the error messages are discussed in the INTERFACE
DESCRIPTION, PART 1 - SIGNALS.
2.
Block data
Lib No.:
E88530-B 6058-A-_ _
FBs to be loaded:
FB 45 - FB 51, FB 58
DBs to be loaded:
None
Type of FB Call:
Unconditional, in OB 1
DBs to be input:
None
Error messages:
None
END OF SECTION
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
3–15
06.93
4 Data Sheets for Sequencer Blocks
4.1 Programming of sequencers (FB 91, FB 92)
4
Data Sheets for Sequencer Blocks
4.1
Programming of sequencers (FB 91, FB 92)
4.1.1
General notes
On a machine control, functions are often required which call for a sequence of events, such
as a change in the stage in the machine process, tool change etc. As long as a sequence of
this type does not include more than a few steps you can still implement it as a logic control.
If, however, the sequence is longer, it is too complicated to be implemented as a logic control.
It is then better to describe and control such sequences with a sequencer. This has the
advantage that it is
•
•
•
easy to design,
simple to program and
simple to test
Moreover, you can find the cause of an error quickly by reading the current step.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–1
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
06.93
Fig. 4.1 shows the general structure of a drive control implemented with a sequencer. In
addition to the sequencer with its steps, subordinate individual control elements are required to
actuate and monitor the drive. The sequencer is subordinate to a function block which
organizes and checks the sequence.
FB AK
X (X+1)
n
– «Start»
SB0 (1)
ANZ
STA
Function block to call and check the sequence
Individual control:
Sequencer:
Interlock condition (I.)
SBx
Start conditions
«Start»
S1
IS
tW
Drive X
SBx+1
Drive X forwards
Delay
1
2
1
2
F
SP
BV
F
BZ
RMV
RMH
SBx+2
S2
IS
tuE
Drive Y on
Timeout
1
–
I.
1
Drive Y
SBx+n
Sn
IS
SP
Drive X back .
Acknowledge start
F
SP
BE
F
BA
1
–
RME
RMA
1
&
Fig. 4.1
4–2
Transfer flags
Structure of a drive control
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
The sequencer consists of steps that contain the commands and step enabling conditions. If
required, the start can be made dependent on start conditions.
The commands and step enabling conditions of a step are put together in a sequence block.
The controlling function block only calls the current step. The commands in this step are then
output and the associated step enabling conditions scanned (Fig. 4.2). This is repeated until
the step enabling conditions have been fulfilled. When the conditions have been fulfilled the
nonretentive timers are reset and the next step called.
OB 1
SB 11
PB
Commands
FB AK 3
JU PB
C
JU
SB 1:
ANZ:
STA:
DB
FB
11
5
F...
DB
Load
current SB
No. into
DW1
DW
0
1 SB No.
Step 1
Scans
SB 12
Step 2
n
RLO1)=1
j
SB 15
Call
current
step with
RLO 0
Step 3
SB No.+1
Set RLO to
”1”
Call
current
block
1) RLO=result
Fig. 4.2
of logic operation
Structure of a sequential control
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–3
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
06.93
The command signals from the sequencer are passed on to the subordinate individual controls
through transfer flags. The individual control controls and monitors the drivers. This means that
you only have to program the commands and step enabling conditions for each step in the
sequencer.
Fig. 4.3 shows the required program structure for a drive control implemented with a
sequencer.
The parameters that the controlling function block requires in order to be able to organize the
sequencer are:
•
•
•
the number of the sequence block with the first step or the start conditions
the number of steps and
the number of the flag by which the sequence is started.
OB 1
PB...
JU PY...
A
A
S
Q
JU
F
F
-ST
DB
FB
SB1: X
ANZ: n
STA: -ST
Start
conditions FB AK
Step 1
SB x+1
BZ:
FB SLIDE
SB x+m
FB
-SP X
-X
VOR
-X ZUR
Step n
Param.
FB FAN
•
•
•
JU
SP:
Step 2
Param.
•
•
•
JU
SP:
BV:
SB x
FB
-SP Y
Param.
•
•
•
BE
Fig. 4.3
4–4
Program structure for drive control
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
Fig. 4.4 shows the basic programming rules for the sequencers.
Sequence block without branching;
forwards only (AK 2, 3):
S
SP
IS
tü
tw
Command 1
Command 2
Timeout
Delay
–
1
–
2
1
2
Commands and timers
Scans
Commands and timers:
SP:
or
S M (A) . . .
R M (A) . . .
Retentive commands
NS:
= M (A) . . .
Nonretentive commands
tü:
L KT . . .
SE T . . .
Timeout 1) for 1 step
or
L KT . . .
SS T . . .
Timeout 1) for n steps
tw:
L KT . . .
SE T . . .
Delay
1) The timeouts are scanned in the controlling FB.
Scans:
1 A I...
2 A T...
Step enabling conditions
•
•
•
End of a sequence block
BE
Fig. 4.4
Basic programming rules for sequencers
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–5
SB 23
S 12
Fig. 4.5
4–6
a
a
aaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
a
a
aa
aa
aa
a
a
aa
aa
aa
aa
a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a
a
a
a
a
a
a
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaa
a
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaa a
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
07.97
4.1.1.1 Sequencers with OR branches
Figs. 4.5 and 4.6 show sequencers with OR branches. In Fig. 4.5, depending on the condition
in step 2, either steps 3 to 6 or steps 7 to 11 are executed. In Fig. 4.6 steps 2 and 3 are
repeated.
As the examples show, all the steps in an OR branch belong to the same sequencer.
SB 20 1)
Start conditions
SB 21
Step enabling conditions
Step enabling conditions
Branch conditions
© Siemens AG 1993 All Rights Reserved
SB 27
S7
SB 31
S 11
&
SB 32
Acknowledge start
not with FB 92
Sequencer with OR branch (1 sequencer)
SINUMERIK 840C (PJ)
6FC5 197- AA30
a
a
aaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
aa
aa
aa
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
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
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaa
E
a
aaa
aaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
aa
aa
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaa
a
a
aaaaa
a
a
aaaa
aa
aaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaa
06.93
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
SB 20 1)
Start conditions
SB 21
S1
Step enabling conditions
&
SB 12
S2
S3
Step enabling conditions
S5
SB 15
Acknowledge start
_______
not with FB 92
Sequencer with repetition (loop)
4–7
Fig. 4.7
4–8
Drive Y on
2
IS
SP
1
2
condition A
Branching
condition B
S7
1)
Drive X reverse
Drive Y off
1
2
&
SB 26:
= -X REVERSE
R -Y
A -X BACK
A -Y OFF
L KB 12
T DW 0
BE
a
a
aaaaa
aaa
a
aaa
aaa
aaaaa
aaaaaaaaaaa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaa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a
a
a
a
a
a
a
a
a
aaaaaaaaaaaaaaaaaaaaaaaaaa
a
a
aa
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
a
a
a
a
aaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
a
a
a
a
aaaa
a
a
a
a
aaaa
a
a
a
a
aaa
a
a
aa
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
aaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaa
aaaaaa
aaaaaaaaaa
aaaaaa
aaaaaaaaaa
aaaaaa
aaaaaa
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
06.93
Fig. 4.7 shows the programming rules for branching and joining.
Please note:
For a branch, first the step enabling conditions and then the branching conditions are
programmed (after the commands). Straight after the branching conditions the number of the
step to which the branch is to lead is loaded to data word 0 of the current data block.
Evaluation is performed automatically by the main sequencer block. If the DW0 of the current
DB is no changed the step number is incremented by 1 (linear sequence).
Sequence block with OR branch (AK 2, 3):
SB 22:
= F...
Commands
S F...
A I...
Step enabling
A I...
conditions
A br. cond. A
BEC
A I...
Branching
A I...
conditions
A br. cond. B
Loading the
L KB 7 1)
T DW0
sequence No.
BE
after DW 0
_______
IS
tw
No. of the step to which
the branch is to lead
Joining after an OR branch:
SB 31
Drive X on
Delay on 10 s
1
2
S 12
SB 31:
= -Z ON
L KT 100.1
SE -TUE
A -Z RUNNING
A -TUE
BE
Programming sequencers with OR branching
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
S5
Fig. 4.8
SINUMERIK 840C (PJ)
SP
Acknowledge start AK3
SP
Acknowledge start AK4
© Siemens AG 1993 All Rights Reserved
SB
S4
E2
SP Acknowledge start AK1
Sequencer 2
E1
Main sequencer
6FC5 197- AA30
S7
E3
a
aaa
a
aaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
aa
aa
aa
aa
a
a
a
F
E3
SB
S1
SB
SB
Sequencer 3
1)
a
a
a
aaaa
a
a
aa
aa
aa
a
S1
a
a
a
aa
aa
a
a
aa
aa
aa
a
1
2
SB
a
a
a
aaaa
a
a
aa
aa
aa
a
E2
a
aaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaa
a
S4
Start AK 4
Start AK 3
Start AK 2
Command X
a
aaa
a
aaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaa
a
S3
SP
SP
IS
SP
a
a
a
aa
aa
a
a
aa
aa
aa
a
SB
a
aaa
a
aaa
aaa
aaa
a
aaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a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a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaa
a
a
a
a
aa
a
a
a
aa
a
a
a
a
a
aa
a
a
a
a
aa
a
aa
aa
a
a
a
a
aa
a
a
a
a
aa
a
a
a
a
a
a
aa
aa
a
a
a
a
a
aa
a
a
a
a
aa
aa
a
aaaa
a
aaaaaaa
aaaaaaaa
aaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
06.93
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
4.1.1.2 Sequencer with AND branching
The figure shows a sequencer with AND branching. Because the branches have to be run in
parallel with AND branching, a separate sequencer is required for every branch.
It is advisable to create one sequencer as a main sequencer which starts and checks
subordinate sequences. The subordinate sequences are started using start flags. Flags are
also used to scan whether the subordinate sequencer has terminated. These flags are set in
the last step of the subordinate sequencer and are scanned in the main sequencer.
SB 10 1)
Start conditions
SB
1
2
F
E4
F
SB
S1
SB
S6
E4
SB
Sequencer 4
not with FB 92
Sequencer with AND branching (1 sequencer per branch)
4–9
a
a
aa
a
a
a
aa
aa
a
a
aa
aa
aa
a
a
aa
a
a
a
aa
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaa
a
a
aaaaaaaa
aaaa
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaa
a
aa
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a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a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaaaaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaaaaaaaa
a
S3
S4
S4
Fig. 4.9
4–10
IS
SP
SP
SP
SP
IS
SP
SP
Start AK 4
Start AK 3
-
IS
SP
Start AK 2
Command X
1
2
1
2
Command y
Command z
Acknowledge start AK3
Acknowledge start AK4
21
SB 1
4
ANZ
- START AK
STA
1
2
1
2
AK 3 executed
AK 4 executed
SB
1
2
1
1
Call a main block:
Last step in a main sequencer:
SB
R. command U
AK 2 executed
a
a
aaaaa
aaa
a
aaa
aaa
aaaaa
aaaaaaaaa
aaa
aaa
aaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a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
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaaaaaa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
a
a
a
a
aaaa
a
a
a
a
aaaa
a
a
a
a
aaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
a
a
aa
aa
aa
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
06.93
Fig. 4.9 shows the programming rules for ”branching” and ”joining” in the main sequencer, for
example for the parameterization of a subordinate sequencer and the last step of a main
sequencer.
Please note:
1. If you program the start of a subbordinate sequencer and the scan for completed
execution in the same step, program the start as a ”nonretentive” command (assignment).
2. If you program the scan for completed execution in a different block, program the start as
a ”retentive” command which you must cancel after the ”joining”.
3. Program the setting of the fla with which completed execution of the main sequencer is
signalled to the subordinate sequencer as a ”nonretentive” command.
SB 12:
S - START AK 4
S - START AK 3
= - START AK 2
S - COMMAND X
A - RM X
A - AK 2END
BE
SB
SB 13:
= - COMMAND Y
S - COMMAND Z
A - RM Y
A - RM Z
A - AK 3END
A - AK 4END
BE
SB 14:
R - START AK 3
R - START AK 4
•
•
•
SB 24:
R - COMMAND U
= - AK 2END
E2
Programming rules for branching and joining
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
06.93
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
4.1.1.3 Sequencer modes
Sequencers in ”Automatic” mode
The simplest sequencer only has ”Automatic” mode (e.g. FB 92; AK3:AUT). A sequencer of
this type is enough to be able to control simple processes, such as gear changing. If execution
has to be aborted because of a defective actuator, the sequencer has to be restarted when the
actuator has been repaired.
(Sequencer started with block 1).
Please note:
If you reset the starting flag to abort execution you must also reset the flags set in the steps of
the sequencer. The nonretentive commands are automatically reset.
Sequencers with the modes ”Automatic and manual”
For large sequencers, for example, to actuate a tool changer, ”Automatic” mode is no longer
enough. Additional ”Manual” modes are required for testing and setting up the machine.
FB 91 (AK 2:V/R) has the following modes:
1. Automatic mode
The sequencer is automatically executed in accordance with its step enabling conditions,
delays and monitoring times after the start command.
2. Manual modes
–
Step selection (without conditions)
With step selection, every step of the sequencer can be selected without having to
fulfill the step enabling conditions. No command is output.
–
Step control (with conditions)
In step control you can move one step forwards or backwards in a sequencer if the
step enabling conditions are fulfilled. No command is output.
–
JOG (with conditions)
In JOG mode, you can move one step forwards or backwards in the sequencer if the
step enabling conditions are fulfilled. Moreover, the signals ”JOG mode” and ”JOG”
are output for a subordinate actuator. This makes positioning possible. No command is
output.
When you have selected a step you can switch over to ”Step control” without conditions. To
prevent impermissible commands being output because of this switchover, you must program
the appropriate interlocking conditions for the subbordinate individual control modules.
The structure of the drive circuit required for forwards and backwards operation is shown in
Fig. 4.10. The controlling function block not only organizes the execution of the sequencer, but
also influences the subordinate actuators. You must observe the following points with forwards,
backwards and JOG mode.
1. In the steps, you must program not only step enabling conditions for forwards mode but
also the ”Step enabling conditions” for reverse mode. The step enabling condition is
selected by the signal ”Control backwards” (STR).
2. The individual control modules must have an input for reversal of the command direction
(UMST) which is also controlled by the signal ”Control backwards”.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–11
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
06.93
3. The actuators whose movements are to be stopped by JOG mode must have an input for
”JOG mode” and an input for ”JOG”. If the input ”JOG mode” carries a ”1” signal, the
retentiveness of commands is suppressed if the actuator is not in an end position. In JOG
mode, commands are only output to the actuator as long as the input ”JOG” is carrying a
”1” signal (exception: end position reached).
FB AK 2:V/R
•
•
•
•
•
•
H/A
SST+ STR
SST- TIPB
TIP+
TIP
TIPSVOR
•
•
•
•
•
•
}
S1
1 (RMH)
IS
tw
Drive X forwards
Delay
Drive X
1
2
S2
1 (RMA)
IS
tü
Drive Y on
Timeout
BV
M
BZ
UMST
TIPB
TIP
1
–
1 (RME)
&
M
1 (RMV)
2
&
R
Start conditions
Start
S3
VZ
Drive Y
M
BE
M
BA
R
UMST
Sn
IS
tw
Drive X reverse
Delay
Sequencer
Fig. 4.10
VV
1
2
Individual control
modules
Control signals
for forward, reverse and
JOG mode
Sturcture of a drive circuit for forwards and backwards mode
With this sequencer you can control composite mechanical movements manually in any
direction. If a part of the motion is to be skipped, you can select the required step using ”Step
selection”. Switchover from step selection to step control (SST+) is only possible if the
required step enable or power on conditions are fulfilled (programmed in the previous step).
Interlocking conditions for the subordinate individual control modules are therefore not needed
in most cases.
4–12
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
Fig. 4.11
SINUMERIK 840C (PJ)
Sn
&
IS
Drive Y forward
1
1
Cond. branch A
SB 27
S7
1
&
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
STR (control backwards)
1
2
R
Step blocks OR branching (AK 2)
1
STR
1
R
Cond. branch B
SB n:
=
SE
.
A
A
BEC
AN
A
A
BE
IS Drive Z open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a sequencer with
FB 91 (AK 2:V/R).
Please note:
1. Actuators for forwards, backwards and JOG mode can only be actuated by conditional
commands.
2. With branches, the step number for forwards mode must be loaded into DW 0 and the
step number for backwards mode into DW 1 of the current DB.
Step block without branching: forwards and reverse (AK 2)
Conditions for
backwards
Conditions for
forwards
Conditions for
backwards
Conditions for
forwards
Conditions for
branching
forwards
S3
Conditions for
backwards
Conditions for
forwards
Programming rules for forwards and backwards mode of a sequencer
4–13
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
06.93
4.1.1.4 Step display
For manual operation of a sequencer (for FB 91 and FB 92) it is important to display the
current step. The monitor for System 880 permits step display in plain text. Figure 4.12 shows
an example of a step display.
With sequencer 2 (FB 91) it makes sense not only to display the current step but also the
current mode. This is required because with an appropriately configured operator panel it is
possible to actuate almost any number of sequences. The sequencer whose mode is switched
over is selected using the selector switch. The currently active sequencer is displayed on the
NC screen if you press the appropriate softkeys.
You create the displays using an NC workstation; you must create a separate display for every
sequencer. To display variable data from the PLC, such as step number and mode, you must
configure the fields so that they can be supplied with the appropriate data according to the
parameterization rules of the block.
Example:In FB 91 (AK 2:V/R) the current step in ZW4 is stored.
If, during parameterization of the FB 91, the ZW 4 was parameterized as DW 100 in
DB 170, you must define DW 100 as the data source for the field ”Step number” in
the display.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
STEP DISPLAY
SEQUENCE SEQUENCER TOOL CHANGE
_AUT
_VOR
_ST+
_STSR NO
01
02
03
04
05
FUNCTION
START CONDITIONS
GRIPPER RIGHT
GRIPPER BACK
RELEASE GRIPPER
GRIPPER LEFT
STEP
_TP+
SR NO
06
07
08
09
10
-_TP–
_RLO
FUNCTION
END
.................
.................
.................
.................
16
17
Fig. 4.12
4–14
Example: configured diagnostics display for sequencer 2 forwards/backwards
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
4.1.1.5 Status words
Because several sequences are usually executed with one function block, status words are
required to store the current state of the sequences (including step number). The numbers of
the data words are parameters of the function block (Fig. 4.13).
Please note on FB 92 (AK 3:AUT) and FB 91 (AK 2:V/R):
You must leave data words 0 and 1 of the data block to which the sequencer is assigned free.
This is because the step blocks are called via DW 1 and the number of the step to which the
branch is to lead is loaded in DW 0.
It is advisable to set up the data block for the status words in OB 20 using FB 11, i.e., a RAM
area is reserved for the DB in question and in this area the variables of the PLC program are
stored.
OB 1
JU PB 1
PB 1
PLC aux.
programs
PB 2
JU PB 2
NC oriented
FBs
PB 3
JU PB 3
Enable
DB
PB 4
S
y
s
t
e
m
p
r
o
g
r
a
m
JU PB 4
O
O
S
C
JU
AK3
F
F
F
DB
FB 92
:AUT
:
ZW 1 :DW 5
ZW 2 :DW 6
PB n
JU PB n
OB 20
FB AK 3
DW
0
1 SB No.
2
3
4
5 ZW 1
6 ZW 2
{
•
•
•
SB 1
Step
1
•
•
•
SB 5
Step
5
User
program
JUFB 10
GST-PC
JU FB 11
EINR-DB
OB 21, 22
JU FB 10
GST-PC
Fig. 4.13
Assignment of data block for status words
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–15
4 Data Sheets for Sequencer Blocks
4.1.1 General notes
06.93
4.1.1.6 Behaviour when execution is aborted
When execution of a sequencer is aborted, different cases are possible:
•
•
•
Sequencer stopped
Execution aborted
Interruption through power off
Sequencer stopped
The sequencer is processed as long as input STA (Start) is carrying a ”1” signal. If the signal
changes to ”0”, execution is interrupted and the sequencers stopped. Execution continues
from the point of interruption when input STA has changed to ”1” again. In this way,
mechanical movements for which several steps are required can easily be stopped, e.g. for
setup purposes.
Execution aborted
Execution aborted means that execution of the sequencer is interrupted and the sequencer
goes into its initial setting (the last step).
This is achieved with the reset input R. If this input changes to ”1”, processing of the
sequencer is interrupted the assignments and timers in the current step are reset and the last
step (initial setting) is called.
It is advisable to reset all flags in the last step that can have been set by the sequencer during
execution. In this way you can be sure that the sequencer is in a defined initial setting no
matter where it was interrupted.
Interruption by power off
If execution of the sequencer is interrupted by power off, the current state of the sequencer is
stored retentively. You can set the parameters of the FB so that after switching on the power
supply again the sequencer is either set to the basic state (e.g. for gear changing) or, after a
restart, the sequencer is processed again continuing from the point of interruption (e.g. for a
tool change).
If you want the sequencer to be reset to the initial setting after the power has been switched,
the input R must carry a ”1” signal during the startup phase (e.g. by parameterizing the input
R with flags GST = F 2.1).
If you want the sequencer to continue from the point of interruption when the power has been
switched on, input R must carry a ”0” signal during the startup phase (i.e. as long as the flag
GST = F 2.1 is carrying a ”1” signal). So that the sequencer continues, input STA must
change to ”1” i.e. must be restarted.
4–16
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4.1.2
4 Data Sheets for Sequencer Blocks
4.1.2 Data sheets
Data sheets
FB 91 AK 2:V/R
Sequencer forwards/backwards
1. Description
With the function block AK 2:V/R six modes can be implemented:
1. Automatic mode
- Automatic with and without delay/monitoring time
2. Manual modes
- Step selection (SVOR)
With step selection you can select any step of the sequencer (without commands
being output).
If you press the key SVOR for longer than 0.5 s, the sequencer moves to the step
whose enabling conditions are fulfilled.
-
Step control forwards (SST+)
-
Step control backwards (SST-)
-
JOG mode forwards (TIP+)
-
JOG mode backwards (TIP-)
In the manual modes mode switching is triggered by the first pulse and further step
enabling by the following pulses. During this time no more than one mode may be
active.
In the modes SST+ to TIP- steps are enabled if the conditions are fulfilled and the
signal changes from ”0” to ”1”.
The mode after a cold or warm restart is automatic. See AK 3:AUT for behaviour of the
sequencer on cold restart, warm restart and automatic.
Only one OR joining per step
With OR branching or joining the constants for the jumps must be programmed even if
reverse mode (SST- or TIP-) is used.
In all other steps constants must not be programmed.
AND branching and AND joining must be implemented using several sequences.
The constants for SST- or TIP- must be programmed as the first elements.
If you use several OR branches in a step the condition for the linear behaviour (without
constants) programmed first must be the forwards condition.
The maximum number of steps: 64 (0-63).
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–17
4 Data Sheets for Sequencer Blocks
4.1.2 Data sheets
06.93
The constants for forwards mode must be loaded into DW 0 and for reverse mode into DW 1
of the current DB.
With SST+ and Tip+ step enabling from the first step to step ”0” is not possible.
First select step ”0” with SVOR.
With branches to an impermissible step, the number of the sequence block or step last
processed can be taken from the status words (ZW 3 and ZW 4).
2.
Supplementary information
Lib. No.:
E88530-B 5491-A-_ _
FBs to be loaded:
FB 91
DBs to be loaded:
None
Type of FB call:
Unconditional
DBs to be input:
DB for status words
Error messages:
FLFZ, FGST
Error with system stop: %1:
Sequence block not in the PLC or error step No. (e.g. branch to
an impermissible step)
4–18
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.1.2 Data sheets
3. Block call
FB 91 AK 2:V/R
D,KF
D,KF
E,BI
I,BI
I,BI
I,BI
I,BI
I,BI
I,BI
I,BI
T
D,KT
T
B
I,W
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
$F 3.1 –
$F 2.1 –
$F 0.7 –
SB 0
VKE
ANZ
STR
H/A
TIPB
STA
TIP
R
FLFZ
SVOR FGST
SST+
SSTTIP+
TIPTW
BW
TUE
DBZW
ZW 1
–
–
–
–
–
–
NST
GST
TB
– %1
– $ FW 244
– $ FW 242
$:= defined
parameters
ZW 3
ZW 4
Q,BI
Q,BI
Q,BI
Q,BI
Q,BI
Q,BI
4. Signal descriptions
SB0
Number of the sequence block for step ”0” (starting conditions).
ANZ
Number
Number of the step without step 0; permissible number of steps: less than 64
H/A
Manual/automatic
”0” = Automatic mode (continuous signal)
”1” = and rising edge of SVOR, SST+/- or TIP +/- = manual mode.
STA,R
Start or enable automatic, reset
Inputs STA and R are not active in the manual modes. See FB92 (AK3:AUT) for
description.
SVOR
Step selection
Using SVOR and H/A = ”1” you can select any step in the sequencer. If the signal
SVOR is active for longer than 0.5 seconds, the sequencer moves to the step
whose conditions are fulfilled.
No commands are output; internal edge evaluation.
SST+
Step control forwards,
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–19
4 Data Sheets for Sequencer Blocks
4.1.2 Data sheets
06.93
TIP+
JOG forwards
The switchover to SST+ or TIP+ is possible from all modes. With the switchover
from SVOR to SST+ or TIP+, the condition is scanned in the previous step and
the RLO displayed. If the condition is not fulfilled no commands are output.
Internal edge evaluation.
SST-
Step control backwards,
TIP-
JOG backwards
The switchover from SVOR to SST- or TIP- is not possible directly, you must first
select SST+ or TIP+.
TW, BW
Delay, length of the delay
Timer cell for delay. (When BW 0 the delay applies to any step except step 0.)
TUE
Timer cell of the monitoring time.
Starting the monitoring time in the sequencer step in question.
The monitoring time is automatically reset in the last step if RLO = 1.
DBZW
Data block for status words of the sequencer.
ZW 1
Status word 1
The status words for internal flags and step registers are in the parameterized DB.
Four data words starting with ”ZW 1” are assigned. DW 0 and DW 1 must not be
used.
VKE
Result of logic operation
Displayed with SST+, SST-, TIP+, TIP- and SVOR.
STR
Control backwards
Control backwards. For SST- or TIP- a ”1” signal, for AUTO, SVOR, SST+, TIP+
a ”0”signal.
TIPB,TIP JOG mode, JOG
TIPB signal is output if a switchover is made to JOG mode because of TIP+ or
TIP- 0. It is cancelled if one of the other modes is selected.TIP signal is output as
long as input TIP+ or TIP- carries a ”1” signal.
FLFZ
Error runtime
Error runtime; Timeout TUE elapsed. The error is reset for STA = ”1”.
FGST
Error initial setting
Operational message is output if the sequencer is not started and is not in the initial
setting. (STA = 0 and the sequencer is not in the last step, the so-called initial
setting step).
NST
Cold restart
When NST=1 the step registers and flags are reset
GST
Initial setting
On warm restart (GST=”1”) the status flags are reset. If input ”R” carries the
same signal the sequencer goes into the initial setting (last step) after a warm
restart.
4–20
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.1.2 Data sheets
TB
Blinking frequency 0.5 Hz
ZW3
Status word 3
In the low byte of ZW 3 the current sequence block number is stored.
ZW4
Status word 4
In the high byte of ZW 4 the current step number is stored.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–21
4 Data Sheets for Sequencer Blocks
4.1.2 Data sheets
06.93
Begin
Cold restart
y
n
Initial setting
y
n
R=1
y
Set step
register
n
Mode
AUTO
Auto
AK 3
SVOR
SST-
TIP-
SST+
TIP+
Set TIPB
Current step
with RLO = 0
Set TIPB
Switch over SVOR
or SVOR
Previous step
with RLO = 0
n
TIP+
y
Set STR
Prevous step
with RLO = 0
Move to block
n
y
Step enabling condition
fulfilled
Pulse
n
y
n
Last step
Last step
y
n
y
n
y
Step enabling
condition fulfilled
y
n
Current step
with RLO=1
Step enabling condition fulfilled
Set step
register to ”0”
Step register +1
y
n
Pulse
y
n
Manual AK 3
END
Fig. 4.14
4–22
Flow diagram of FB 91
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
FB 92
4 Data Sheets for Sequencer Blocks
4.1.2 Data sheets
AK 3:AUT
Sequencer automatic
1. Description
The function block organizes simple sequences without modes with up to 63 steps per
sequencer.
Behaviour of the sequencer;
STA = ”0”, R = ”0”:
The current step is executed if RLO = ”0”. No further execution.
STA = ”1”, R = ”0”:
The current step is executed if RLO= ”1”. The RLO of the current
step is evaluated.
R = ”1”:
The current step is executed if RLO= ”0” and then the last step is
executed if RLO= ”1”. The timeout TUE is reset.
Change of STA signal from ”0” to ”1”:
•
If the sequencer is in the last step, it is restarted.
•
If the sequencer is not in the last step the sequencer is executed from the current step
onwards.
Behaviour of the sequencer on warm restart and cold restart, see GST and NST.
If the timeout TUE elapses only an error message is output. The commands are still output.
Branching:
•
AND branching and AND joining must be implemented using several sequencers.
•
OR branching and OR joining can be implemented in any way.
•
With branching to an impermissible step, the PLC goes into the stop state. The step
number last executed is stored in status word 2. The commands (assignments) are rest.
•
If a branch is made to the first step, the sequencer is executed again if STA = ”1”.
•
The constant for an OR branch must be loaded into DW 0 of the current DB.
The last step must only contain commands, no scans and branches. The last step is called
with the state of input STA (if R = ”0”).
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–23
4 Data Sheets for Sequencer Blocks
4.1.2 Data sheets
06.93
2. Block data
Lib. No.:
E88530-B 5492-A-_ _
FBs to be loaded:
FB 92
DBs to be loaded:
None
Type of FB call:
Unconditional
DBs to be input:
DB for status words
Error messages:
FLFZ, FGST
Error with system stop: %1:
Sequence block not in the PLC or error step number (i.e.
branching to an impermissible step)
3. Block call
FB 92 AK 3:AUT
D,KF
–
SB 1
FLFZ
– Q,BI
D,KF
–
ANZ
FGST
– Q,BI
I,BI
–
STA
I,BI
–
R
T
–
TUE
B
–
DBZW
I,W
–
ZW 1
I,W
–
ZW 2
$F 3.1 –
NST
– %1
$F 2.1 –
GST AZW 2
– $ FW 244
$:= defined
parameters
4–24
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.1.2 Data sheets
4. Signal description
SB 1
Number of the first sequence block of the sequencer (= first step).
ANZ
Number
Number of steps including step 0.
STA
Start and enable automatic
STA = ”0”:
Sequencer is not executed.
STA = ”1”:
Sequencer is executed.
If the sequencer is in the last step, the sequencer is restarted on the
signal change of the input STA from ”0” to ”1”.
R
Reset
If input R carries a ”1” signal, the current block is called if RLO = ”0” and then the
last block is called of RLO = ”1”; the timer specified at input TUE is reset.
TUE
Timer cell of the timeout.
Start the timeout in the current step.
The timeout is automatically reset in the last step if RLO= ”1”.
DBZW
Data block for status words of the sequencer.
ZW 1
Status words
ZW 2
Inputs for the numbers of the status words. Two data words are assigned.
FLFZ
Error runtime
Error runtime; timeout TUE elapsed. The error is reset if STA = ”1”.
FGST
Error initial setting
Operational message is output if the sequencer is not started and is not in the initial
setting.
(STA = 0 and the sequencer is not in the last step the so-called initial setting step.)
NST
Cold restart
On NST = ”1” the step registers and flags are reset.
GST
Initial setting
On a warm restart (GST = ”1” signal) the status flags are reset. If during this time in
R carries a ”1” signal, the sequencer goes into the initial setting (last step).
AZW 2
Output for status word 2
The current step number is located in the high byte of AZW 2 and the current
sequence block number in the low byte.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–25
4 Data Sheets for Sequencer Blocks
4.1.2 Data sheets
06.93
Begin
Cold restart
n
y
Initial setting
n
y
Auto
R=1
R=1
y
n
n
y
AK 2
Reset step
register
Sequencer in last step
and STA from 0
1
Current step
with RLO=0
y
Step register to
last step
n
Reset status
flag
Current step with
status of STA
Step register to
first step
Reset TUE
Current step
with RLO=1
Hand
AK 2
Step enabling condition fulfilled
y
y
n
STA=1
STA=1
n
n
y
Branch
Timeout TUE elapsed
n
y
y
Last step
y
Reset timeout
TUE
n
Permissible step
n
Current step
with RLO=0
Update step register
y
Input FLZ in
buffer
n
Input FSNR
to buffer
Last step
y
Current step
with RLO=1
n
Set output
FGST
END
Fig. 4.15
4–26
Flow chart of FB 92
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.1.3 Programming examples
4.1.3 Programming examples
4.1.3.1 Programming example for a driver control
with FB 92 (AK 3:AUT)
We have chosen gear changing as an example for the use of FB 92 (AK 3:AUT). This example
covers driving of the gear train as well as signals for read-in disable, feed disable, spindle stop
and set direction of rotation.
Figure 4.16 shows the block diagram for the complete gear change. Gear changing is triggered
by the commands M 41, M 42, etc., that are stored as flags for starting gear changing. With
these, the sequencer is started. Commands are output by the sequencer both to the NC and
to the subordinate individual control module (not in this example). For the signals read-in
disable, feed disable, spindle stop and set direction of rotation that do not only come from the
sequencer but are also dependent on other criteria it is advisable to perform logic operations
on the various signals so that the cause is always recognizable.
NC
PLC
M decoding
M word
M change
M03 M04 ... M 41 M 42
NC
1
R
Switch
S
Starting flag
direction
Disable read-in
Sequencer
D
1
S=0
Disable feed
Spindle
control
D
1
Mesh
gear
Spindle stop
D
1
Select oscillation speed
Spindle in set range
Gear
drive
M
Gear
meshed
M
Actual gear stage
Gear
Spindle
Fig. 4.16
Block diagram of gear change
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–27
4 Data Sheets for Sequencer Blocks
4.1.3 Programming examples
06.93
Fig. 4.17 shows the structure of the program for the example. In the program block for the
spindle control (PB), first the logic operations for start and reset of the sequencer are
programmed. Then the sequencer with which the gear change is controlled is called. Then the
signals are transferred to the interface.
PB spindle control
from OB 1
Start of the
sequencer
Resetting the
sequencer
O
– F 41
O
– F 42
S
– START AK
SB
AN – START AK
A
– T-RESET
•
•
=
Step 1
– RESET AK
FB
Sequencer
JU FB
C
Transfer
signals to
interface
Sequencer
Step 2
– DB-K 1
•
•
•
Step 5
to OB 1
Fig. 4.17
4–28
Program structure for gear change
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.1.3 Programming examples
Fig. 4.18 shows the gear change performed by the sequencer automatic FB 92 (AK 3:AUT).
START AK
S1
SP
SP
SP
IS
tUE
Read-in disable
Feed disable
PLC spindle control
Spindle disable
Timeout 10s
-
IS
SP
SP
tW
Set direction right
Change gear
Set oscillation speed
Delay 1s
1
tW
Delay 1s
1
S=0
S2
1
S3
1
RM: Gear changed
&
S4
SP
SP
SP
SP
tW
tUE
Reset oscillation speed
Reset change gear
Reset PLC control
Reset command change gear
Delay 0.2s
Timeout 10s
1
-
1
Spindle in set range
S5
Fig. 4.18
SP
SP
SP
SP
SP
SP
SP
Reset start sequencer
Reset read-in disable
Reset feed disable
Reset change gear
Reset PLC spindle control
Reset oscillation speed
Reset spindle disable
-
Gear change with FB 92
The software listing for this is given in Section 6 (Appendix) PB ”Spindle control”.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–29
4 Data Sheets for Sequencer Blocks
4.1.3 Programming examples
4.1.3.2
06.93
Programming example for a tool change with
FB 91 (AK 2: V/R)
As an example for the use of FB 91 (AK 2: V/R), we have chosen part of the function ”Deposit
tool” for a tool changer. The tools are changed between the magazine and the spindle using a
gripper. The example shows how to program sequencers for forward and backwards operation.
The individual control modules that perform the signal reversal with ”STR” are not part of the
example.
4.2
General notes
Programming of a sequencer using conventional methods (Fig. 4.19) is difficult for the user,
and is even more so when there is a need to handle complex sequences (branching and
jumps). The user must define the sequence structure by programming sequence blocks. In the
case of branches and jumps, the sequence is governed by load and transfer commands within
the sequence blocks. The handling of timers is also quite complicated.
Previously the user had access only to inconvenient methods for programming sequencers,
which made it difficult to implement programmable sequential control systems and required a
relatively large amount of programming.
Start
conditions
Step 1
Command 1
Step enabling conditions
for step 2
Step 2
Command 2
Command 3
Command 4
Step enabling conditions
for step n
Step n
Fig. 4.19
4–30
Command x
Representation of the step-by-step sequence in the method of representation previously used
(DIN 40719)
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.2 General notes
There was a need for a new language for sequencer programming, one which would be easier
to use and would enable clearer, user-friendly programming.
These requirements are met by the new graphic programming language: GRAPH 5.
With GRAPH 5, programming is limited to a single sequence block. The user defines the
sequence structure graphically and then need only program the real sequence actions and
step enabling conditions. He need no longer concern himself with program-related conversion
of branches and times.
Start conditions
Step 1
Step enabling condition 1
Step 2
Step enabling condition 2
Step 3
Step enabling condition n -1
Step n
Fig. 4.20
Representation of the step-by-step sequence in GRAFCET notation (to IEC Draft SC 65 A/WG 6)
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–31
4 Data Sheets for Sequencer Blocks
4.2.1 What is GRAPH 5?
4.2.1
06.93
What is GRAPH 5?
GRAPH 5 is a graphic language for programming sequencers.
GRAPH 5
•
is a new language for describing the structure of sequencers. It is at a higher
level than the ladder diagram (LAD), control system flowchart (CSF) and
statement list (STL) languages.
GRAPH 5
LAD
CSF
STL
•
Like the other languages, it can be used on a programmer (PG 675, PG 685,
PG 750).
•
It allows a system to be described by arranging the structure in
- steps (actions) and
- transitions (step enabling conditions).
•
It supports:
- Configuring
- Programming
- Documentation
- Testing/diagnostics
A sequencer is programmed with GRAPH 5 on two representation levels (Fig. 4.21):
1. Overview level:
The structure of the sequencer is defined in this first phase.
The overview level describes the sequence structure of the steps, particularly the
branches and junctions in the sequence.
2. Zoom-in level:
In the second phase, the contents of the steps and transitions are defined at the ”zoomin” level.
The program stipulates:
Which actions take place in the s t e p
Which step enabling conditions are in the t r a n s i t i o n
4–32
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.2.1 What is GRAPH 5?
Overview level
Zoom-in level
Transition 3: Part inserted
I 7.1
S1
I 7.2
T1
&
T6
S2
S6
I 7.3
T2
T7
S3
I 7.4
&
>1
S7
I 7.5
T3
T8
S4
I 7.6
S8
I 7.7
T4
Auto
enable
&
T9
Step enabling condition
Step 4: Retract arm
S5
Auto
enable
T5
&
Branch 1
=Q1.0
>1
Manual
&
S1
Branch
Overview structure with GRAPH 5
Fig. 4.21
=Q2.0
Actions
Representation levels
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–33
4 Data Sheets for Sequencer Blocks
4.2.1 What is GRAPH 5?
06.93
The sequencer's program is fully defined by configuring the sequence structure at the
overview level, and programming the steps and transitions at the zoom-in level.
GRAPH 5 is thus a language which the user can easily assimilate, allowing him to develop
clearly arranged sequence control systems with little effort.
GRAPH 5 provides support for documentation and testing/diagnostics in addition to configuring
and programming.
Documentation:
GRAPH 5 sequences documentation comprises:
- Documentation for the overview level
- Documentation for the zoom-in level
The steps and transitions can have comments both at the overview and zoom-in
levels.
Testing/diagnostics:
The status of a sequencer is shown in a status display. The status can be traced at
the zoom-in level, with indication of the status of individual operands and logic
operations. The exact cause of a fault can be determined at the zoom-in level.
The "GRAPH 5" software package from SIMATIC S5 is used for programming sequencers
with the FB93 or FB94.
4–34
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4.2.2
4 Data Sheets for Sequencer Blocks
4.2.2 The elements of GRAPH 5
The elements of GRAPH 5
Prerequisites for using the GRAPH 5 sequencer for SINUMERIK:
The full capabilities of the GRAPH 5 method of representation cannot yet be fully exploited
with the function blocks from this package. The various limitations are explained in more detail
on the basis of these language elements.
Initial step
Selective step
S
Sn
Sn
Jump
Linear sequence
Sn
Sn
Ti
Ti
Sk
Fig. 4.22
Sn+1
Language elements
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–35
4 Data Sheets for Sequencer Blocks
4.2.2 The elements of GRAPH 5
06.93
Differences compared to GRAPH 5, FB70 (main sequencer):
-
FB 70 to FB 74 are used in place of FB 93 and FB 94.
Only selective processing of the sequencer
Main DB (RAM) is the DB corresponding to the SB number
A maximum of 4 simultaneous branches are possible
The DB corresponding to the SB number + 1 must be stored in a PROM and is
copied into the main DB on a cold restart
- The first step must be defined as the initial step
- No secondary sequencer (such as FB71) can be implemented
- SB 2 and SB 3 are not used.
The SIMATIC S5 ”GRAPH 5” Manual provides further information for programming.
Initial step (Fig. 4.22):
The initial step (also known as init step) is activated on sequencer startup by an FB sequencer
call without testing for conditions. It corresponds to the last step of the sequencer, which
cannot be programmed in the GRAPH 5 method of representation.
Limitation:
It is only possible to define Step S1 as the initialization step.
In the initialization step, the sequencer start may be reset only in conjunction with a logic
operation.
E.g.:
A - RESETAK
R - STARTAK
Selective step (Fig. 4.22):
The action part of a step declared as selective is processed only when the step is activated.
Normally (no selective steps), all steps of the sequencer are processed cyclically. When a
selective step is involved, the action part is skipped if the step is not active.
Limitation:
All steps, including the first step (init step) S1, must be programmed as selective steps.
Note:
In the case of selective steps, non-storing commands must also be reset by the user in
subsequent steps.
Linear sequence (Fig. 4.22):
The commands of Step Sn are output and Transaction Ti is scanned. If the step enabling
condition of Ti is fulfilled, the sequencer switches to the next step, i.e. Sn + 1 is activated.
4–36
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.2.2 The elements of GRAPH 5
Jump (Fig. 4.22):
Programming of the jump function is possible in a linear sequence (or as an alternative
branch), but without graphic connection.
Limitation:
A jump can be implemented in all steps of the sequencer except in Step S0.
Alternative branch, alternative junction (Fig. 4.23):
One of the branches is to be processed. Of transitions Ti1 to Tin, the one whose step enabling
condition is fulfilled will be switched. If two or more transitions are simultaneously fulfilled, the
one furthest left will be switched.
In the case of a junction of alternative branches, the same applies as to the linear sequence.
Alternative branch
Sn
Ti1
Sn+1
Ti2
Tin
Sk1
Ski
Sk1
Ski
Alternative junction
Sn
Ti1
Ti2
Tin
Sn+1
Fig. 4.23
Alternative branch, alternative junction
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–37
4 Data Sheets for Sequencer Blocks
4.2.2 The elements of GRAPH 5
06.93
Simultaneous branch, synchronization (Fig. 4.24):
Two or more steps are activated simultaneously, depending on only one step enabling
condition.
Merging of parallel branches into a junction takes place via the synchronization.
Simultaneous branch
Sn
Ti
Sn+1
Sk1
Ski
Sk1
Ski
Synchronization
Sn
Ti
Sn+1
Fig. 4.24
4–38
Simultaneous branch, synchronization
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4.2.3
4 Data Sheets for Sequencer Blocks
4.2.3 Program structure
Program structure
The program structure shown (Fig. 4.25) for a sequential control system (SCS) is largely
generated and managed by the GRAPH 5 system. The user need only concern himself with
the overall structure.
The PG685/PG730/PG750 programmer with the GRAPH 5 operating system is needed for
programming. The entire program creation process is supported by the PG685/PG730/PG750.
Function block FB93/FB94, a jog block (SB0), and a main DB generated by the GRAPH
system allow the processing of GRAPH 5 sequencers in the PLC.
Explanation of program structure:
The user calls standard function block FB Sequencer (FB94:ALS:AUT) and assigns sequencer
parameters to it (sequence block number, etc.). The structure of the sequencer, as well as all
actions and step enabling conditions, are contained in sequence block SBx.
Another function block, FB Jog (SB0), is invoked for each transition (see block data and
program structure).
DBn is the main DB for SBx. Like the executable SBx, DBn is automatically generated by the
system (programmer software) with the FB Jog calls.
However, DBn + 1, i.e. the DB with SB number x +1, must be transferred to the PLC.
Example:
For SB150, the GRAPH 5 programmer operating system generates DB150 when function keys
F6 and F5 are actuated. This DB150 must be transferred from the floppy disk to the PLC as
DB151. DBn + 1 (DB151) can be transferred later to PROM.
DBn (DB150) is generated in the PLC on a cold restart, and the contents of DBn + 1 are
copied into DBn; FB94 then opens DBn as the current main DB.
A precisely defined starting condition is thus obtained for a cold restart.
If the diagnostic function is also invoked on the PG685/PG730/PG750, the diagnostic DB
(DB255) must be located in the RAM area.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–39
4 Data Sheets for Sequencer Blocks
4.2.3 Program structure
06.93
Preparations for execution in the PLC:
•
•
•
•
•
•
Generate the sequence block with the PG685/PG730/PG 750 and load it into the PLC.
Generate the main DB with DBGEN on the PG685/PG730/PG 750 and load the DB into
the PLC with SB number + 1.
If necessary, load the diagnostic DB into the PLC.
Load the GRAPH 5 standard function block and SB0 into the PLC.
A PB invokes and initiates the FB.
When all blocks have been transferred, the user must initiate a cold restart.
The designation "GRAPH 5 standard FB" applies to FB93: ALS:V/R and FB94: ALS:AUT.
PB
FB sequencer
GRAPH 5
JU FB
SB :150
..
.
SB 150
SB 0
Actions
Structure and
step enabling
conditions
FB Jog
Current SBx
DB 255
Diagnostic DB
Fig. 4.25
4–40
DB 151
DB 150
Main DBn + 1
EPROM
Main DBn
RAM
Program structure
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4.3
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
Data sheets
FB 93 ALS:V/R
GRAPH 5 sequencer forwards/backwards
1. Description
Sequencers (up to 127 steps per sequencer) with six modes can be implemented with this
function block. The steps must be programmed with the PG685/PG730/PG750 in the GRAPH
5 method of representation.
1. Automatic mode
- Automatic with and without delays/timeouts.
2. Manual modes
- Step selection (S-NR), (S-AZ)
Any step of the sequencer can be selected via decade switches in BCD code (without
command output). Starting with the current step number or preset step number, an
indication of whether the step enabling condition is fulfilled is displayed. The selection is
rejected in the event of an illegal step number.
- Control forward (SST+)
(With condition, i.e. step enabling conditions for forward operation).
- Control backward (SST-)
(With condition, i.e. step enabling conditions for backward operation).
- Jog forward (TIP+)
(With condition).
- Jog backward (TIP-)
(With condition).
In the manual modes, the mode is changed by the first pulse and the step is indexed by
further pulses. No more than one mode may apply at any one time.
In modes SST+ to TIP-, stepping takes place when the enabling conditions are fulfilled and
when the relevant signal changes from 0 to 1.
The mode after a cold or warm restart is the automatic mode.
For sequencer performance following a cold or warm restart and in automatic mode, see
function block ALS:AUT Automatic sequencer GRAPH 5.
Sequencer performance in branches:
-
No restrictions are placed on sequencers without branches.
-
When alternative branches and backward operation (SST- or TIP-) are involved, the jump
function can be used to jump to the step in a previous sequencer branch.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–41
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
06.93
–
When simultaneous branches and backward operation (SST- or TIP-) are involved, the
Jump function can be used to jump to a previous sequencer branch.
–
In transitions in which a simultaneous branch is opened or closed, there can be no
backward jump.
Stepping from the last step to step S1 is not possible with SST+ and TIP+, without first
switching to step selection mode.
2. Block data
Lib. No.:
E88530-B 6093-A-_ _
FBs to be loaded:
FB93
SBs to be loaded:
SB0
DBs to be loaded:
-
Type of FB call:
Unconditional
DBs to be input:
Main DB
DB number (No. = SB No. + 1)
Diagnostic DB if applicable
Error messages:
STO and SSTO
Error with system stop:
%1 : Number of programmed SB not in permissible range
(Range: 150 SB no. 255)
(#) %2: Programmed SB is not in PLC.
%3: Programmed SB was not created with GRAPH 5.
%4: Step 1 was not defined as INIT step.
(#) %5: DB (SB no.+ 1) not in PLC.
%6: Number of programmed diagnostic DB not within the
permissible range.
(Range: 150 DB no. 255)
(#) %7 : Diagnostic DB not in PLC.
Errors %6 and %7 are output only if the diagnostic function has
been selected (DIAG = 1).
(#) This parameter assignment error results in a PLC stop in FB89
(BAA:LESE) with identifier %4 Block does not exist.
4–42
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
3. Block call
FB 93 ALS:V/R
D,KF
–
SB
SANZ
– Q,W
I,BI
–
H/A
S+AK
– Q,BI
I,BI
–
STA
I,BI
–/ R
I,BI
–
I,BI
STO
– Q,BI
SSTO
– Q,BI
VKE
– Q,BI
–/ ANZ+
STR
– Q,BI
I,BI
–
TIPB
– Q,BI
I,BI
–/ QIT
TIP
– Q,BI
I,BI
–/ UQIT
I,W
–
I,BI
–/ S-AZ
I,BI
–/ SST+
I,BI
–/ SST-
I,BI
–/ TIP+
I,BI
–/ TIP-
$F3.1
–
NST
– %1
$F2.1
–
GST
– %2
SAN
DIAG
S-NR
– %3
– %4
– %5
– %6
– %7
$:= Specified
parameter
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–43
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
06.93
4. Signal descriptions
SB
Number of the sequence block in the sequencer.
Max. 52 sequencers per PLC (150 number 255) as two DBs are reserved.
A main DB is generated for each step sequencer on the PG675/PG685/PG 750 via
function keys F6, F5 (DBGEN: See GRAPH 5 Description).
H/A
Manual/automatic
”0” = Automatic (continuous signal)
”1” and leading edge of S-AZ or SST +/- or TIP +/- = Manual
STA
Sequencer start
STA = ”1”: Sequencer will be processed
If the sequencer is at the first step, it is restarted
when Input STA changes from ”0” to ”1”.
STA = ”1” is not possible in manual modes.
The ”STA” signal must be reset by the user program, not in the init step.
R
Reset
If Input R is at logic ”1”, the sequencer proceeds to the first step.
The preset monitoring times TUE and waiting times TWA are reset.
R = ”1” is not possible in manual modes.
SAN
Step display
The step display is updated when SAN=”1”.
ANZ+
Advance step display
If two or more steps are simultaneously active (observe signal S + AK when
simultaneous branches are involved) these step numbers can be displayed
successively with a change of signal at Input ANZ + from ”0” to ”1” (evaluation only
when SAN = 1).
DIAG
Diagnostic function
When DIAG = ”1”, the diagnostic function for the sequencer is executed on the
programmer and relates to the diagnostic data block generated with DBGEN (must be
loaded in the PLC for this purpose). This function helps detect the cause of error,
which can then be traced at the zoom-in level (PG675, PG685 or PG 750
programmer).
QIT
Acknowledge a fault (conditional)
Effective on a change of signal at Input QIT from ”0” to ”1” when there is a fault
caused by a TUE timeout and the subsequent fulfillment of the step enabling
condition for the current step.
UQIT
Acknowledge a fault (unconditional)
Effective on a change of signal at Input UQIT from ”0” to ”1” when there is a fault
caused by a TUE timeout and the step enabling condition is not fulfilled, but the
number of the faulty step appears on the step display.
4–44
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
S-NR,
S-AZ
Step number, step selection
Each step of the sequencer, specified by step number, can be selected with H/A = 1
and a leading edge of
S-AZ.
The sequencer processes INIT Step S1 for one PLC cycle. There is no further
command output.
SST+,
SST-
Step control (with condition)
+ : forward
– : backward
TIP+,
TIP-
Jog mode (with condition)
+ : forward
– : backward
Direct changeover from S-AZ to SST- or TIP- not possible; select SST+ or TIP+
beforehand.
The step enabling condition (RLO) for the current step is displayed following a
change from S-AZ to SST+ or TIP. Commands are output irrespective of the
condition.
NST
Cold restart
A branch is executed with a Stop loop with STS when a parameter error is detected
in the FB (see errors %1 ... %7) . When the cause of the error has been eliminated,
the NST function is required.
GST
Initial setting
ST0 and SST0 are reset on a warm restart (GST = ”1”).
SANZ
Output of the step No.
The step No. is displayed in BCD code (3 places).
S+AK
Two or more steps simultaneously active
Output S + AK = ”1” when more than one step is simultaneously active in a
sequencer.
STO
Fault in the sequencer
STO = ”1” if a fault occurs due to a TUE timeout.
Note:
Step sequencing is possible only with QIT or UQIT.
SSTO
Step with fault
SSTO = ”1” if a fault occurs due to a TUE time-out and a faulty step is displayed.
Note:
Step sequencing can be forced with UQIT.
VKE
RLO of the current transition
Signal VKE active only in mode H/A = ”1” (manual).
Indication for SST+, SST-, TIP+, TIP- and S-AZ that step enabling is possible.
STR
Control backward
Logic ”1” when SST- or TIP-; logic ”0” is present when AUTO, S-AZ, SST+, TIP+.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–45
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
06.93
TIPB
Jog mode
Signal TIPB is output in the event of changeover to jog mode via TIP+ or TIP-. It is
removed if one of the other modes is selected.
TIP
Jog signal
Signal TIP is output as long as Input TIP+ or TIP- is at logic ”1”.
5. Additional information
Programming aid
The following program chart serves to create a step sequencer for the forwards and
backwards operation of a sequence controller with FB ALS:V/R in GRAPH 5 representation.
Backward jumps must always be programmed as alternative branches.
a) Programming for the linear part of the sequencer is in the transition part, as follows:
Tk
S
Transition K/1
A -STR
A I ...
BE
Transition n/1
AN -STR
A I ...
BE
S n-1
Backwards
Jump to
step S n-1
Forwards
S
Sn
Tn
Tk
S n-1
4–46
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
b) Transitions are programmed as follows for alternative branches and junctions:
- Step enabling condition at the
beginning of an alternative branch
Transition K/1
A -STR
A I ...
BE
Transition n/1
AN -STR
A I ...
BE
Tk
S
S n-1
Backwards
Jump to
step S n-1
S
Sn
Tn
Forwards
S
Transition m/1
AN -STR
A I ...
BE
Tk
S
S n-1
S
n+1
Sm
Forwards
- Step enabling condition at the end
of an alternative branch
Tl
Tm
S
Transition l/1
A -STR
A I ...
Tm
S
S n-1
Backwards
Jump to
step S n-1
Sm
T
T
BE
Transition m/1
A -STR
A I ...
BE
Transition n/1
AN -STR
A I ...
BE
Backwards
Jump to
step S m
Sn
Tn
Tl
Tm
Forwards
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
S
S n-1
6FC5 197- AA30
Sm
4–47
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
06.93
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
c) Transitions are programmed as follows for simultaneous branches and junctions:
Tm
Tl
- Step enabling condition at the
beginning of a simultaneous branch
Transition l/1
A -STR
A I ...
BE
Transition m/1
A -STR
A I ...
BE
S
S n-1
Backwards
Jump to
step S n-1
S
S
Sn
Backwards
Jump to
step S n-1
Sm
Tl
Tm
S n-1
- Step enabling condition at the end
of a simultaneous branch
Tr
Tp
S
Transition r/1
A -STR
A I ...
BE
Backwards
Jump to
step S n
Transition p/1
A -STR
A I ...
BE
Backwards
Jump to
step S m
S
Sn
Sm
S
S
n+1
Tr
Sn
Note:
4–48
S n-1
Tp
Sm
Transitions in which a simultaneous branch is opened or closed, must not contain a
backward jump.
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
FB 94 ALS:AUT
GRAPH 5 automatic sequencer
1. Description
The function block organizes simple sequencers without modes and with up to 127 steps per
sequencer. The steps must be programmed on the PG685/PG730/PG 750 in GRAPH 5.
Sequencer performance:
Change of signal STA from ”0” to ”1”:
-
If the sequencer is at the first step, it is started.
-
If the sequencer is not at the first step, it is processed further, starting at the current step.
For sequencer performance following a warm or cold restart, see GST and NST.
An error message is output on a TUE time-out. Commands output is continued. The current
step remains in force, and sequencing to the next step is not possible.
Waiting time TWA, if specified, is taken into account.
Differences compared to GRAPH 5, FB 70:
-
Selective processing of the sequencer only
-
Main DB (RAM) is the DB corresponding to the SB number.
-
Maximum of 4 simultaneous branches possible.
-
The DB corresponding to SB number + 1 must be resident in PROM and is copied into
the main DB on a cold restart.
-
The first step must be defined as the INIT step.
See the GRAPH 5 Description for programming instructions.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–49
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
06.93
2. Block data
Lib. No.:
E88530-B 6094-A-_ _
FBs to be loaded:
FB94
SBs to be loaded:
SB 0
DBs to be loaded:
-
Type of FB call:
Unconditional
DBs to be input:
Main DB
DB number (no. = SB no. + 1)
Diagnostic DB if applicable
Error messages:
STO and SSTO
Error with system stop:
%1: Number of programmed SB not in permissible range
(Range: 150 SB number 255)
(#) %2: Programmed SB is not in PLC.
%3: Programmed SB was not created with GRAPH 5.
%4: Step 1 was not defined as INIT step.
(#) %5: DB (SB number + 1) not in PLC.
%6: Number of programmed diagnostic DB not in permissible range
(Range: 150 DB number 255)
(#) %7: Diagnostic DB not in PLC.
Errors %6 and %7 are output only if the diagnostic function is
selected (DIAG = ”1”).
(#) This parameter error results in a PLC stop in FB 89 (BAA:LESE) with
identifier %4 Block does not exist.
4–50
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
3. Block call
FB 94 ALS:AUT
D,KF
–
SB
SANZ
– Q,W
I,BI
–
STA
S+AK
– Q,BI
I,BI
–
R
I,BI
–
SAN
I,BI
–
ANZ+
I,BI
–
DIAG
I,BI
–
QIT
I,BI
–
UQIT
$F3.1
–
NST
– %1
$F2.1
–
GST
– %2
STO
– Q,BI
SSTO
– Q,BI
– %3
– %4
– %5
– %6
– %7
$:= Specified
parameter
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–51
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
06.93
4. Signal descriptions
SB
Number of the sequence block in the sequencer.
Max. 52 sequencers per PLC (150 < number <255) as two DBs are reserved. A
main DB is generated for each sequencer on the PG685/PG730/PG 750 via function
keys F6, F5 (DBGEN: see GRAPH 5 Description).
STA
Sequencer start
STA = ”1”: Sequencer will be processed.
If the sequencer is at the first step, it is restarted when Input STA changes from ”0”
to ”1”.
The ”STA” signal must be reset by the user program, not in the init step.
R
Reset
If Input R is ”1”, the sequencer proceeds to the first step.
The set timeouts TUE and delays TWA are reset.
SAN
Step display
The step display is updated when SAN = ”1 ”.
ANZ+
Advance step display
If two or more steps are simultaneously active (observe signal S + AK when
simultaneous branches are involved) these step numbers can be displayed
successively with a change of signal at Input ANZ+ from ”0” to ”1” (evaluation only
when SAN = 1).
DIAG
Diagnostic function
If DIAG = ”1” the diagnostic function for the sequencer is executed on the PG and
relates to the diagnostic data block generated with DBGEN (must be loaded into the
PLC for this purpose). This function is an aid for recognizing the cause of a fault,
which can then be traced at the zoom-in level (PG = PG685, PG730, PG 750).
QIT
Acknowledge a fault (conditional)
Effective with a change of signal at Input QIT from ”0” to ”1” when there is a fault
caused by a TUE timeout and subsequent fulfillment of the step enabling condition
for the current step.
UQIT
Acknowledge a fault (unconditional)
Effective with a change of signal at Input UQIT from ”0” to ”1” when there is a fault
caused by TUE timeout and the step enabling condition is not fulfilled, but the
number of the faulty step appears on the step display.
NST
Cold restart
A branch is executed to the stop loop with STS when a parameter error is detected
in the FB (see errors %1...%7) . When the cause of error has been eliminated, the
NST function is required.
GST
Initial setting
STO and SSTO are reset on a warm restart (GST = ”1”).
4–52
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.3 Data sheets
SANZ
Output step number
The step number is displayed in BCD code (3 digits).
S+AK
Two or more steps simultaneously active.
Output S + AK = ”1” if more than one step is active in a sequencer.
STO
Fault in the sequencer
STO = ”1” when a fault occurs due to a TUE timeout.
Note:
Step sequencing is only possible with QIT or UQIT.
SSTO
Step with fault
SSTO = ”1” if a fault occurs due to a TUE timeout and a faulty step is displayed.
Note:
Step sequencing can be forced with UQIT.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–53
4 Data Sheets for Sequencer Blocks
4.4 Program examples
06.93
4.4
Program examples
4.4.1
Program example for a drive control sequencer with GRAPH 5
block FB94 (ALS:AUT)
A gear change has been chosen as an example of the use of FB94 (ALS: AUT) with the
Graph 5 block FB94. This example covers driving of the gear train as well as signals for readin disable, feed disable, spindle stop and specified direction of rotation.
Fig. 4.26 shows the block diagram for the complete gear change. Gear changing is initiated
with commands M41, M42, etc. which are buffered as flags to start gear changing, i.e. the
sequencer.The sequencer outputs commands to the NC as well as to the subordinate
individual control module (not included in this example) for the gear train. The read-in disable,
feed disable, spindle stop and specified direction of rotation signals should be gated so that
the reason for them is clearly recognizable, as these signals not only come from the
sequencer, but are also dependent on other criteria.
NC
NC
PLC
M word
M decoding
M
change
M03 M04 ...
M41 M42
>1
R S
Change
Start flag
direction
Read-in disable
>
1
Sequencer
D
S=0
Feed disable
Spindle
control
>
1
D
Mesh
gear
Spindle stop
>
1
D
Select oscill. speed
Spindle in spec. range
Gear
drive
M
Gear
meshed
M
Actual gear
Gear
Spindle
Fig. 4.26
4–54
Block diagram for gear changing
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4 Data Sheets for Sequencer Blocks
4.4.1 Program example for a drive control sequencer with GRAPH 5 block FB 94 (ALS:AUT)
Fig. 4.27 shows the program structure for the example. First, the logic operations for starting
and resetting the sequencer are programmed in the program block for spindle control (PB18).
The sequencer with which gear changing is controlled is called. The signals are then
transferred to the interface.
PB spindle control
From OB 1
Sequencer
start
Reset
sequencer
O
– F 41
O
– F 42
S
– START AK
SB
AN – START AK
A
– T-RESET
•
•
=
Step 1
– RESET AK
FB
Sequencer
Q
Transfer
signals to
interface
Sequencer
JU FB
Step 2
– DB-K1
•
•
•
Step 6
To OB 1
Fig. 4.27
Program structure for gear changing
Fig. 4.27 shows the process for gear changing with the GRAPH 5 automatic sequencer FB94
(ALS:AUT).
The corresponding software listing for the sequencer is given in Appendix 1, PB 18.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–55
4 Data Sheets for Sequencer Blocks
4.4.1 Program example for a drive control sequencer with GRAPH 5 block FB 94 (ALS:AUT)
S
S1
S
S2
06.93
SP
SP
SP
SP
SP
SP
SP
SP
Reset gear changing
Reset PLC spindle control
Reset oscillation speed
Reset set direction CW
Reset spindle disable
Reset mesh gear command
Reset read-in disable
Reset feed disable
-
SP
SP
SP
SP
tue
PLC spindle control
Spindle disable
Read-in disable
Feed disable
Timeout 10s
-
SP
SP
SP
SP
tW
Reset spindle disable
Set direction CW
Oscillation speed
Mesh gear command
Delay 1s
1
SP
tW
Reset set direction CW
Delay 1s
1
S=0
S
S3
RM: Gear
meshed
&
1
S
S4
RM: Gear
meshed
1
RM: Gear changed
&
S
S5
SP
SP
SP
SP
SP
tue
tW
Reset oscillation speed
Reset gear changing
Reset PLC spindle control
Reset set direction CW
Reset mesh gear command
Timeout 10s
Delay 0.2s
1
1
Spindle in specified range
S
S6
Fig. 4.28
4–56
SP
SP
SP
SP
SP
SP
Reset read-in disable
Reset feed disable
Reset mesh gear command
Reset PLC spindle control
Reset oscillation speed
Reset spindle disable
-
Procedure for gear changing with FB94
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
4.4.2
4 Data Sheets for Sequencer Blocks
4.4.2 Program example of a tool change with Graph 5 block FB 93 (ALS: V/R)
Program example of a tool change with Graph 5 block FB 93
(ALS: V/R)
As an example for using FB93 (ALS:V/R) a part sequence for the "Deposit tool" function with
a tool changer has been chosen, as for FB91; tools are changed between the magazine and
the spindle by means of a gripper (Fig. 4.29). The example shows the Graph 5 programming
for the sequence steps for forward and backwards operation.
The individual control elements which execute the change of signal for "STR" are not part of
the example.
Fig. 4.29 shows the procedure for depositing the tool with the Graph 5 forwards/backwards
sequencer (FB93: ALS:V/R).
The associated software listing is given in the Appendix.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
4–57
4 Data Sheets for Sequencer Blocks
4.4.2 Program example of a tool change with Graph 5 block FB 93 (ALS: V/R)
S
S1
SP
06.93
Reset deposit tool
-
Start cond.
STR
S
STR
NS
SP
RM-SENKR
1
S2
S
&
S3
STR
NS
Gripper 90 ° to the right
Reset magazine positioning
1
-
Retract gripper
1
Clamp spindle
Clamp tool in magazine
1
2
R
STR
RM-VORN
1
S
&
S4
R
STR
SP-DRUCK
WZM-GESP
SP-LEER
&
&
STR
SP-DRUCK
WZM-GESP
SP-LEER
S
STR
NS
NS
1
2
SP-LEER
S5
STR
NS
Relocate magazine data
-
NS
Release gripper
1
1
STR
NS
Gripper 90 ° to the left
1
R
STR
STR
S
&
S6
R
STR
GR-GESP
SP-LEER
&
R
STR
GR-GESP
SP-LEER
&
S
S7
R after S3
RM-WAAGR
1
STR
STR
&
&
R
Fig. 4.29
4–58
Procedure for depositing a tool with FB93
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
01.99
4.5
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
Function block FB 27 (SW 6.1 and higher)
General
The IM308C adapter enables you to use the SIMATIC module IM308C (a PROFIBUS-DP
interface) in the SINUMERIK 840C system. The standard function block FB 27, which handles
the communication, is required for operation of the IM308C.
The function block FB 27 is part of the basic function of package 0, version 23. Examples for
direct programming of FX 92 and indirect programming of FX 93 are also part of version 23.
Notes on configuration
If only the conventional I/O range from 0 to 255 is used, i.e. PAB 0 to 127 (U E ...) and I/Os
(LEW; TAW), it is sufficient to specify S5 CPU 922 when programming with COM PROFIBUS
V2.x.
With COM-PROFIBUS V3.2 and higher, the IM308C module can be directly configured with
SINUMERIK 840C.
If the diagnostic functions, direct and indirect programming are required, as for FB 192 with
S5, FB 27 must be used for the 840C. FX 92 and FX 93 are given as FX examples for direct
and indirect programming respectively in the new FB package 0, version 23.
Description of function block FB 27
Description of functions
If FB 27 is used, the IM308C must be addressed in the memory area F800h to F9FF of the IM.
The segment address is pre-defined with number 4.
The offset address is derived from the IM address /. E000h.
This produces the following assignment of absolute addresses for the PLC:
IM address
Segment number 135 WD
Offset address 135 WD
F800h
4
1800h
Other DP window addresses offered by the COM PROFIBUS software are not supported by
the IM308C adapter for the SINUMERIK PLC and are not necessary because SINUMERIK
cannot accommodate multiprocessors.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
4–59
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
01.99
FB 27 transfers data between a memory area of the central processor (flag area, data block
area) and the IM308C module via one of the stated address areas (IM link). The following
functions are possible in this context:
–
–
–
–
–
Read inputs of a slave
Read/write outputs of a slave
Read diagnostic information of a slave
Read the master diagnosis
Change the PROFIBUS-DP address of a slave
Writing the outputs is possible only if no outputs have been programmed in COM PROFIBUS.
Otherwise, the programmed outputs are given preferential treatment by the firmware of the
IM308C.
The following functions are possible for the connection of the DP/AS interface to the left of the
IM308C:
–
–
–
–
Initiate write job and write data (Data_Write)
Read acknowledgement for previously initiated write job
Initiate read job (Data_Read)
Read data and acknowledgement of previously initiated read job
The following are permissible as memory areas: flag area M, data blocks DB and expanded
data blocks DX.
Besides the data transfer functions stated, FB 27 can also be used to execute so-called Global
Control Commands. The following Global Control Commands are possible:
–
–
–
–
SYNC: simultaneous output and freezing of output states for the DP slaves
UNSYNC: cancels the SYNC command
FREEZE: freezes input states
UNFREEZE: cancels the FREEZE command
FB 27 can also be used to initiate a combination of the Global Control Commands stated
above. Here, it is possible to edit the Global Control Commands for individual slaves or slave
groups.
In addition, FB 27 can be used to check whether a Global Control Command that has already
been initiated has been fully processed. This is done with the function:
Check Global Control Command.
If the address area contains a different module than the IM308C module, it is not recognized
by the function block.
The standard function block may be stored in an EPROM module. The user is allowed to
change the number of FB 27.
4–60
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
01.99
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
Calling FB 27
The simplest case is where FB 27 is called only during cyclic program processing. If it is
necessary to call FB 27 again on the process-alarm or time-alarm processing levels (e.g. if the
outputs of a slave are to be written very quickly after a process alarm or the inputs of a slave
are to be read continuously at recurring intervals, the programming in the application program
must ensure that FB 27 does not interrupt itself. This is done by blocking the alarms before
each FB 27 call and releasing them again after the call.
STL representation:
NAME
DPAD
IMST
FCT
GCGR
TYPE
STAD
LENG
ERR
LAD/CSF representation:
FB 27
+––––––––––+
!
IM308C
!
– – ! DPAD
ERR ! – –
– – ! IMST
!––
– – ! FCT
!––
– – ! GCGR
!––
– – ! TYPE
!––
– – ! STAD
!––
– – ! LENG
!––
––!––––––––– !––
: SPA FB 27
: IM308C
:
:
:
:
:
:
:
:
The function block can be called with direct or indirect programming.
Direct programming of the function block call
In direct programming, the actual operands specified for the module apply for all parameters.
The user selects direct programming by specifying a valid function (except for ”XX”) for the
FCT parameter.
Indirect programming of the function block call
In indirect programming, the parameters must be entered in the parameter DB. The user
selects indirect programming by specifying the actual operand ”XX” for the FCT parameter.
The parameter DB must be opened before the user calls FB 27. If the parameter DB is too
short or the IM number does not exist, or has been programmed incorrectly, the PLC goes into
the STOP state. All other programming errors are detected by the function block and entered
in the parameter DB.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
4–61
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
01.99
Description of the block parameters of FB 27
Name Kind Type Designation
Permissible assignment
DPAD D
KH
Address range of
IM308C, (DP
window, DP
window address)
KH = F800 (default value):
Only the value F800h is permissible for SINUMERIK PLC 135
WD, since multiprocessor-mode is not implemented.
IMST
D
KY
Number of the
IM308C
PROFIBUS-DP
address of the
slave (station
number)
KY = x,y:
x: Number of the IM308C
x = 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, ..., 240
y: PROFIBUS-DP address of the slave
y = 1 to 123 (if FCT=WO, RO, RI, SD)
y = 1 to 126 (if FCT =CS)
y = Irrelevant (if FCT=MD, GC, CC)
FCT
D
KC
Function of FB27
(see table on the
next page for
precise
explanation)
WO = Write outputs
RO = Read outputs
RI = Read inputs
MD = Read master diagnosis
SD = Read slave diagnosis
GC = Global Control (execute control command)
CC = Check Global Control (check control command)
CS = Change Station Number (change PROFIBUS-DP
address)
XX = Switchover to indirect programming
GCGR D
KM
Control
commands
KM = xxxxxxxx yyyyyyyy; (only relevant if FCT=GC, CC)
xxxxxxxx: Select control command
yyyyyyyy: Select group of DP slaves for which the control
command is to apply.
TYPE D
KY
TYPE of the PLC
memory area
(Global
Command, group
selection)
KY = x,y:
x = 0: Data block DB;
Start of PLC
memory area
(start address)
KF = +x:
x value range depends on TYPE
STAD D
KF
x = 1: Extended data block
DX
x = 2: Flag area M
y = 10 to 255; DB or DX number (only relevant if
x = 0 or x = 1)
x: Number of the first data word (if TYPE: x = 0 or x = 1)
x: First flag byte1) (if TYPE: x = 2)
LENG D
KF
Number of bytes
to be transferred
(Length)
KF = +x:
x: Number of bytes to be transferred
If FCT = DW or CR: x = 1 to 240
If FCT >< CS: x = 1 to 2442) or c = -1; joker length4)
If FCT = CS: x = 4 to 2442)
ERR
W
Error word (Error)
Data, flag1) or output word5)
1)
2)
3)
4)
5)
A
No scratch flags (MB200 to MB255) may be used.
The area to be transferred must fully lie in the permissible range or data block.
The data word resides in the data block opened prior to calling the FB. If the data word does not exist, the
PLC goes into the STOP state. Only the range MW 0 to MW 198 may be used for flags.
The user may specify the joker length -1. In this case, the FB transfers all permissible bytes. If the source or
target range is not long enough, the FB does not transfer any data, but issues an error to the ERR parameter.
The data word resides in the data block opened prior to calling FB27. If the data block does not exist, the
PLC goes into the STOP state. Only the range MW 0 to MW 198 may be used for flags.
4–62
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
01.99
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
The parameters are checked for valid limits and any errors found notified via the ERR
parameter.
FCT parameter: function of FB 27
Meaning of the FCT parameter
The user specifies the function to be executed with the FCT parameter.
Function
FCT =
Meaning
Sequence
WO
Write Outputs
FB 27 transfers the number of bytes specified in the LENG
parameter from the PLC source area to the DP slave (IM308C).
The data in the DP window are ignored if absolute addressed are
specified via COM PROFIBUS. These addresses are then
preferred in order to avoid inconsistencies.
RO
Read Outputs
FB 27 reads the number of bytes (outputs) specified by the LENG
parameter from the DP slave (IM308C) and transfers them to the
target area of the PLC.
RI
Read Inputs
FB 27 transfers the number of bytes specified in the LENG
parameter from the DP slave (inputs) to the PLC target area.
MD
Read Master
Diagnosis
FB 27 transfers the master diagnosis of the specified IM308C to
the PLC target area.
SD
Read Slave
Diagnosis
FB 27 transfers the slave diagnosis of the specified DP slaves to
the PLC target area.
GC
Global Control
FB 27 initiates the control command (Global Control) specified in
the GCGR parameter.
CC
Check Global
Control
FB 27 checks whether the Global Control Command specified in
the GCGR parameter is still being processed.
As long as ERR = DCh is output, the inputs affected by the
control command must not be read, nor may the outputs be set.
CS
Change Station
Number
FB 27 transfers a new PROFIBUS-DP address to the DP slave
specified in the IMST parameter. The new PROFIBUS-DP
address is defined in the PLC source area. Prior to calling the
command, the new PROFIBUS-DP address must be programmed
in the IM308C.
XX
Switchover to
indirect
programming
FB 27 fetches the programming data from the data block opened
before calling the function block.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
4–63
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
01.99
GCGR parameter: issuing control commands
Meaning of the GCGR parameter
FB 27 interprets this parameter only if the user initiates a Global Control Command or checks
whether a particular control command is still being processed (FCT = GC, CC). The COM
PROFIBUS programming determines which DP slaves are contained in which groups.
If the FREEZE and UNFREEZE commands are present at the same time, only UNFREEZE is
executed. The same applies to the SYNC and UNSYNC control commands.
Structure of the control commands
Bit 15 ...
... 8
7 ...
Global Control (control commands)
... 0
Group selection
Bit
Meaning of control command
Bit
Meaning of group selection
15
0
7
1: Group 8 selected
14
0
6
1: Group 7 selected
13
1: SYNC command is executed
5
1: Group 6 selected
12
1: UNSYNC command is executed
4
1: Group 5 selected
11
1: FREEZE command is executed
3
1: Group 4 selected
10
1: UNFREEZE command is
executed
2
1: Group 3 selected
9
0: Reserved
1
1: Group 2 selected
8
0: Reserved
0
1: Group 1 selected
ERR parameter: length byte and error byte of FB 27
ERR parameter assignments
Structure of the ERR parameter:
Bit
Name
Meaning
Bit 15 to 8
Length byte
The length byte indicates how many bytes the FB 27 has
transferred. The length byte is always updated when FB 27 is
called with LENG = -1 (joker length).
Bit 7
Group error bit
1: Error
Bit 6:
IM error
1: Error
Bit 4 and 5
Programming error
1: Programming error (at least one of the parameters specified
when calling FB 27 is invalid)
Bit 0 to 3
Error number1 to F
See following table
4–64
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
01.99
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
If FB 27 accesses a DP slave for which the error message module ”QVZ” is selected, and this
DP slave does not exist, ”QVZ” is not sent as error message; rather, the corresponding error
message is given in the ERR parameter of FB 27. If IM308C parameters are incorrect or do
not exist, the CPU goes into the STOP state.
Error numbers in the ERR parameter
The function block outputs an error message in the low byte of the ERR parameter.
Low byte of
ERR parameter
hex
Meaning
Explanation/remedy
dec
00
00
No error
No error has occurred on calling the function
block.
A2
162
IM No. (high byte of IMST
parameter) not permissible
IM No. may only take the following values:
0, 16, 32, 48, 64, 96, 112, 128 to 240.
A3
163
PROFIBUS-DP address of the slave
not permissible (low byte of the
IMST parameters)
The PROFIBUS-DP address must lie in the range
1 ST 123.
A4
164
LENG parameter not permissible
The LENG parameter must either be in the range
0 to 240, 1 to 244 or 4 to 244 depending on the
function.
A5
165
TYPE parameter not permissible
The TYPE parameter must lie in the range
0 to 2.
A6
166
GCGR parameter not permissible
The low byte of the GCGR parameter must not
be equal to 0.
A9
169
TYPE parameter not permissible:
the specified DB/DX data block
does not exist.
The specified source/target data block must be
created in the user module.
AA
170
TYPE parameter not permissible:
specified DB/DX data block too
short
The specified source/target data block must be
long enough in the application memory:
•
For LENG -1
Minimum length (word) = STAD+LENG/2 -1
•
For LENG = -1
Minimum length depends on the structure of
the DP slave
STAD min. length (word) STAD+122
AB
171
TYPE parameter not permissible:
specified flag memory area M too
small
The data to be transferred must fully fit into the
following area:
•
Valid area for flags:
0 MB 199
AC
172
FCT parameter not permissible
FB 27 does not recognize the specified function.
A valid function must be programmed in KC
format.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
4–65
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
Low byte of
ERR parameter
hex
01.99
Meaning
Explanation/remedy
dec
AD
173
STAD parameter not permissible
The STAD parameter is valid in the following
range:
•
Valid range for flags:
0 STAD 199
•
Valid range for data words:
0 STAD 255
AE
174
Slave has failed, is not configured,
no I/Os are configured or the
IM308C is in STOP state.
Evaluation of the slave diagnosis will produce
more detailed information.
AF
175
LENG parameter > length byte on
the IM308C
The IM308C does not possess the required
number of data bytes for the specified slave.
Reduce LENG or call the function block with the
joker length LENG = -1.
B1
177
TYPE parameter not permissible:
specified DB/DX No. invalid
The DB/DX No. must be 10.
B2
178
DPAD parameter not permissible
Depending on the CPU type, only the address
F800h may be set at the DPAD parameter.
C1
193
Error message from IM308C:
The requested command has
already been executed; the IM308C
has no further resources.
At this point in time, only one CS command or
two GC commands are possible.
C2
194
Error message from IM308C:
The IM308C has the wrong
operating mode.
The control command is only possible in the
IM308C modes RUN or CLEAR.
C3
195
Error message from IM308C:
No corresponding group has been
configured or the GCGR parameter
has not been input correctly.
A control command is only possible when a
corresponding group has been configured with
COM PROFIBUS.
Check the structure and contents of the control
command.
C5
197
Error message from IM308C:
PROFIBUS-DP address not
configured.
In order to be able to change a PROFIBUS-DP
address, the relevant PROFIBUS-DP address
must have been configured with COM
PROFIBUS.
C6
198
Error message from IM308C:
DP slave does not respond to the
PROFIBUS-DP address change
(PROFIBUS-DP address does not
exist).
The DP slave must physically exist and be
connected to the PROFIBUS-DP
C7
199
Error message from IM308C:
DP slave does not respond correctly
to the PROFIBUS-DP address
DP slave has responded with incorrect data; the
CS command has not been processed by the
DP slave.
Repeat the function FCT = CS.
If the error message does not change, check
the DP slave.
4–66
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
01.99
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
Low byte of
ERR parameter
hex
Meaning
Explanation/remedy
dec
C8
200
Error message from IM308C:
DP slave responds incorrectly to the
PROFIBUS-DP address change
DP slave has responded with incorrect data; the
CS command has not been processed by the
DP slave.
The function FCT = CS must be repeated.
If the error message remains, check the DP
slave.
C9
201
Error message from IM308C:
DP slave responds incorrectly to the
PROFIBUS-DP address change
DP slave has responded with incorrect data; the
CS command has not been processed by the
DP slave.
The function FCT = CS must be repeated.
If the error message remains, check the DP
slave.
CA
202
Error message from IM308C:
DP slave responds incorrectly to the
PROFIBUS-DP address change
DP slave cannot change the PROFIBUS-DP
address; the corresponding SAP is not available
at the DP slave.
DC
220
The control command is still being
processed.
The control command specified in the GCGR
parameter is still being processed.
Inputs and outputs affected must not be
processed. The function FCT = CC must be
repeated.
DE
222
The IM308C is currently performing
data transfer to the DP slaves.
The desired function could not be
carried out.
The function can be re-initiated.
DF
223
No acknowledgement received from
IM308C.
The IM308C has not sent back an acknowledgement to the FB after initiating the function.
or
IM308C has not sent an acknowledgement to
FB 27 within 5 ms.
Possible cause: the baud rate is too low.
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
4–67
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
01.99
Indirect programming
Assignment of the parameter data block
The assignment of the parameter data block is only relevant for indirect programming of
FB 27. During indirect programming (FCT = ”XX”), the function block takes the programming
data from the parameter data block, not from the block parameters. The parameter data block
must be opened by the user prior to calling FB 27. If the parameter data block is too short, the
CPU assumes the STOP state.
The parameter data block has the following structure:
Data word
Block parameter
Recommended
data format
DW 0
Reserved
KH
DW 1
DPAD
KH
DW 2
IMST
KY
DW 3
FCT
KC
DW 4
GCGR
KM
DW 5
TYPE
KY
DW 6
STAD
KF
DW 7
LENG
KF
DW 8
ERR
KY
DW
91)
DW
101)
DW
111)
DW 121)
Slot number of DP/AS link
Data record number
Reserved
Error code 1
Error code 2
Reserved
KY
KH
KY
KH
Programming FB 27 for the DP/AS interface module
FB 27 can be used to access the DP/AS interface module via the IM308C. To do this, FB 27
must be programmed indirectly, i.e. all required parameters are stored in a data block and the
function is programmed with XX (FCT = XX). The precise programming of the DP/AS interface
module is described in the device manual ”Decentralized I/O system ET 200” Document No.
EWA 4NB 780 6000-01b.
1)
The data words DW 9 to DW 12 are required for the DP/AS interface. Even if FB 27 does not activate the
DP/AS link, the parameter data block must always be present up to DW 12.
4–68
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
01.99
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
FCT parameter
The following functions can be initiated via indirect programming (DW 3) for the DP/AS
interface:
FCT
Description
DW
Initiate write job and write data (Data_Write)
CW
Acknowledgement of write job initiated previously (Check_Write)
DR
Initiate read job (Data_Read)
CR
Read data and acknowledgement of previously initiated read job (Check_Read)
In order to prevent incorrect processing of the read and write jobs,
•
•
a Check_Write is required after each Data_Write
a Check_Read is required after each Data_Read.
FCT parameter=DW
You can use this function to change the address of an AS interface slave or to write
parameters to the AS interface. The selected function and the associated parameters must be
written to the PLC memory area defined by the parameters TYPE, STAD and LENG before the
FB is called. The function FCT=DW can only be executed via indirect programming. The data
block used has the following structure:
Data word
Parameter
DL
DW 0
--
DW 1
DPAD
DW 2
IMST
DW 3
FCT
DW 4
GCGR
DW 5
TYPE
Type of PLc memory area: here 0Ah (DB 15)
DW 6
STAD
Start of memory area: here 01h
DW 7
LENG
Length of PLC memory area in bytes: here 03h
DW 8
ERR
DW 9
DR
Not relevant
Address range of IM308C, here: F800h
Number of IM308C
Function of FB 27: here DW
Not relevant
Error word of FB 27
Slot number: here 04h
DW 10
DW 11
PROFIBUS-DP address of the slave
Range 1 to 123
(is currently not checked)
Data record number: here 84h
Not relevant
Error code 1
Error code 2
DW 12
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
4–69
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
01.99
Allocation of the PLC memory area for FCT=DW:
DB/DX
M
Modify operating address
Write parameter
DL (n)
Byte (n)
OPCODE: 02h
OPCODE: 03h
DR (n)
Byte (n+1)
PARAMETER1: 00h to 1Fh
Source address
PARAMETER1: 01h to 1Fh
Slave address
DL (n+1)
Byte (n+2)
PARAMETER2: 00h to 1Fh
Destination address
PARAMETER2: 00h to 0Fh
Parameter for AS interface slave
FCT parameter=CW
This function reads the acknowledgements of the FCT=DW function initiated previously. The
acknowledgements indicate how the function FCT=DW has been terminated (DW 8:
parameter ERR of FB 27; DW 11: error codes 1 and 2).
The function FCT=CW can only be executed via indirect programming. The data block used
has the following structure:
Data word
Parameter
DL
DR
DW 0
--
DW 1
DPAD
DW 2
IMST
DW 3
FCT
DW 4
GCGR
Not relevant
DW 5
TYPE
Not relevant
DW 6
STAD
Not relevant
DW 7
LENG
Not relevant
DW 8
ERR
Not relevant
Address range of IM308C, here: F800h
Number of IM308C
PROFIBUS-DP address of the slave
Range 1 to 123
(is currently not checked)
Function of FB 27: here CW
Acknowledgement: error word of FB 27
DW 9
Not relevant
DW 10
Not relevant
DW 11
Acknowledgement: error code 1
Acknowledgement: error code 2
DW 12
4–70
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
01.99
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
FCT parameter=DR
This function reads the parameters of the DP/AS interface. The function FCT=CR can be only
be executed via indirect programming. The data block used has the following structure:
Data word
Parameter
DL
DW 0
--
DW 1
DPAD
DW 2
IMST
DW 3
FCT
DW 4
GCGR
Not relevant
DW 5
TYPE
Not relevant
DW 6
STAD
Not relevant
DW 7
LENG
DW 8
ERR
DW 9
DR
Not relevant
Address range of IM308C, here: F800h
Number of IM308C
Function of FB 27: here DR
Length of PLC memory area in bytes: here 19h
Error word of FB 27
Slot number: here 04h
Data record number: here 84h
Not relevant
DW 10
DW 11
PROFIBUS-DP address of the slave
Range 1 to 123
(is currently not checked)
Error code 1
Error code 2
DW 12
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5197- AA30
4–71
4 Data Sheets for Sequencer Blocks
4.5 Function block FB 27 (SW 6.1 and higher)
01.99
FCT parameter=CR
This function shows the parameter echo, the version label and the acknowledgements of the
DP/AS interface following the function FCT=DR initiated previously. The acknowledgements
indicate how the function FCT=DR has terminated (DW 8: parameter ERR of FB 27; DW 11:
error codes 1 and 2).
The function FCT=CR can only be executed via indirect programming. The data block used
has the following structure:
Data word
Parameter
DL
DR
DW 0
--
DW 1
DPAD
DW 2
IMST
DW 3
FCT
DW 4
GCGR
Not relevant
DW 5
TYPE
Type of PLC memory area
DW 6
STAD
Start of PLC memory area
DW 7
LENG
Length of PLC memory area in bvtes: here 19h
DW 8
ERR
Not relevant
Address range of IM308C, here: F800h
Number of IM308C
PROFIBUS-DP address of the slave
Range 1 to 123
(is currently not checked)
An error message is sent for 00h or
123 however (see DW 8)
Function of FB 27: here CR
Acknowledgement: error word of FB 27
DW 9
Not relevant
DW 10
Not relevant
DW 11
DW 12
Acknowledgement: error code 1
Acknowledgement: error code 2
Reserved
END OF SECTION
4–72
© Siemens AG 1993 All Rights Reserved
6FC5197- AA30
SINUMERIK 840C (PJ)
01.99
5 Block Data
5
Block Data
Block data for FB Package 0
Name
FBNo.
17
STATUS
27
30
32
33
35
36
37
39
40
41
42
43
45
47
48
49
50
51
54
55
56
57
IM308C
MUL:16
DIV:16
DIV:32
DIV/100
ADD:32
SUB:32
DUAL/BCD
COD:16
COD:32
COD:B4
COD:B8
GST-FMBM
PSP:FMBM
FMBM:HSG
UP:FM/BM
UP2:FMBM
UP:FB45
FM-ANZ
BM-ANZ
MG-ANZ
FM-ABFR
58
BM-ABFR
Block
length
in
words
Processing Nesting
Call
time in ms depth
length in
words
68
2
965
50
73
288
32
95
95
20
35
302
26
55
280
89
275
236
136
83
18
18
287
30
7
10
14
5
10
10
4
6
8
5
7
2
2
2
14
2
7
2
2
2
2
0
0
1
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
1
0
2
31
2
2
59
93
MG-ABFR
ALS:V/R
285
872
2
19
0
1
94
ALS:AUT
597
9
1
13
2
0
0
110
SB01)
46
48
SUCH
FB-TIPP
ERWEIT
FMBM:MMC
FXNo.
Name
31
32
38
GRAYDUAL
DUALGRAY
PRO-KO1
127
118
112
4
4
4
0
0
2
39
PRO-KO2
452
3
1
81
82
IKONEN
STERNDRE
212
367
Block
length
in
words
100
Processing Nesting
Call
time in ms depth
length in
words
4
0.2
0
FBs
called
Assigned variables
FB54,
FB55,
FB56
FB34
FB51
FB50
FB47
FB46
FB46
FB49,
FB50
FB49,
FB50
FB11,60
FB89
FB11,60
FB89
FB11
Called in user program
FBs
called
Assigned variables
FB89
FX39,
FB62
FB62
FW 252, 254
FW 254
Called in user program
FY 224 - 237, 250
FW246, 248
FW240,242
FW225, FY229, FW240-254
FW240, FW24 2
FW245-254
FW245-254
FW246, 248
FW220-224, FW230-238
Called in user program
Called by FB50
Called in user program
Called by FB57/FB58
Called by FB49
Called by FB45
Called by FB17
Called by FB17
Called by FB17
Called in user program
Called in user program
Called in user program
FW230-254
FW230-254
FW230-239, FW252, FY254
FW230-254
SW 3
SW 3
Called by FX 38
FW 226 - 254
FW 250, 254
_______
*
1)
Processing time of current sequence block or step
Load only for GRAPH 5 sequencer
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
5–1
Appendix
6.1
Appendix 1
PB
PB 10
PB 11
PB 12
PB 14
PB 15
PB 16
PB 18
PB 19
•
•
Function
Transfer MCP* signals in interface
Copy interface to I/Q/F area
PLC/NC, COM link
Direction keys Interface axes 840C M
Direction keys Interface axes 840C T
Error messages, operational messages
Sequential control GRAPH5
Copy I/Q/F area to interface
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
a
a
a
a
a
a
a
aaa
a
a
a
aaa
a
aa
a
a
a
aa
a
a
a
a
a
a
aaa
a
aaa
aaa
aaaaa
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
6
a
aaaaa
a
a
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aaaaaaaaaaaaaaaaa
03.95
6 Appendix
6.1 Appendix 1
Appendix 1 contains examples of the use of the standard function block package 0 and of the
basic program.
The example is intended to demonstrate the supply of
2 NC channels
3 axes
1 spindle
with the most important interface signals such as mode selection switch, direction keys,
spindle override switch etc.
Moreover, examples of the NC PLC communication are included:
Transfer of R parameters from the NC to the PLC and vice versa
Program selection by the PLC
Reading actual values from the axes.
The transfer operations are initiated using extended M addresses.
PB 17 and PB 18 show examples of application for the sequence control blocks FB 92 and FB
94 (FB Package 0). The same sequence cascade is processed in STEP5 programming and
GRAPH5 programming.
Hardware configuration:
Assigned channels: 1 and 2
Number of axes: 3
Number of spindles: 1
Example of
FB 78
FB 70
FB 61, 62
FB 79
FB 67
-
FB 94
FB 71
Notes:
PB 14 can only be used for 840C Version M
PB 15 can only be used for 840C Version T
6–1
6 Appendix
6.1 Appendix 1
PB10
NETWORK 1
03.95
SPRM-A
0000
LENGTH=15
SYM
TRANSFER MACHINE CONTROL PANEL SIGNALS
TO DB CHANNEL 1
-
TRANSFER MACHINE CONTROL PANEL SIGNALS TO THE
CHANNEL-SPECIFIC
INTERFACE CHANNEL 1.
-
TRANSFER SPINDLE OVERRIDE SWITCH FOR SPINDLE 1 TO THE
SPINDLESPECIFIC INTERFACE DB 31, DW 1.
TRANSFERRED SIGNALS:
-GRUNDBL
+1
+1
GRUNDBL = IB 64
NETWORK 2
SHEET 1
OPERATING MODE SELECTOR KEYS, NC START, NC
STOP, FEEDRATE OVERRIDE SWITCH, SINGLE BLOCK,
KEYSWITCH, RESET, SPINDLE OVERRIDE SWITCH,
PROGRAM MODIFICATION E.G. DRY RUN FEEDRATE.
FB 78
---------------!
T:MS->KN
!
--!I-BY
!
--!K-NR
!
--!SPIN
!
----------------
INPUT BYTE BASIC BLOCK
000A
TRANSFER MACHINE CONTROL PANEL SIGNALS
TO DB CHANNEL 2
TRANSFER MACHINE CONTROL PANEL SIGNALS TO THE CHANNEL-SPECIFIC
INTERFACE CHANNEL 2.
TRANSFERRED SIGNALS:
-GRUNDBL
+2
+0
GRUNDBL = IB 64
6–2
OPERATING MODE SELECTOR KEYS, NC START, NC
STOP, FEEDRATE OVERRIDE SWITCH, SINGLE BLOCK,
KEYSWITCH, RESET, PROGRAM MODIFICATION E.G. DRY
RUN FEEDRATE.
FB 78
---------------!
T:MS->KN
!
--!I-BY
! :BE
--!K-NR
!
--!SPIN
!
----------------
INPUT BYTE BASIC BLOCK
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
PB11
NETWORK 1
6 Appendix
6.1 Appendix 1
SPRM-A
0000
LENGTH=39
SYM
SHEET 1
COPY SPINDLE-SPECIFIC SIGNALS IN FLAG AREA
COPY SPINDLE-SPECIFIC SIGNALS OF DB 31 (SPINDLE 1) IN FLAG AREA STARTING AT
FY 60. 4 WORDS ARE TRANSFERRED (DW 0-3 -> FY60-67).
PROCESSING OF FLAG AREA IN PB 17, PB 18.
FB 70
---------------!
T:NS>EAM
!
--!QUTY
!
--!QUAD
!
--!ZITY
!
--!AN/Z
!
--!PASP
!
--!ZASP
!
----------------
S
0,1
M
4,60
-NULL
-NULL
NULL = F 0.0
ZERO FLAG
NETWORK 2
0012
COPY CHANNEL-SPECIFIC SIGNALS IN FLAG AREA
COPY CHANNEL-SPECIFIC SIGNALS OF DB 10 (CHANNEL 1) STARTING WITH DW 17 IN
FLAG AREA STARTING AT FY 25. 7 WORDS ARE TRANSFERRED (DW 17-23 --> FY2538).
PROCESSING OF FLAG AREA IN NETWORKS 3 AND 4 IN PB 17, PB 18.
D
10,17
M
7,25
-NULL
-NULL
FB 70
---------------!
T:NS>EAM
!
--!QUTY
!
--!QUAD
!
--!ZITY
!
--!AN/Z
!
--!PASP
!
--!ZASP
!
----------------
NULL = F 0.0 ZERO FLAG
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
6–3
6 Appendix
6.1 Appendix 1
03.95
PB11
SPRM-A
LENGTH=39
NETWORK 3
0024
0026
0028
M09-DYN.
M08-STAT
INTERPRETATION FY/M9:
:A
:R
:***
=
=
- M09-DYN.
- M08-STAT
F
F
29.1
30.0
F 29.1
F 30.0
SYM
SHEET 2
COOLANT SELECTION
DYN.SIGNAL M09: ”OFF”
STAT. SIGNAL M08: ”ON”
DYNAMIC SIGNAL M09
STATIC SIGNAL M08
NETWORK 4
002A
002C
002E
0030
M08-STAT
M09-STAT
KUEHLMI
:A
:R
:=
:***
=
=
=
NETWORK 5
- M08-STAT
- M09-STAT
- KUEHLMI
F
F
Q
30.0
30.1
4.0
0032
F 30.0
F 30.1
Q 4.0
STAT. SIGNAL M09
OUTPUT COOLANT
STATIC SIGNAL M08
STATIC SIGNAL M09
COOLANT ”ON”
TRANSFER INTERFACE -> FLAG AREA
COPY INTERFACE DATA TRANSFER PLC/NC (DB 36) STARTING WITH DW 0 IN THE
FLAG AREA STARTING WITH FY 50. 3 WORDS ARE TRANSFERRED (DW 0-2 -> FY5055).
PROCESSING OF FLAG AREA IN PB 12.
D
36,0
M
3,50
-NULL
-NULL
NULL = F 0.0
6–4
FB 70
---------------!
T:NS>EAM
!
--!QUTY
! :BE
--!QUAD
!
--!ZITY
!
--!AN/Z
!
--!PASP
!
--!ZASP
!
----------------
ZERO FLAG
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
03.95
6 Appendix
6.1 Appendix 1
PB12
SPRM-A
NETWORK 1
LENGTH=115 SYM
SHEET 1
TRANSFER DECODED M FUNCTIONS TO FLAG AREA
PB 12 SHOWS DIFFERENT METHODS OF NC/PLC LINKING WITH FY 61 AND FY 62 (NCDLESE, NCD-SCHR).
TRANSFER OPERATIONS CAN BE INITIATED BY AN NC PROGRAM OR BY MEANS OF
THE OVERSTORE FUNCTION. TO DO SO, INPUT THE REQUIRED EXTENDED M
ADDRESS AND THE M ADDRESS AND PRESS NC START.
TO ACTIVATE M DECODING WITH EXTENDED ADDRESSES, THE RELEVANT PLC
MACHINE DATA HAS TO BE SET:
M DECODING WITH EXTENDED ADDRESSES CHANNEL 1: PLC MD 6009 = 0000 0001
IN THE PROGRAMMABLE CONTROLLER, THE DATA BLOCK BELONGING TO CHANNEL 1
HAS TO BE SET UP WITH THE DECODING LISTS OF THE EXTENDED M WORDS.
DECODING LIST CHANNEL 1: DB 80
3 DATA WORDS PER M WORD ARE ASSIGNED FOR DECODING AS FOLLOWS:
1ST WORD: EXTENDED M ADDRESS
2ND WORD: M ADDRESS
3RD WORD: HIGH-ORDER BYTE: DW NO., LOW-ORDER BYTE: BIT NO. IN DB 30
TRANSFER OF DECODED M SIGNALS FROM DB 30 TO FW 105
0000
0002
0004
0006
:C
:L
:T
:***
- DB-M-SIG DB30
DW1
FW105
DB M. DECOD. M SIGNALS
FY105: DYN., 106: STAT. SIG.
DB-M-SIG= DB 30 DATA BLOCKS DECODED M SIGNALS
DB80 -DB-DEC.1
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
SPRM-A
KF= +00010;
KF= +00010;
KY= 001,000;
KF= +00010;
KF= +00012;
KY= 001,001;
KF= +00010;
KF= +00089;
KY= 001,002;
KF = +0000
KF = +0000
KY = 000,000
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
LENGTH=14 SYM
M10 = 10
DB 30 DR 1 Bit 0
M10 = 12
DB 30 DR1 Bit 1
M10 = 89
DB 30 DR2..Bit 2
6FC5 197- AA30
6–5
6 Appendix
6.1 Appendix 1
NETWORK 2
03.95
0008 TRANSFER R PARAMETERS TO FLAG AREA
EXAMPLE FB61, JOB 1: WITH M 10 = 10, TRANSFER OF R PARAMETERS R 90, R 91, R
92 (ANZ/NO. = 3) FROM CHANNEL 1 TO THE FLAG AREA
STARTING WITH FY 107. 2 FLAG WORDS ARE ASSIGNED PER R
PARAMETER WITH NUMBER FORMAT ZFPN = FO (R 90, R 91, R
92 --> FY 107-118).
-M10=10
DL 0
+3
RP
NC
+1
+90
+0
F0
0
107
MW
M10=10 = F 106.0
6–6
FB 61
---------------!
NCD-LESE
!
--!LESE
!
--!NSBY
!
--!ANZ
!
--!DTY1
!
--!DTY2
!
--!DTY3
!
--!WER1
!
--!WER2
!
--!WER3
!
--!ZFPN
!
--!DBZI
!
--!DWZI
!
--!TYZI
!
----------------
STATIC SIGNAL M10=10
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
PB12
6 Appendix
6.1 Appendix 1
SPRM-A LAE=115
NETWORK 3
0024
SYM
SHEET 2
TRANSFER ENDED, JOB 1
STATIC M SIGNAL RESET BY THE "DATA TRANSFER ENDED" INTERFACE SIGNAL FOR
JOB 1 (NSBY: DL 0)
-DUE-END1
DUE-END1
M10=10
=
=
NETWORK 4
-M10=10
----------!R
!
!
!
--!S
Q !----------
F
F
50.4
106.0
002E
DATA TRANSFER ENDED NSBY 1
STATIC SIGNAL M 10 = 10
WRITE BIT PATTERN IN R PARAMETER
EXAMPLE FB62, JOB 2:
WITH M 10 = 12, TRANSFER OF FW 120 AS A BIT
PATTERN
(ZFPN = BI) TO R PARAMETER R 89 FOR CHANNEL 1.
FB 62
---------------!
NCD-SCHR
!
--!SCHR
!
--!NSBY
!
--!ANZ
!
--!DTY1
!
--!DTY2
!
--!DTY3
!
--!WER1
!
--!WER2
!
--!WER3
!
--!ZFPN
!
--!DBQU
!
--!DWQU
!
--!TYQU
!
----------------
-M10=12
DR 0
+1
RP
NC
+1
+89
+0
BI
0
120
MW
M10=12
=
NETWORK 5
F
004A
106.1
STATIC SIGNAL M10=12
TRANSFER ENDED, JOB 2
STATIC M SIGNAL RESET BY THE "DATA TRANSFER ENDED" INTERFACE SIGNAL FOR
JOB 2 (NSBY: DR 0)
-DUE-END2
DUE-END2
M10=12
=
=
F
F
-M10=12
----------!R
!
!
!
--!S
Q !---------51.4
106.1
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
DATA TRANSFER ENDED NSBY 2
STATIC SIGNAL M 10 = 12
6FC5 197- AA30
6–7
6 Appendix
6.1 Appendix 1
06.93
PB12
SPRM-A
NETWORK 6
0054
LENGTH=115 SYM
SHEET 3
WRITE DB AREA IN R PARAMETERS
EXAMPLE FB62, JOB 3: WITH M 10 = 89, TRANSFER OF AN AREA OF DB 160 (20
WORDS STARTING WITH DW 10; (QUEL/SOURCE = 160,10,
ANZ/NO. = 10) TO THE R PARAMETERS FOR CHANNEL 1
FROM R 100 TO R 109. 2 WORDS ARE READ PER R
PARAMETER (ZFPN = FO).
DB 160 MUST BE =>30 DW LONG.
-M10=89
DL 1
+20
RP
NC
+1
+100
+0
F0
160
10
DB
M10=89
=
NETWORK 7
F
0070
106.2
FB 62
---------------!
NCD-SCHR
!
--!SCHR
!
--!NSBY
!
--!ANZ
!
--!DTY1
!
--!DTY2
!
--!DTY3
!
--!WER1
!
--!WER2
!
--!WER3
!
--!ZFPN
!
--!DBQU
!
--!DWQU
!
--!TYQU
!
---------------STATIC SIGNAL M10=89
TRANSFER ENDED, JOB 3
STATIC M SIGNAL RESET BY THE "DATA TRANSFER ENDED" INTERFACE SIGNAL FOR
JOB 3 (NSBY: DL 1)
-DUE-END3
DUE-END3 =
M10=89
=
6–8
F
F
-M10=89
----------!R
!
!
!
--!S
Q !---------52.4
106.2
DATA TRANSFER ENDED NSBY 3
STATIC SIGNAL M10=89
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6 Appendix
6.1 Appendix 1
NETWORK 8
SELECT PROGRAM NO. FROM PLC
EXAMPLE FB62:
SELECT A PROGRAM FROM THE PLC THE PROGRAM NUMBER IS
PRESELECTED WITH A DECADE SWITCH AND TRANSFERRED TO
NC CHANNEL 2 WITH THE TRANSFER KEYS (VALUE 1 = 2).
NUMBER FORMAT ZFPN = B0, I.E. 3 WORDS ARE READ (FW 180,
182, 184).
007A
007C
007E
0080
0082
0084
:L
:T
:T
:L
:T
:***
PRG-NR = IW 5
NETWORK 9
KB0
FW180
FW182
- PRG-NR
FW184
IW5
PROGRAM NUMBER
0086
SELECT PROGRAM NO. FROM PLC
-UEBERN.
DR 1
+1
IN
IT
SP
+1
+1
+1
B0
0
180
MW
UEBERN. = I 4.3
NETWORK 10
FB 62
---------------!
NCD-SCHR
!
--!SCHR
!
--!NSBY
!
--!ANZ
!
--!DTY1
!
--!DTY2
!
--!DTY3
!
--!WER1
!
--!WER2
!
--!WER3
!
--!ZFPN
!
--!DBQU
!
--!DWQU
!
--!TYQU
!
----------------
TRANSFER KEY
READ ACTUAL VALUE AXIS 2
EXAMPLE FB61:
00A2
00A4
00A6
00A8
00AA
00AC
AUXILIARY FLAG
AUXILIARY FLAG
DECADE SWITCH, 4 DECADES
AUXILIARY FLAG
:A
:AN
:S
:S
:A
:***
IST-LESE = I 4.4
READ WORKPIECE-ORIENTED ACTUAL VALUE AXIS 2
READ THE WORKPIECE-ORIENTED ACTUAL VALUE FOR
AXIS 2 AND STORE IN DB 160 STARTING WITH DW 1 AS A
BCD VALUE WITH 3 DECIMAL DIGITS. 3 DATA WORDS
ARE ASSIGNED (ZFPN = B4).
- IST-LESE I 4.4
F 220.0
F 220.1
F 220.0
F 220.1
AUXILIARY FLAG
COMMAND READ ACTUAL VALUE
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
INITIATE: READ ACTUAL VALUE
AUXILIARY FLAG EDGE
AUXILIARY FLAG
6FC5 197- AA30
6–9
6 Appendix
6.1 Appendix 1
06.93
NETWORK 11
00B0
TRANSFER ACTUAL VALUE TO DB 160
FB 61
---------------!
NCD-LESE
!
--!LESE
!
--!NSBY
!
--!ANZ
!
--!DTY1
!
--!DTY2
!
--!DTY3
!
--!WER1
!
--!WER2
!
--!WER3
!
--!ZFPN
!
--!DBZI
!
--!DWZI
!
--!TYZI
!
----------------
-EINS
DL 2
+1
AC
PW
+2
+0
+0
B4
160
1
DB
EINS = F 0.1 ONE FLAG
NETWORK 12
00CA
00CC
00CE
00D0
00D2
00CC
:A
:R
:AN
:R
:***
DUE-ENDS =
IST-LESE =
F
I
NETWORK 13
DATA TRANSFER ENDED, JOB 5
DUE-ENDS F54.4
F 220.1
F IST-LESE I4.4
F 220.0
DATA TRANSFER ENDED
AUXILIARY FLAG EDGE
54.4
4.4
DATA TRANSFER ENDED NSBY 5
COMMAND READ ACTUAL VALUE
ACKNOWLEDGE STATIC M SIGNALS
IN ORDER TO ACKNOWLEDGE THE STATIC M SIGNALS WITH WHICH THE
TRANSFER OPERATIONS ARE INITIATED AT THE INTERFACE AS WELL, THE
FLAG AREA IN WHICH THE SIGNALS WERE STORED FOR PROCESSING
MUST BE WRITTEN BACK IN DB 30 (DECODED M SIGNALS).
00D4
00D6
00D8
00DA
DB-M-SIG
6–10
:C
:L
:T
:BE
=
- DB-M-SIG DB30
FW105
DW1
DB
30
DATA BLOCK DECODED M SIGNALS
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6 Appendix
6.1 Appendix 1
PB14
SPRM-A
NETWORK 1
0000
LENGTH=12
SYM
SHEET 1
DIRECTION KEYS (840C M Version) -->DB32
TRANSFER DIRECTION KEY SIGNALS (840 M) TO THE AXIS-SPECIFIC INTERFACE (DB
32) DEPENDING ON THE POSITION OF THE AXIS SELECTOR SWITCH POSITION. THE
SIGNALS FOR 3 AXES ARE TRANSFERRED (NRAZ = 1,3).
FB 79
---------------!
T:MS>ACH
!
--!AWS1
F
!-- -AWS-FEHL
--!AWS2
! :BE
--!NRAZ
!
----------------
EB 65
EB 0
1,3
AWS-FEHL
=
Q
4.1
PB15
SPRM-A
NETWORK 1
0000
AXIS SELECTOR SWITCH FAULTY (840 M)
LENGTH=13
SYM
SHEET 1
DIRECTION KEYS (840C T Version) --> DB32
TRANSFER DIRECTION KEY SIGNALS TO THE AXIS-SPECIFIC INTERFACE (DB 32). THE
SIGNALS FOR 6 AXES ARE TRANSFERRED.
EB 65
EB 0
1,4
2,5
3,6
GRUNDBL =
IB
FB 67
---------------!
T:MS>ACH
!
--!GBL
!
--!DSBL
!
--!XG/D
!
--!ZG/D
!
--!CG/D
!
----------------
64
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
:BE
INPUT BYTE BASIC KEY GROUP
6FC5 197- AA30
6–11
6 Appendix
6.1 Appendix 1
06.93
PB16
SPRM-A
LENGTH=46
NETWORK 1
INTERFACE SIGNALS IN F AREA
SYM
SHEET 1
TO DETERMINE THE ERROR AND OPERATIONAL MESSAGES FOR THE EXAMPLE
DESCRIBED BELOW, THE FOLLOWING PLC MACHINE DATA HAVE TO BE SET:
DB58, DL3, BIT 0-7 FOR ERROR MESSAGES:
--> MD6036 = 0001 0001
MESSAGE NUMBERS: 9032 - 9039
DB58, DL6, BIT 0-7 FOR ERROR MESSAGES:
--> MD6045 = 0000 0100
MESSAGE NUMBERS: 9080 - 9087
DB10, DR9, BIT 0-7 FOR ERROR MESSAGES:
--> MD6032 = 1000 0000
MESSAGE NUMBERS: 6056 - 6063
EMERGENCY STOP MESSAGES ARE ACKNOWLEDGED WITH "RESET", PLC ERROR
MESSAGES WITH "ACKNOWLEDGE ALARM", IN BOTH CASES ON CONDITION THAT
THE CAUSE OF THE ERROR HAS BEEN RECTIFIED.
0000
0002
0004
0006
0008
000A
000C
000E
0010
:C
:L
:T
:C
:L
:T
:L
:T
:***
STEUERSI
DB-MELD
DB-BEDIE
=
=
=
NETWORK 2
DB-MELD DB58
DW0
- STEUERSI FW145
- DB-BEDIE DB40
DR1
FY144
DL4
FY 147
INTERFACE --> FLAG AREA
CONTROL SIGNALS/STATES
STAT. SIGNALS KEYS GROUP B
-FREELY ASSIGNABLE
DYN. SIGNALS KEYS GROUP G
-INDIVIDUAL FUNCTIONS
FW145
CONTROL SIGNALS FOR DISPLAY MESSAGES
DB
DB
DATA BLOCK PLC MESSAGES
DATA BLOCK OPERATOR PANEL SIGNALS
58
40
0012
ACKNOWLEDGE NC EMERGENCY STOP
-----T-RESET---! & !-- -NC-QUIT
----T-RESET
NC-QUIT
=
=
I 67.7
F 145.7
NETWORK 3
RESET KEY
ACKNOWLEDGE NC EMERGENCY STOP
0018
ACKNOWLEDGE PLC ALARM
-----T-FMQUIT---! & !-- -FM-QUIT
----T-FMQUIT
FM-QUIT
6–12
=
=
F 147.2
F 145.1
ACKNOWLEDGE ERROR MESSAGE KEY
ACKNOWLEDGE PLC ERROR MESSAGES
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6 Appendix
6.1 Appendix 1
NETWORK 4
DISPLAYS IN MESSAGE LINE
001E
0020
0022
0024
:A
:S
:S
:***
EINS
ANZ-BM
ANZ-FM
=
=
=
- EINS
- ANZ-BM
- ANZ-FM
F 0.1
F 145.4
F 145.5
NETWORK 5
F 0.1
F 145.4 DISPLAY OPERATIONAL MESSAGES
F 145.5 DISPLAY ERROR MESSAGES
ONE FLAG
DISPLAY OPERATIONAL MESSAGES IN MESSAGE LINE
DISPLAY ERROR MESSAGES IN MESSAGE LINE
SIMULATION MESSAGES
0026
0028
002A
002C
002E
0030
0032
0034
0036
:A
:=
:A
:=
:A
:=
:A
:=
:***
TASTE 1
MELD9004
TASTE 2
MELD9032
TASTE 3
MELD9080
TASTE 4
MELD6056
=
=
=
=
=
=
=
=
NETWORK 6
-
TASTE 1
MELD9004
TASTE 2
MELD9032
TASTE 3
MELD9080
TASTE 4
MELD6056
F 144.7
F 148.4
F 144.6
F 149.0
F 144.5
F 150.0
F 144.4
F 151.0
F 144.7
F 148.4
F 144.6
F 149.0
F 144.5
F 150.0
F 144.4
F 151.0
SIMULATION EMERGENCY STOP
AS MESSAGE 9004
SIMULATION PLC ERROR MESSAGE
AS MESSAGE 9032
SIMULATION PLC OPERAT. MESS.
AS MESSAGE 9080
SIMULATION READ-IN DISABLE
AS MESSAGE 6056
KEY 1: SIMULATION EMERGENCY STOP
MESSAGE 9004 EMERGENCY STOP
KEY 2: SIMULATION PLC ERROR MESSAGE
MESSAGE 9032 PLC ERROR MESSAGE
KEY 3: SIMULATION PLC OPERATIONAL MESS.
MESSAGE 9080 PLC OPERATIONAL MESSAGE
SIMULATION ERROR MESSAGE CHANNEL 1
MESSAGE 6056 READ-IN DISABLE CHANNEL 1
TRANSFER F AREA -> DB MESSAGES
0038
003A
003C
003E
0040
0042
0044
0046
:C
:L
:T
:L
:T
:L
:T
:L
- DB-MELD
- NOT-AUS
DL1
- FM-PLC
DL3
- BM-PLC
DL6
- STEUERSI
0048
004A
004C
004E
0050
:T
:C
:L
:T
:BE
DW0
- DB-K 1
DB10
- FM-KANAL FY151
DR9
STEUERSI
NOT-AUS
FM-PLC
BM-PLC
FM-KANAL
=
=
=
=
=
FW 145
FY 148
FY 149
FY 150
FY 151
CONTROL SIGNALS FOR DISPLAY MESSAGES
EMERGENCY STOP MESSAGES
PLC ERROR MESSAGE
PLC OPERATIONAL MESSAGE
ERROR MESSAGES CHANNEL 1
DB-MELD
DB-K 1
=
=
DB 58
DB 10
DATA BLOCK PLC MESSAGES
DB CHANNEL 1
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
DB58
FY148
DB MESSAGES
EMERGENCY STOP MESSAGES TO NC
FY149
ERROR MESSAGES
FY150
OPERATIONAL MESSAGES
FW145 CONTROL SIGNALS FOR DISPLAY
MESSAGES
6FC5 197- AA30
DB CHANNEL 1
ERROR MESSAGES CHANNEL 1
6–13
6 Appendix
6.1 Appendix 1
06.93
PB18
SPRM-A
NETWORK 1
0000
LENGTH=52 SYM
SHEET 1
START SEQUENCE CASCADE AUTOMATIC
CAUTION: THE SIGNAL "-STARTAK" IS RESET EITHER IN THE LAST STEP OR BY
THE SIGNAL "-STO".
-----STARTAK
-M41-DYN.---!>=1!
-------M42-DYN.---!
!----!
!
----!S
!
!
!
--!R
Q!------M41-DYN.
M42-DYN.
STARTAK
=
=
=
NETWORK 2
F 37.1
F 37.2
F 125.1
000C
DYNAMIC SIGNAL M 41
DYNAMIC SIGNAL M 42
START SEQUENCE CASCADE
RESET SEQUENCE CASCADE AUTOMATIC
-----STARTAK --0! & !
-----T-RESET ---!
!-----!>=1!
----!
!
-GRUNDST ---!
!-- -RESETAK
----STARTAK
T-RESET
GRUNDST
RESETAK
=
=
=
=
NETWORK 3
F 125.1
I 67.7
F 2.1
F 124.7
0016
START SEQUENCE CASCADE
RESET KEY
NC INITIAL STATE
RESET SEQUENCE CASCADE
CALL SEQUENCE CASCADE AUTOMATIC
FB 94
---------------!
ALS:AUT
!
+150
--!SB
SANZ!--STARTAK --!STA
S+AK!--RESETAK --!R
STO !--EINS
--!SAN
SSTO!--NULL
--!ANZ+
!
-EINS
--!DIAG
!
-QIT
--!QIT
!
-UQIT
--!UQIT
!
---------------STARTAK
RESETAK
EINS
NULL
QIT
UQIT
SANZ
S+AK
STO
SSTO
6–14
=
=
=
=
=
=
=
=
=
=
F
F
F
F
I
I
QW
Q
Q
Q
125.1
124.7
0.1
0.0
7.4
7.5
8
6.0
6.1
6.2
-SANZ
-S+AK
-STO
-SSTO
START SEQUENCE CASCADE
RESET SEQUENCE CASCADE
ONE FLAG
ZERO FLAG
ACKNOWLEDGE A FAULT (CONDITIONAL)
ACKNOWLEDGE A FAULT (UNCONDITIONAL)
OUTPUT OF THE STEP NO.
SEVERAL STEPS ALTIVE SIMULTANEOUSLY
FAULT IN THE CASCADE
STEP WITH FAULT
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
PB18
6 Appendix
6.1 Appendix 1
SPRM-A
NETWORK 4
LENGTH=52
002A
SYM
FEEDBACK GEAR CHANGED
-----BEF-UMR ---! & !
-ES-GETR.---!
!-- -RM-UMR
----BEF-UMR =
ES-GETR. =
RM-UMR =
F 125.2
I 4.7
F 125.7
NETWORK 5
0032
RESET STARTAK
-STARTAK
--------!R
!
!
!
--!S
Q!-------
-STO
STO
=
STARTAK =
Q 6.1
F 125.1
NETWORK 6
003C
FAULT IN THE CASCADE
START SEQUENCE CASCADE
OUTPUT ERROR RUNNING TIME
-------! & !-- -FLFZ-A
-----
-STO
STO
FLFZ-A
COMMAND FROM SEQUENCE CASCADE: CHANGE GEAR
LIMIT SWITCH GEAR CHANGED
FEEDBACK GEAR CHANGED
=
=
Q 6.1
Q 5.7
NETWORK 7
FAULT IN THE CASCADE
MESSAGE ERROR RUNNING TIME SEQUENCE CASCADE
TRANSFER SIGNALS TO INTERFACE
0042
004A
004C
004E
:C
:L
:T
:A
- DB-K 1 DB10
DL6
FY224
- VORSPER F127.0
0050
0052
0054
0056
0058
005A
:=
:L
:T
:L
:T
:A
F 224.0
FY224
DL6
DL9
FY224
- EINLSPER F 126.0
005C
005E
0060
0062
:=
:L
:T
:BE
VORSPER
EINL.SPER
=
=
F 127.0
F 126.0
FEED DISABLE
READ-IN DISABLE
DB-K 1
=
DB 10
DATA BLOCK CHANNEL 1
FEED DISABLE FROM SEQUENCE
CASCADE
READ-IN DISABLE SIGNALS
READ-IN DISABLE FROM SEQUENCE
CASCADE
F 224.0
FY224
DL9
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
DATA BLOCK FOR CHANNEL 1
GENERAL FEED DISABLE SIGNALS
6FC5 197- AA30
6–15
6 Appendix
6.1 Appendix 1
SB150
06.93
SPRM-A
LIB=15050
LENGTH=162
SYM
SEQUENCE CONTROL - SEQUENCE IDENTIFICATION
-------------------------------------------------------------------------------SEQUENCE BLOCK NO.:
SB 150
DATA BLOCK NO. :
DB 150
ASSIGNED FLAG AREA:
F 230.0
- F 255.7
TIMER BASIS :
T 4
- T-WARTE WAITING TIME
FIXED ALLOCATION :
T 0
, Z 0
TIMER RANGE:
T 4
- T 5
6–16
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
SB150
6 Appendix
6.1 Appendix 1
SPRM-A
LIB=15050
LENGTH=162
!
!
!
!
! T6
!---+
S==!===
!S 1 !
===!===
!
?+ T1
!
S--+--+
!S 2 !
+--+--+
!
+ T2
!
!
!
!
!
! T8
!---+
S--+--+
!S 3 !
+--+--+
!---------+
?+ T3
+ T7
S--+--+
V
!S 4 !
S 5
+--+--+
!---------+
+ T4
+ T8
!
!
!
V
!
S 3
!
!
! T7
!---+
!
!
!
!!T6
!
!
! S1
!
!
!!T1
!
!
! S2
!
!
!!T2
!
!
!
!
!
!!T8
!
!
! S3
!
!
!!T3
!!17
! S4
! S5
!
!!T4
!!T8
!
!
! S3
!
!!T7
!
! S5
!S 5 !
+--+--+
!
+ 75
!
S--+--+
!S 6 !
+--+--+
!
?+ T6
!
V
S 1
!
!
!!T5
!
!
! S6
!
!
!!T6
!
!
! S1
!
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
SYM
:
: RESET OUTPUTS
: ...
: BRAKE SPINDLE
: SPINDLE STOPPED
: GEAR NOT CHANGED
: REV. DIRECT. OF ROTATION
:
: GEAR CHANGED
: ORIG. DIRECT. OF ROTATION
: ACCELERATE SPINDLE
: GEAR CHANGED
: GEAR NOT CHANGED
: REV. DIRECT. OF ROTATION
: GEAR CHANGED
: ACCELERATE SPINDLE
: SPINDLE IN SET RANGE
: END OF GEAR CHANGE
:
: RESET OUTPUTS
6–17
6 Appendix
6.1 Appendix 1
06.93
SB150
SPRM-A
!!T1
!!T2
!!T3
!!T4
!!T5
!!T6
!!T7
!!T8
...
SPINDLE STOPPED
:
:
:
:
:
:
:
:
LIB=15050
LENGTH=162
SYM
LENGTH=162
SYM
GEAR MESHED
SPINDLE IN SET RANGE
GEAR MESHED
GEAR NOT MESHED
SB150
SPRM-A
! S1
! S2
! S3
! S4
! S5
! S6
RESET OUTPUTS
BRAKE SPINDLE
REVERSE DIRECTION OF ROTATION
ORIGINAL DIRECTION OF ROTATION
ACCELERATE SPINDLE
END OF GEAR CHANGE
:
:
:
:
:
:
SB150
SPRM-A
TRANSITION 1/1
0000
LIB=15050
LIB=15050
LENGTH=162
SHEET 4
TUE : KT 100.1
TUE :
TUE :
TUE : KT 100.1
TUE :
SYM
TWA :
TWA : KT 100.0
TWA : KT 100.0
TWA : KT 20.0
TWA :
SHEET 5
...
: BE
==============================================================
TRANSITION 2/1
0000
0002
S=0
: A
: BE
=
SPINDLE STOPPED
- S=0
F
60.3
F 60.3
SPINDLE STOPPED
SIGNAL SPINDLE STOPPED
==============================================================
TRANSITION 3/1
0000
: BE
==============================================================
6–18
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6 Appendix
6.1 Appendix 1
TRANSITION 4/1
0000
0002
GEAR CHANGED
: A
: BE
RM-UMR
=
- RM-UMR
F
F 125.7
125.7
FEEDBACK GEAR MESHED
FEEDBACK GEAR MESHED
==============================================================
TRANSITION 5/1
0000
0002
: A
: BE
S=SOLL
=
SPINDLE IN SET RANGE
- S=SOLL
F 60.5
F 60.5
SPINDLE IN SET RANGE
SPINDLE IN SET RANGE
==============================================================
TRANSITION 6/1
0000
: BE
==============================================================
TRANSITION 7/1
0000
0002
: A
: BE
RM-UMR
=
GEAR MESHED
- RM-UMR
F 125.7
F 125.7
FEEDBACK GEAR MESHED
==============================================================
TRANSITION 8/1
0000
0002
: AN
: BE
RM-UMR
=
GEAR NOT MESHED
- RM-UMR
F 125.7
F 125.7
FEEDBACK GEAR MESHED
FEEDBACK GEAR MESHED
==============================================================
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
6–19
6 Appendix
6.1 Appendix 1
SB150
06.93
SPRM-A
STEP 1/1
LENGTH=162
SYM
RESET OUTPUTS
0000
0004
0006
0008
000A
000C
000E
0010
0012
0014
GETR-UM
PLC-SPIN
PENDEL
SOLL-RE
SPINSPER
BEF-UMR
LIB=15050
:A
:R
:R
:R
:R
:R
:R
:R
:R
:BE
-
F 233.0
GETR-UM
PLC-SPIN
PENDEL
SOLL-RE
SPINSPER
BEF-UMR
EINLSPER
VORSPER
=
=
=
=
=
=
F
F
F
F
F
F
61.7
65.0
65.6
65.7
66.0
125.2
EINLSPER =
VORSPER =
F
F
126.0
127.0
F 61.7
F 65.0
F 65.6
F 65.7
F 66.0
F 125.2
F 126.0
F 127.0
CHANGE GEAR
PLC SPINDLE CONTROL
OSCILLATION SPEED
SET DIRECTION OF ROTATION CW
SPINDLE DISABLE
CHANGE GEAR COMMAND
READ-IN DISABLE
FEED DISABLE
CHANGE GEAR SIGNAL FROM NC
PLC SPINDLE CONTROL
OSCILLATION SPEED
SET DIRECTION OF ROTATION CW
SPINDLE DISABLE
COMMAND FROM SEQUENCE CASCADE: MESH
GEAR
READ-IN DISABLE
FEED DISABLE
==============================================================
STEP 2/1
0000
0002
0004
0006
0008
000A
PLC-SPIN
SPINSPER
EINLSPER
VORSPER
BRAKE SPINDLE
:A
:S
:S
:S
:S
:BE
=
=
=
=
F
F
F
F
F 233.0
PLC-SPIN
SPINSPER
EINLSPER
VORSPER
F 65.0
F 66.0
F 126.0
F 127.0
65.0
66.0
126.0
127.0
PLC SPINDLE CONTROL
SPINDLE DISABLE
READ-IN DISABLE
FEED DISABLE
TUE : KT 100.1
PLC SPINDLE CONTROL
SPINDLE DISABLE
READ-IN DISABLE
FEED DISABLE
TWA:
==============================================================
6–20
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6 Appendix
6.1 Appendix 1
STEP 3/1
REVERSE DIRECTION OF ROTATION
0000
0002
0004
0006
0008
000A
:A
:R
:S
:S
:S
:BE
SPINSPER
SOLL-RE
PENDEL
BEF-UMR
=
=
=
=
F
F
F
F
F 233.0
SPINSPER
SOLL-RE
PENDEL
BEF-UMR
66.0
65.7
65.6
125.2
F 66.0
F 65.7
F 65.6
F 125.
SPINDLE DISABLE
SET DIRECTION OF ROTATION CW
SELECT OSCILLATION SPEED
MESH GEAR COMMAND
SPINDLE DISABLE
SET DIRECTION OF ROTATION CW
OSCILLATION SPEED
COMMAND FROM SEQUENCE CASCADE:
MESH GEAR
TUE :
TWA : KT 100.0
==============================================================
STEP 4/1
ORIGINAL DIRECTION OF ROTATION
0000
0002
0004
SOLL-RE
:A
:R
:DO
=
F 233.0
- SOLL-RE
F
F 65.7
65.7
SET DIRECTION OF ROTATION CW
SET DIRECTION OF ROTATION CW
TUE :
TWA : KT 100.0
==============================================================
STEP 5/1
ACCELERATE SPINDLE
0000
0002
0004
0006
0008
000A
000C
PENDEL
GETR-UM
PLC-SPIN
SOLL-RE
BEF-UMR
:A
:R
:R
:R
:S
:R
:BE
=
=
=
=
=
F
F
F
F
F
TUE :
F 233.0
PENDEL
GETR-UM
PLC-SPIN
SOLL-RE
BEF-UMR
65.6
61.7
65.0
65.7
125.2
F 65.6
F 61.7
F 65.0
F 65.7
F 125.2
OSCILLATION SPEED
MESH GEAR
PLC SPINDLE CONTROL
SET DIRECTION OF ROTATION CW
MESH GEAR COMMAND
OSCILLATION SPEED
MESH GEAR SIGNAL FROM NC
PLC SPINDLE CONTROL
SET DIRECTION OF ROTATION CW
COMMAND FROM SEQUENCE CASCADE:
MESH GEAR
KT 100.1
TWA : KT 20.0
==============================================================
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
6–21
6 Appendix
6.1 Appendix 1
06.93
STEP 6/1
END OF GEAR CHANGE
0000
0002
0004
0006
0008
000A
000C
000E
0010
:A
:R
:R
:R
:R
:R
:R
:R
:BE
EINLSPER
VORSPER
BEF-UMR
PLC-SPIN
PENDEL
SPINSPER
STARTAK
=
=
=
=
=
=
=
-
F
F
F
F
F
F
F
F 233.0
EINLSPER
VORSPER
BEF-UMR
PLC-SPIN
PENDEL
SPINSPER
STARTAK
F 126.0
F 127.0
F 125.2
F 65.0
F 65.6
F 66.0
F 125.1
126.0
127.0
125.2
65.0
65.6
66.0
125.1
READ-IN DISABLE
FEED DISABLE
MESH GEAR COMMAND
PLC SPINDLE CONTROL
OSCILLATION SPEED
SPINDLE DISABLE
START SEQUENCE CASCADE
TUE :
READ-IN DISABLE
FEED DISABLE
MESH GEAR COMMAND
PLC SPINDLE CONTROL
OSCILLATION SPEED
SPINDLE DISABLE
START SEQUENCE CASCADE
RESET
TWA :
==============================================================
PB19
NETWORK 1
SPRM-A
LENGTH=19
ABS
COPY FLAG AREA -> DB CHANNEL 1
WRITE BACK THE FLAG AREA STARTING WITH FY 25 IN THE CHANNEL-SPECIFIC
INTERFACE DB 10 STARTING WITH DW 17. 7 WORDS ARE TRANSFERRED.
(FY 25-38 --> DW 17-23).
F
7,25
D
10,17
NETWORK 2
FB 71
-------------! T:EAM>NS
!
--!QUTY
!
--!AN/Q
!
--!ZITY
!
--!ZIAD
!
--------------
COPY FLAG AREA -> DB SPINDLE
WRITE BACK THE FLAG AREA STARTING WITH FY 60 IN THE SPINDLE-SPECIFIC
INTERFACE DB 31. 4 WORDS ARE TRANSFERRED (SPINDLE 1).
(FY 60-67 --> DW 0-3).
F
4,60
S
0,1
6–22
FB 71
-------------!
T:EAM>NS !
--!QUTY
! :BE
--!AN/Q
!
--!ZITY
!
--!ZIAD
!
--------------
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6.2
6 Appendix
6.2 Appendix 2
Appendix 2
PB 21
A:P00855ST.S5D
NETWORK 1
0000
LEN=36
SHEET 1
START SEQUENCE CASCADE V/R GRAPH 5
PROGRAM PB21 PROCESSES SEQUENCE CASCADE ”DEPOSIT TOOL” WITH FB 93 (ALS: V/R).
PB21 MUST BE CALLED IN OB1. THE OTHER PROGRAM BLOCKS IN OB1 ARE NOT
ABSOLUTELY NECESSARY TO RUN THE EXAMPLE.
CAUTION: THE START SIGNAL ”-WZA” IS RESET EITHER IN THE LAST STEP OR BY THE
SIGNAL ”-R”.
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
000A
000B
000C
000D
000E
000F
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
001A
001B
001C
001D
001E
NAME
SB
H/A
STA
R
SAN
ANZ+
DIAG
QIT
UQIT
S-NR
S-AZ
SST+
SSTTIP+
TIPSANZ
S+AK
STO
SSTO
VKE
STR
TIPB
TIP
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
A
S
JU
ALS:
A
R
BE
I
F
FB
V/R
KF
I
F
I
I
I
I
I
I
IW
I
I
I
I
I
QW
Q
Q
Q
Q
Q
Q
Q
6.0
130.0
93
+170
6.7
130.0
6.6
7.1
7.2
7.3
7.4
7.5
11
7.6
6.2
6.3
6.4
6.5
8
6.0
6.1
6.2
7.0
7.1
7.2
7.3
I
F
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6.6
130.0
-ST-ABLK
-WZA
START OF THE SEQUENCE CASCADE
DEPOSIT TOOL
-HAND/AUT
-WZA
-R
-SAN
-ANZ+
-DIAG
-QIT
-UQIT
-S-NR
-S-AZ
-SST+
-SST-TIP+
-TIP-SANZ
-S+AK
-STO
-SSTO
-VKE-AUSG
-STR
-TIPB
-TIP
MANUAL/AUTOMATIC
DEPOSIT TOOL
RESET
SEQUENCE DISPLAY
STEP ON SEQUENCE DISPLAY
DIAGNOSTIC FUNCTION
ACKNOWLEDGE A FAULT (COND.)
ACKNOWLEDGE A FAULT (UNCOND.)
STEP NUMBER
STEP SELECTION
CONTROL FORWARDS
CONTROL BACKWARDS
JOG FORWARDS
JOG BACKWARDS
OUTPUT OF THE STEP NUMBER
SEVERAL STEPS ACTIVE SIMULT.
FAULT IN THE CASCADE
STEP WITH FAULT
RLO OF THE CURRENT TRANSITION
CONTROL BACKWARDS
JOG MODE
JOG SIGNAL
-R
-WZA
RESET THE START SIGNAL
6FC5 197- AA30
6–23
6 Appendix
6.2 Appendix 2
06.93
SB 170
I
F
I
I
I
I
I
I
I
IW
I
I
I
I
I
QW
Q
Q
Q
Q
Q
Q
Q
6–24
A:P00855ST.S5D
6.0
130.0
6.7
6.6
7.1
7.2
7.3
7.4
7.5
11
7.6
6.2
6.3
6.4
6.5
8
6.0
6.1
6.2
7.0
7.1
7.2
7.3
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
ST-ABLK
WZA
HAND/AUT
R
SAN
ANZ+
DIAG
QIT
UQIT
S-NR
S-AZ
SST+
SSTTIP+
TIPSANZ
S+AK
STO
SSTO
VKE-AUSG
STR
TIPB
TIP
LEN=257
SHEET 2
START OF SEQUENCE CASCADE
DEPOSIT TOOL
MANUAL/AUTOMATIC
RESET
SEQUENCE DISPLAY
STEP ON SEQUENCE DISPLAY
DIAGNOSTIC FUNCTION
ACKNOWLEDGE A FAULT (COND.)
ACKNOWLEDGE A FAULT (UNCOND.)
STEP NUMBER
STEP SELECTION
CONTROL FORWARDS
CONTROL BACKWARDS
JOG FORWARDS
JOG BACKWARDS
OUTPUT OF THE STEP NUMBER
SEVERAL STEPS ACTIVE SIMULTANEOUSLY
FAULT IN THE CASCADE
STEP WITH FAULT
RLO OUTPUT
CONTROL BACKWARDS
JOG MODE
JOG
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6 Appendix
6.2 Appendix 2
SB 170
A:P00855ST.S5D
LEN=257
SHEET 2
SEQUENCE CONTROL - SEQUENCE IDENTIFICATION
FB SELECTION
:
FB 70/71 FOR LINEAR/SIMULTANEOUS SEQUENCE: COMFORT VERSION
SEQUENCE BLOCK NO.
:
SB 170
ASSIGNED DATA BLOCK
:
DB 170
TIMER BASIS
:
T1
ASS. TIMER RANGE
:
T1
ASS. FLAG AREA
:
F 200.0 - F 255.7
ASS. TIMER, COUNTER :
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
-
T2
T 0, Z 0
6–25
6 Appendix
6.2 Appendix 2
06.93
SB 170
!
! T8
!---+
!
! T7
!---+
S=!===
?!S 1 !
==!===
!
+ T1
!
!
!
!
!
! T9
!---+
S--+--+
!S 2 !
+--+--+
!---------+
+ T2
+ T8
!
!
!
V
!
S 1
!
!
! T10
!---+
S--+--+
!S 3 !
+--+--+
!---------+
+ T3
+ T9
!
!
!
V
! T15
S 2
!---+
!
! T11
!---+
S--+--+
!S 4 !
+--+--+
!---------+---------+
+ T4
+ T10
+T14
!
!
!
!
V
V
!
S 3
S 6
!
!
! T12
!---+
S--+--+
!S 5 !
+--+--+
!---------+
+ T5
+ T11
!
!
!
V
! T14
S 4
6–26
A:P00855ST.S5D
!!T8
!
!
!!T7
!
!
! S1
!
!
!!T1
!
!
!
!
!
!!T9
!
!
! S2
!
!
!!T2
!!T8
!
!
! S1
!
!!T10
!
!
! S3
!
!
!!T3
!!T9
!
!!T15
! S2
!
!!T11
!
!
! S4
!
!
!!T4
!!T10
!!T14
!
! S3
! S6
!!T12
!
!
! S5
!
!
!!T5
!!T11
!
!!T14
! S4
LEN=257
SHEET 3
: CONTROL & FEEDBACK VERTICAL
: CONTROL FORWARDS
: INIT-STEP
: START CONDITION
: CONTROL & FEEDBACK FORWARDS
: GRIPPER 90° CLOCKWISE
: CONTROL FORWARDS
: CONTROL & FEEDBACK VERTICAL
: INIT-STEP
: CONTROL
: GRIPPER BACK
: CONTROL FORWARDS
: CONTROL & FEEDBACK FORWARDS
: BACKWARD JUMP TO STEP 4
: GRIPPER 90° CLOCKWISE
: CONTROL
: CLAMP SPINDLE
: CONTROL FORWARDS
: CONTROL
: FORWARD JUMP TO STEP 6
: GRIPPER BACK
: RELEASE GRIPPER
: CONTROL
: RESTORE MAGAZINE DATA
: CONTROL FORWARDS
: CONTROL
: FORWARD JUMP TO STEP 6
: CLAMP SPINDLE
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6 Appendix
6.2 Appendix 2
SB 170
A:P00855ST.S5D
!
! T13
!---+
S--+--+
!S 6 !
+--+--+
!---------+---------+
+ T6
+ T12
+T15
!
!
!
S--+--+
V
V
!S 7 !
S 5
S 4
+--+--+
!---------+
+ T7
+ T13
!
!
V
V
S 1
S 6
!!T13
!
!
! S6
!
!
!!T6
!!T12
!!T15
! S7
! S5
! S4
!!T7
!!T13
!
! S1
! S6
SB 170
!!T1
!!T2
!!T3
!!T4
!!T5
!!T6
!!T7
!!T8
!!T9
!!T10
!!T11
!!T12
!!T13
!!T14
!!T15
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
: CONTROL BACKWARDS
: RELEASE GRIPPER
:
:
:
:
:
:
:
:
CONTROL FORWARDS
CONTROL
BACKWARD JUMP TO STEP 4
GRIPPER 90° COUNTERCLOCKWISE
RESTORE MAGAZINE DATA
CLAMP SPINDLE
CONTROL FORWARDS
CONTROL BACKWARDS
: INIT-STEP
: RELEASE GRIPPER
A:P00855ST.S5D
LEN=257
SHEET 5
START CONDITION
CONTROL FORWARDS
CONTROL FORWARDS
CONTROL FORWARDS
CONTROL FORWARDS
CONTROL FORWARDS
CONTROL FORWARDS
CONTROL AND FEEDBACK VERTICAL
CONTROL AND FEEDBACK FORWARD
CONTROL
CONTROL
CONTROL
CONTROL BACKWARDS
FORWARD JUMP TO STEP 6
BACKWARD JUMP TO STEP 4
SB 170
! S1
! S2
! S3
! S4
! S5
! S6
! S7
LEN=257
SHEET 4
A:P00855ST.S5D
INIT-STEP
GRIPPER 90° CLOCKWISE
GRIPPER BACK
CLAMP SPINDLE
RESTORE MAGAZINE DATA
RELEASE GRIPPER
GRIPPER 90° COUNTERCLOCKWISE
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
TUE :
TUE :
TUE :
TUE :
TUE :
TUE :
LEN=257
SHEET 6
TWA : KT 100.0
TWA : KT 100.0
TWA : KT 100.0
TWA : KT 100.0
TWA : KT 100.0
TWA : KT 100.0
6–27
6 Appendix
6.2 Appendix 2
06.93
SB 170
A:P00855ST.S5D
TRANSITION 1/1
0034
: A
I
0035
: AN Q
0036
: BE
I
Q
7.0 =
7.1 =
0034
7.0
7.1
STARTBED
STR
LEN=257
SHEET 7
START CONDITION
-STARTBED
START CONDITIONS FULFILLED?
-STR
CONTROL FORWARDS?
START CONDITIONS
CONTROL BACKWARDS
===========================================================================
TRANSITION 2/1
0041
: AN Q
0042
: A
I
0043
: BE
Q
I
7.1 =
8.0 =
0041
7.1
8.0
STR
RM-WAAGR
CONTROL FORWARDS
-STR
CONTROL FORWARDS?
-RM-WAAGR
FEEDBACK GRIPPER HORIZONTAL?
CONTROL BACKWARDS
FEEDBACK GRIPPER HORIZONTAL
===========================================================================
TRANSITION 3/1
004E
: AN Q
004F
: A
I
0050
: BE
Q
I
7.1 =
8.2 =
004E
7.1
8.2
STR
RM-HINT
CONTROL FORWARDS
-STR
CONTROL FORWARDS?
-RM-HINT
FEÈDBACK GRIPPER BEHIND?
CONTROL BACKWARDS
FEÈDBACK GRIPPER BEHIND
===========================================================================
TRANSITION 4/1
005B
005C
005D
005E
005F
Q
I
I
F
7.1
8.4
8.5
133.0
:
:
:
:
:
=
=
=
=
AN
A
A
AN
BE
Q
I
I
F
STR
SP-DRUCK
WZM-GESP
SP-LEER
005B
7.1
8.4
8.5
133.0
CONTROL FORWARDS
-STR
CONTROL FORWARDS?
-SP-DRUCK
CLAMPING PRESSURE?
-WZM-GESP
TOOL CLAMPED IN MAGAZINE?
-SP-LEER
SPINDLE NOT EMPTY?
CONTROL BACKWARDS
CLAMPING PRESSURE
TOOL CLAMPED IN MAGAZINE
SPINDLE EMPTY
===========================================================================
6–28
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6 Appendix
6.2 Appendix 2
SB 170
A:P00855ST.S5D
TRANSITION 5/1
006A
: AN Q
006B
: BE
Q
7.1 =
006A
7.1
LEN=257
SHEET 8
CONTROL FORWARDS
-STR
CONTROL FORWARDS?
STR
CONTROL BACKWARDS
===========================================================================
TRANSITION 6/1
0076
: AN Q
0077
: A
I
0078
: BE
Q
I
7.1 =
8.6 =
0076
7.1
8.6
CONTROL FORWARDS
-STR
CONTROL FORWARDS?
-GR-GELOE
GRIPPER RELEASED?
STR
GR-GELOE
CONTROL BACKWARDS
GRIPPER RELEASED
===========================================================================
TRANSITION 7/1
0083
: AN Q
0084
: A
I
0085
: BE
Q
I
7.1 =
8.1 =
0083
7.1
8.1
CONTROL FORWARDS
-STR
CONTROL FORWARDS?
-RM-SENKR
FEEDBACK GRIPPER VERTICAL?
STR
RM-SENKR
CONTROL BACKWARDS
FEEDBACK GRIPPER VERTICAL
===========================================================================
TRANSITION 8/1
008E
: A
Q
008F
: A
I
0090
: BE
Q
I
7.1 =
8.1 =
008E
7.1
8.1
CONTROL AND FEEDBACK VERTICAL
-STR
CONTROL FORWARDS?
-RM-SENKR
FEEDBACK GRIPPER VERTICAL?
STR
RM-SENKR
CONTROL BACKWARDS
FEEDBACK GRIPPER VERTICAL
===========================================================================
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
6–29
6 Appendix
6.2 Appendix 2
06.93
SB 170
A:P00855ST.S5D
TRANSITION 9/1
0099
: A
Q
009A
: A
I
009B
: BE
Q
I
7.1 =
8.3 =
0099
7.1
8.3
STR
RM-VORN
LEN=257
SHEET 9
CONTROL AND FEEDBACK FRONT
-STR
CONTROL BACKWARDS?
-RM-VORN
FEEDBACK GRIPPER FRONT?
CONTROL BACKWARDS
FEEDBACK GRIPPER IN FRONT
===========================================================================
TRANSITION 10/1
00A7
:
00A8
:
00A9
:
00AA
:
00AB
:
A
AN
AN
A
BE
Q
I
I
F
STR
SP-DRUCK
WZM-GESP
SP-LEER
7.1
8.4
8.5
133.0
=
=
=
=
Q
I
I
F
00A7
7.1
8.4
8.5
133.0
STR
-STR
-SP-DRUCK
-WZM-GESP
-SP-LEER
CONTROL BACKWARDS?
CLAMPING PRESSURE NOT FULFILLED?
TOOL CLAMPED IN MAGAZINE?
SPINDLE EMPTY?
CONTROL BACKWARDS
CLAMPING PRESSURE
TOOL CLAMPED IN MAGAZINE
SPINDLE EMPTY
===========================================================================
TRANSITION 11/1
00B7
: A
Q
0078
: BE
Q
7.1 =
00B7
7.1
STR
STR
-STR
CONTROL BACKWARDS?
CONTROL BACKWARDS
===========================================================================
TRANSITION 12/1
00C4
:
00C5
:
00C6
:
00C7
:
A
Q
A
I
AN F
BE
Q
I
F
STR
GR-GESPA
SP-LEER
7.1 =
8.7 =
133.0 =
00C4
7.1
8.7
133.0
STR
-STR
-GR-GESPA
-SP-LEER
CONTROL BACKWARDS?
GRIPPER CLAMPED?
SPINDLE NOT EMPTY?
CONTROL BACKWARDS
GRIPPER CLAMPED
SPINDLE EMPTY
===========================================================================
6–30
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6 Appendix
6.2 Appendix 2
SB 170
A:P00855ST.S5D
TRANSITION 13/1
00D3
: A
Q
00D4
: A
I
00D5
: BE
Q
I
7.1 =
8.0 =
00D3
7.1
8.0
LEN=257
SHEET 10
CONTROL BACKWARDS
-STR
CONTROL BACKWARDS?
-RM-WAAGR
FEEDBACK GRIPPER HORIZONTAL?
STR
RM-WAAGR
CONTROL BACKWARDS
FEEDBACK GRIPPER HORIZONTAL
===========================================================================
TRANSITION 14/1
00E1
:
00E2
:
00E3
:
00E4
:
00E5
:
AN
A
A
A
BE
Q
I
I
F
STR
SP-DRUCK
WZM-GESP
SP-LEER
7.1
8.4
8.5
133.0
=
=
=
=
Q
I
I
F
00E1
7.1
8.4
8.5
133.0
FORWARD JUMP TO STEP 6
-STR
CONTROL FORWARDS?
-SP-DRUCK
CLAMPING PRESSURE?
-WZM-GESP
TOOL CLAMPED IN MAGAZINE?
-SP-LEER
SPINDLE EMPTY
CONTROL BACKWARDS
CLAMPING PRESSURE
TOOL CLAMPED IN MAGAZINE
SPINDLE EMPTY
===========================================================================
TRANSITION 15/1
00F1
:
00F2
:
00F3
:
00F4
:
A
Q
A
I
A
F
BE
Q
I
F
STR
GR-GESPA
SP-LEER
7.1 =
8.7 =
133.0 =
00F1
7.1
8.7
133.0
BACKWARD JUMP TO STEP 4
-STR
CONTROL BACKWARDS?
-GR-GESPA
GRIPPER CLAMPED?
-SP-LEER
SPINDLE EMPTY
CONTROL BACKWARDS
GRIPPER CLAMPED
SPINDLE EMPTY
===========================================================================
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
6–31
6 Appendix
6.2 Appendix 2
06.93
SB 170
A:P00855ST.S5D
STEP 1/1
000C
000D
: A
F
: BE
000C
233.0
LEN=257
SHEET 11
INIT-STEP
===========================================================================
STEP 2/1
0010
0011
0012
0013
F
F
:
:
:
:
131.2 =
131.7 =
A
F
=
F
R
F
BE
0010
233.0
131.2
131.7
GR-RL
MAG-POS
GRIPPER 90° CLOCKWISE
-GR-RL
-MAG-POS
GRIPPER 90° CLOCKWISE
RESET MAGAZINE POSITIONING
GRIPPER CLOCKWISE
MAGAZINE POSITIONING
TUE:
TWA: KT 100.0
===========================================================================
STEP 3/1
0016
0017
0018
F
: A
F
: =
F
: BE
131.1 =
0016
233.0
131.1
GR-ZUR
GRIPPER BACK
-GR-ZUR
GRIPPER BACK
GRIPPER BACK
TUE:
TWA: KT 100.0
===========================================================================
STEP 4/1
001B
001C
001D
001E
F
F
:
:
:
:
132.1 =
134.2 =
A
F
=
F
=
F
BE
SP-SPANN
WZM-SPA
001B
233.0
132.1
134.2
CLAMP SPINDLE
-SP-SPANN
-WZM-SPA
CLAMP SPINDLE
CLAMP TOOL IN MAGAZINE
CLAMP SPINDLE
CLAMP TOOL IN MAGAZINE
TUE:
TWA: KT 100.0
===========================================================================
6–32
© Siemens AG 1993 All Rights Reserved
6FC5 197- AA30
SINUMERIK 840C (PJ)
06.93
6 Appendix
6.2 Appendix 2
SB 170
A:P00855ST.S5D
STEP 5/1
0021
0022
0023
F
: A
F
: =
F
: BE
130.7 =
0021
233.0
130.7
LEN=257
SHEET 12
RESTORE MAGAZINE DATA
-UMSP
UMSP
RESTORE MAGAZINE DATA
RESTORE MAGAZINE DATA
TUE:
TWA: KT 100.0
===========================================================================
STEP 6/1
0026
0027
0028
F
: A
F
: =
F
: BE
131.4 =
0026
233.0
131.4
RELEASE GRIPPER
-GR-LOES
GR-LOES
RELEASE GRIPPER
RELEASE GRIPPER
TUE:
TWA: KT 100.0
===========================================================================
STEP 7/1
002B
002C
002D
002E
F
F
:
:
:
:
131.3 =
130.0 =
A
F
=
F
R
F
BE
002B
233.0
131.3
130.0
GRIPPER 90° COUNTERCLOCKWISE
-GR-LL
-WZA
GR-LL
WZA
GRIPPER 90° COUNTERCLOCKWISE
RESET STORE TOOL
GRIPPER COUNTERCLOCKWISE
STORE TOOL
TUE:
TWA: KT 100.0
===========================================================================
END OF SECTION
© Siemens AG 1993 All Rights Reserved
SINUMERIK 840C (PJ)
6FC5 197- AA30
6–33
Suggestions
Siemens AG
A&D MC IS
P.O. Box 31 80
D-91050 Erlangen
Federal Republic of Germany
Corrections
For Publication/Manual:
SINUMERIK 840C
Software Versions 1, 2, 3, 4, 5 and 6
135 WB2/WD PLC Function Blocks
Package 0: Basic Functions
Planning Guide
Order No.:
Edition:
From:
Name
Company/Dept.
Address
Telephone
/
Suggestions and/or corrections
6FC5 197-6AA30-0BP1
01.99
Should you come across any printing errors
when reading this publication, we would ask
you to inform us accordingly, using this
form. We would also welcome any suggestions you may have in the way of improvement.
Siemens Aktiengesellschaft
©
Siemens AG 1992, 1993, 1994, 1995, 1996, 1997, 1998
All Rights Reserved
Subject to change without prior notice
Order No. 6FC5197-6AA30-0BP1
Printed in the Federal Republic of Germany
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaaaaa
Siemens AG
Automation & Drives
Motion Control Systems
P.O. Box 31 80, D-91050 Erlangen
Federal Republic of Germany
Progress
in Automation.
Siemens