s
Contents, Foreword
Communication blocks
Service-/diagnostic blocks
Input/output blocks
Closed-loop control blocks
Index
Function Blocks
SIMATIC TDC
Manual
Edition 12.2004
Siemens Aktiengesellschaft
This Manual contains notices which you should observe to ensure your own personal
safety, as well as to protect the product and connected equipment. These notices are
highlighted in the Manual by a warning triangle and are marked as follows according to
the level of danger:
!
DANGER indicates an imminently hazardous situation which, if not avoided, will result in death or
serious injury.
!
WARNING indicates a potentially hazardous situation which, if not avoided, could result in death or
serious injury.
!
CAUTION used with the safety alert symbol indicates a potentially hazardous situation which, if not
avoided, may result in minor or moderate injury.
CAUTION used without safety alert symbol indicates a potentially hazardous situation which, if not
avoided, may result in property damage.
NOTICE used without the safety alert symbol indicates a potential situation which, if not avoided,
may result in an undesireable result or state.
Note the following:
This device and its components may only be used for the applications described in the
catalog or the technical description, and only in connection with devices or components
from other manufacturers which have been approved or recommended by Siemens.
SIMATIC and SIMADYN D are registered trademarks of Siemens AG.
Third parties using for their own purposes any other names in this document which refer
to trademarks might infringe upon the rights of the trademark owners.
Safety guidelines
Correct usage
Trademarks
Copyright SIEMENS AG 2004 All rights reserved Disclaimer of liability
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 rights
created by patent grant or registration of a utility model or design,
are reserved.
Siemens AG
A&D
Frauenauracher Straße 80
91056 Erlangen
We have checked the contents of this manual for agreement with
the hardware and software described. Since deviations cannot be
precluded entirely, we cannot guarantee full agreement.
However, the data in this manual are reviewed regularly and any
necessary corrections included in subsequent editions.
Suggestions for improvement are welcomed.
Siemens AG 2004
Technical data subject to change.
Function Blocks - SIMATIC TDC ii
Edition 12.2004
Editions
SIMATIC TDC
Manual
Function Blocks
Edition 12.2004
NOTE Please note that the current edition of this documentation contains
different editions of the individual chapters. The following overview tells
you when a chapter was revised the last time.
Chapter Edition
Foreword Edition 12.2004
1 Communication blocks Edition 12.2004
2 Service-/diagnostic blocks Edition 03.2003
3 Input/output blocks Edition 03.2003
4 Closed-loop control blocks Edition 12.2003
Overview
(chapter editions)
Function Blocks - SIMATIC TDC iii
Edition 12.2004
Foreword
This Manual explains the principle use and functions of the STEP 7
automation software with the main focus on the appropriate technological
and drive control components T400, FM 458-1 DP, SIMADYN D,
SIMATIC TDC or D7-SYS.
TDC: Technology and Drives Control
This Manual addresses programmers and commissioning engineers.
General knowhow regarding automation technology is required in order to
understand the contents of the Manual
This Manual is valid for SIMATIC D7-SYS Version 6.2.
If you have questions relating to the use of the products described in the
Manual, which cannot be answered here, then please contact your local
Siemens office. You can also call the Hotline:
Tel.: +49 (180) 5050-222
Fax: +49 (180) 5050-223
e-mail: adsupport@siemens.com
Appropriate training courses are available in order to make it easier to get
to know the SIMADYN D automation system. Please contact the central
Training Center in D-Erlangen (I&S IS INA TC):
Tel.: +49 (9131) 7-27689, -27972
Fax: +49 (9131) 7-28172
Internet: www.siemens.de/sibrain
Intranet: http://info-tc.erlm.siemens.de/
NOTE This user part of the Manual does not include any detailed
information/instructions with individual descriptions, but is only intended
to provide a basic procedure. More detailed information on the dialog
boxes in the software and how they are handled is provided in the
appropriate online help.
Purpose of this
Manual
Basic knowledge
required
Validity of the
Manual
Additional support
Training Center
Foreword
iv Function Blocks - SIMATIC TDC
Edition 12.2004
This manual is part of the overall documentation for the technological and
drive control components T400, FM 458, SIMADYN D, SIMATIC TDC
and SIMATIC D7-SYS:
Title Content
System and
communications
configuring D7-SYS
The first project in a few steps
This Section provides an extremely simple entry into the methodology when
assembling and programming the SIMATIC TDC/SIMADYN D control
system. It is especially conceived for first-time users of a control system.
System software
This Section provides basic know-how about the structure of the operating
system and an application program of a CPU. It should be used to obtain an
overview of the programming methodology, and basis for configuring user
programs.
Communications configuring
This section provides you with basic know-how about the communication
possibilities and how you configure links to the communication partners.
Changeover from STRUC V4.x to D7-SYS
Essential features are included in this section, which have changed over
STRUC V4.x with the introduction of SIMATIC D7-SYS.
STEP 7 option packages
for D7-SYS
Basis software
This section explains the essential use and the functions of the STEP 7
automation software. For first users, it provides an overview on configuring,
programming and commissioning a station.
When working with the basis software, you can access the online help which
provides you with support when it comes to detailed questions on using the
software.
CFC
The CFC language (Continuous Function Chart) allows you to graphically
interconnect blocks.
When working with the particular software, you can also use the online help
which can answer detailed questions regarding the use of the
editors/compiler.
SFC
Configuring sequence controls using SFC (Sequential Function Chart) of
SIMATIC S7.
In the SFC editor, you generate a sequence chart using graphic resources.
The SFC elements of the chart are then positioned according to specific
rules.
Hardware The complete hardware spectrum is described as reference in this Manuals.
Function blocks These Reference Manuals provide you with an overview of selected function
blocks for the associated technological and drive control components T400,
FM 458-1 DP, SIMADYN D and SIMATIC TDC.
Information
overview
Foreword
Function Blocks - SIMATIC TDC v
Edition 12.2004
As first time user, we recommend that this Manual is used as follows:
Please read the first section on using the software in order to get to
know some of the terminology and basic procedure.
Then use the particular sections of the Manual if you wish to carry-out
certain processing steps (e.g. loading programs).
If you have already executed a small project, and have gained some
experience, then you can read individual sections of the Manual in order
to get up to speed about a specific subject.
Can be accessed globally at any time of the day:
World-wide
(Nürnberg)
Technical Support
Local time: 0:00 to 24:00 / 365 days
Phone: +49 (180) 5050-222
Fax: +49 (180) 5050-223
E-Mail: adsupport@siemens.com
GMT: +1:00
Europe / Africa
(Nürnberg)
Authorization
Local time: Mo.-Fr. 8:00 to 17:00
Phone: +49 (180) 5050-222
Fax: +49 (180) 5050-223
E-Mail: adsupport@siemens.com
GMT: +1:00
United States
(Johnson City)
Technical Support and
Authorization
Local time: Mo.-Fr. 8:00 to 17:00
Phone: +1 (423) 262 2522
Fax: +1 (423) 262 2289
E-Mail:
simatic.hotline@sea.siemens.com
GMT: -5:00
Asia / Australia
(Peking)
Technical Support and
Authorization
Local time: Mo.-Fr. 8:00 to 17:00
Phone: +86 10 64 75 75 75
Fax: +86 10 64 74 74 74
E-Mail: adsupport.asia@siemens.com
GMT: +8:00
Technical Support and Authorization speak generally German and English.
Guide
A&D Technical
Support
Function Blocks - SIMATIC TDC vii
Edition 12.2004
Contents
Foreword ........................................................................................................................................ iii
1 Communication blocks.......................................................................................................... 1-1
1.1 Communications utility, time of day synchronization ................................................ 1-1
1.1.1 RTCM System time distribution ................................................................................ 1-1
1.1.2 SNTPR Time reception and transfer redundant ....................................................... 1-4
1.2 Central coupling blocks............................................................................................. 1-6
1.2.1 @GLOB Communications buffer coupling central block .......................................... 1-6
1.2.2 @LOCAL Local coupling central block ..................................................................... 1-8
1.2.3 @SRACK Subrack coupling central block.............................................................. 1-10
1.2.4 @TCPIP TCP/IP coupling central block ................................................................. 1-12
1.2.5 @MPI coupling central block .................................................................................. 1-13
1.2.6 @PRODP Central block PROFIBUS DP coupling ................................................. 1-14
2 Service-/diagnostic blocks.................................................................................................... 2-1
2.1 MSTAT Displays the status of all modules in the rack ............................................. 2-1
2.2 MSTATB Displays the status of all modules in the rack ........................................... 2-2
3 Input/output blocks ................................................................................................................ 3-1
3.1 AFC Analog input via V/f/D converter ....................................................................... 3-1
4 Closed-loop control blocks................................................................................................... 4-1
4.1 INT_M Modulo integrator for axis cycle correct integration ...................................... 4-1
Index .............................................................................................................................................. I-1
Function Blocks - SIMATIC TDC 1-1
Edition 12.2004
1 Communication blocks
1.1 Communications utility, time of day synchronization
1.1.1 RTCM System time distribution
RTCM
module name, time source
GV TM TS BO
system time is selb-controlled
set year
I XYR TUC I
version counter
set month
I XMO QTS I
block status
set day
I XDA YTS BO
status
set hour
I XHR
set minute
I XMI
setting signal
BO IS
this function block is used to synchronize and distribute the system
time throughout the subrack and to set the system time. In this case,
system time means the date and time of day.
The system time is distributed via CP52A0.
the RTCM function block can only be configured in a sampling interval
128 ms <= TA <= 512 ms.
the RTCM function block may only be configured once for each
subrack, and then only on the CPU which is located the furthest to the
left in the subrack.
The RTCM function block searches in the initialization mode, using the
TM input, for the module on which the system time source (master
system time) is controlled for the complete subrack. The master system
time can come from its "own" CPU, a CP51M1/CP5100 or a CP52A0.
The function block then searches all CS12/13/14 modules to distribute
the system time to the other subracks.
After all of the initialization tasks have been completed, the function block
updates the system time cyclically every 10 seconds on the
communications buffer (for system time synchronization on the particular
subrack) and on all CP52A0 modules.
Within any subrack, the system time is automatically synchronized
between the CPUs.
If the configured name of its own CPU is specified at input TM, then it
defines the system time itself. In this case, the block inputs XYR, XMO,
XDA, XHR and XMI are read-in when the signal at input IS changes from
0 to 1, and transferred as system time. As long as the IS block input is
not set, then the system time starts to run with the time buffered by the
battery or from the pre-setting 1.1.1993 00:00.
Symbol
Brief description
Mode of operation
Communication blocks
1-2 Function Blocks - SIMATIC TDC
Edition 12.2004
Permissible data for the setting quantities:
Setting input Setting input range Units
Month
Day
Minute
XMO
XDA
XMI
01, 02, ..., 12
01, 02, .., 31
00, 01, ..., 59
YearXYR 00, 01, ..., 99
HourXHR 00, 01, ..., 23
If illegal values are present at the block inputs to set month, day, hour
and minute, an entry is made in the communications error field and the
function block becomes inactive (further, the error number is output at
YTS).
If a module name is specified at the TM connection which is different than
that configured, then the block inputs XYR, XMO, XDA, XHR, XMI and IS
are only evaluated if the configured source has failed..
Block output TS indicates whether the system time was only received in
the current processing cycle (TS = 0) or was self-controlled (TS = 1).
Normally, the system time is received from the module, whose configured
name was specified at input TM. If the system time is no longer
generated there, then the RTCM automatically switches-over to its own
system time and uses this as master system time. This changeover is
flagged at output TS.
If a deviation of more than 100 ms is identified between the master
system time and its own time, between two synchronizing intervals, then
the RTCM evaluates the deviation as system time adjustment (e.g. when
changing-over from summer- to winter time).
Block output TUC indicates how many system time adjustments the
function block has already identified.
TM Initialization input for the configured coupling module name which should be
used for the master system time.
XYR Year, permissible entry: XYR = 00 to XYR = 99. The block input is only read when IS
changes from 0 to 1 and if the configured name of its own CPU module is specified at
TM.
(default : 97)
XMO Month, permissible entry: XMO = 01 to XMO = 12
(prerequisites as for block input XYR).
(default : 1)
XDA Day, permissible entry: XDA = 01 to XDA = 31
(prerequisite as for block input XYR).
(default : 1)
XHR Hour, permissible entry: XHR=01 to XHR=23
(prerequisite as for block input XYR).
(default : 0)
I/O
Communication blocks
Function Blocks - SIMATIC TDC 1-3
Edition 12.2004
XMI Minutes, permissible entry XMI=01 to XMI=59
(prerequisite as for block input XYR).
(default : 0)
IS Setting trigger: When this changes from 0 to 1, the master system time is updated
corresponding to block inputs XYR, XMO, XDA, XHR and XMI, and if required, block
output TUC is incremented (for deviations greater than 100 ms). The IS input is only
processed, if its own module name was configured at input TM.
(default : 0)
TS System time source. This output flags whether the master system time is
received from the module configured at input TM (TS = 0) or is self-controlled
(TS = 1), e.g. if the master system time fails.
(default : 0)
TUC System time version counter. If a deviation of more than 100 ms is identified
between the master system time and its own time, between two synchronizing intervals,
then the RTCM evaluates the deviation as system time adjustment. The TUC block
output is incremented at each system time adjustment.
(default : 0)
YTS All temporary faults/errors and irreparable faults/errors are indicated at this
block output.
For values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC D7-SYS")
(default : 0)
QTS Output QTS indicates whether the block was correctly initialized (QTS = 1),
or, after entering a communications error message, became inactive
(QTS = 0).
(default : 0)
Computation time [µs] CPU 550/551 8,3
Can be inserted online --
Can be configured in Cyclic tasks
Executed in Initialization mode
Normal mode
Special features -
Configuringdata
Communication blocks
1-4 Function Blocks - SIMATIC TDC
Edition 12.2004
1.1.2 SNTPR Time reception and transfer redundant
SNTPR
Coupling module 1
GV CT1 YTS I
Fault display
Name of receive channel
S AR1 YTZ I
Supplementary display to YTS
Coupling module 2
GV CT2 YT1 W
Status, receive channel 1
Name of receive channel 2
S AR2 YT2 W
Status, receive channel 2
Receive channel mode
S MOR LFZ I
Last fault
Time zone
R TZ QTS BO
Transfer state (1=ok)
Timeout monitoring time
TS TIO CP I
Actual clock (0/1/2)
TO1 BO
Timeout, clock 1
TO2 BO
Timeout, clock 2
The SNTPR block receives a TCP-IP time telegram according to
RFC 2030, and converts the time into the internal TDC format. If the
CP51M1/CP5100, configured at the CT1, is also configured as a time
source at the RTCM, then the function block assumes the
synchronization function. The second CP51M1/CP5100 (configured at
CT2) can then be used as redundant time source. Only a time sender
SICLOCK can be used as a time source.
The time of the 'Master Clock' is received via the first CP51M1/CP5100
and the time of the 'Standby Clock' via the second CP51M1/CP5100. If
the telegrams from the 'Master Clock' fail, then after the time, set at input
TIO, the telegram of the 'Standby Clock' is used for synchronization. A
changeover is made to the internal clock if this is not configured or has
failed.
Once a fault has been removed, then the time from the source is
automatically evaluated with the highest priority (master before slave
before internal clock).
Pre-assignment
CT1 Name of the first coupling module for
receive channel 1 (this must be a CP51M1/CP5100).
AR1 Name and parameter of the first receive channel.
(the channel name can be modified; the parameter
must remain)
SNTP_R.U-00123
CT2 Name of the second coupling module for
receive channel 2.
A CP51M1/CP5100 can be configured or a 0.
AR2 Name and parameter of the second receive channel.
(the channel name can be modified; the parameter
must remain)
SNTP_R.U-00123
MOR Mode of the receive channel
("H" = Handshake, "R"=Refresh, "S"=Select, "M"=Multiple)
R
TZ Time zone. This value is added to the received time or
subtracted if TZ is negative (permitted: -12..12).
0
TIO Timeout - time to monitor the receive channels.
Symbol
Mode of operation
Redundancy
changeover
Connections
Communication blocks
Function Blocks - SIMATIC TDC 1-5
Edition 12.2004
YTS Fault output; when a fault/error condition develops, an
ID is output for diagnostic purposes.
YTZ For YTS <> 0, supplementary information is displayed.
YT1 Status, receive channel 1.
(TDC/Simadyn D communication (error) code, e.g. 0x6001).
YT2 Status, receive channel 2.
(TDC/Simadyn D communication (error) code, e.g. 0x6001).
LFZ Error status; the last error status which occurred is displayed.
Contrary to connector YTS, LFZ is never deleted.
QTS Status output; operational readiness is indicated with a 1.
CP Displays the clock presently being used (0, 1 or 2).
TO1 Timeout, receive channel 1, time is entered via input TIO.
TO2 Timeout, receive channel 2, time is entered via input TIO.
The following fault states are defined:
(NR = TDC fault number from D7-SYS online help)
YTS YTZ Significance
0 0 Ok
1 NR Fault NR when requesting data save
2 NR Fault when setting-up the channel, channel 1
3 NR Fault when setting-up the channel, channel 2
4 NR Temporary channel fault
5 NR Permanent channel fault
8 0 Module not found
9 0 Module parameters not found
10 0 Illegal time zone
11 0 Illegal module state
12 0 Bus access error
(Reading of module CP51M1/CP5100)
13 0 SNTP-Telegram mode is not BROADCAST
14 0 SNTP-Telegram year is out of range (1988 - 2072)
15 0 Bus access error
(Writing on module CP51M1/CP5100)
Computation time [µs] CPU 550/551 37
Can be inserted online No
Can be configured in Interrupt tasks
Cyclic tasks
Executed in Initialization mode
Normal mode
Special features This block must be incorporated once on the first
processor. It is required on the RTCM.
Its cycle time defines the accuracy of the time being
used. This is the reason that it should be configured
in the fastest sampling time (T1).
Fault states
Configuring data
Communication blocks
1-6 Function Blocks - SIMATIC TDC
Edition 12.2004
1.2 Central coupling blocks
1.2.1 @GLOB Communications buffer coupling central block
@GLOB
communications buffer module name
GV CTS CDM BO
coupling status
reorganization
BO CDV QTS BO
block status
the central block @GLOB initializes and monitors the communications
buffer coupling. The communications buffer coupling can be set-up on
all communications buffer modules.
the function block may only be configured once for each subrack, as
there is only one communications buffer module for each subrack.
Multiple configuring is identified during initialization and results in an
entry in the communications error field.
the function block may only be configured in the sampling interval
32 ms <= TA <= 256 ms. Otherwise, an entry is made in the
communications error field.
While the function block is being initialized, general preparations are
made to enable the coupling. The coupling is only enabled after the
normal mode has been executed several times.
After the coupling has been enabled, the central block monitors that
transmitters and receivers are correctly logged-on. Further, if required, it
re-organizes and updates the block output CDM at each processing
cycle.
The complete data interface is re-formatted by setting the CDV input.
This option should be used, if
an application (e.g. the message evaluation function block MSI)
flags that it cannot log-on any additional channel at the data interface, as
there is no sufficient memory space available.
If the CDV block input is set again, this is only taken into account if the
CDV input was reset (i.e. was at 0) for at least 2 sampling times after re-
organization was completed. Otherwise the data at the input is ignored.
The CDM block output provides information about the coupling status.
The output is 1, if the coupling is enabled for general transmit/receive
operation. The CDM block output is 0, as long as the coupling is being
initialized or is being re-initialized (after a temporary fault), or the memory
is being re-formatted (refer to CDV connection).
The computation time information in the technical data refers to a typical
task processing. During re-organization, the computation time is
extended over several processing cycles up to 370 µs.
Symbol
Brief description
Mode of operation
Communication blocks
Function Blocks - SIMATIC TDC 1-7
Edition 12.2004
CTS The configured name of the communications buffer is specified at this initialization
input.
CDV The memory of the data interface is re-formatted when CDV changes from 0 to 1
(default : 0)
CDM Indicates the coupling status (faulted = 0, not faulted = 1).
(default : 0)
QTS Operating status of the function block. For QTS = 0, there is an irreparable error;
for QTS=1, the function block is operating error-free.
(default : 0)
Computation time [µs] CPU 550/551 3,5
Can be inserted online --
Can be configured in: Cyclic tasks
Executed in: Initialization mode
Normal mode
Special features -
I/O
Configuringdata
Communication blocks
1-8 Function Blocks - SIMATIC TDC
Edition 12.2004
1.2.2 @LOCAL Local coupling central block
@LOCAL
CPU module name
GV CTS CDM BO
coupling status
reorganization
BO CDV QTS BO
block status
this function block is responsible in initializing and monitoring the local
CPU coupling. For this coupling the interface is located on the CPU-
local RAM.
the function block may only be configured once for each CPU module,
as each CPU has only one local coupling. If the function block is
configured a multiple number of times, this is identified during
initialization, and results in an entry in the communications error field.
the function block may only be configured in a sampling interval
32 ms <= TA <= 256 ms. Otherwise, an entry is made in the
communications error field.
While the function block is being initialized, general preparations are
made to enable the coupling. The coupling is only enabled after the
normal mode has been executed several times.
After the coupling has been enabled, the central block monitors that
transmitters and receivers are correctly logged-on. Further, if required, it
re-organizes and updates the block output CDM at each processing
cycle.
The function block cannot be used to initialize and monitor a "remote"
CPU-local coupling. It can only initialize the local coupling on that CPU in
which it was configured. An entry is made in the communications error
field if another module name is specified at the CTS input (other than its
own).
The complete data interface is re-formatted by setting the CDV input.
This option should be used, if
an application (e.g. the message evaluation function block MSI)
flags that it cannot log-on any additional channel at the data interface, as
there is not sufficient memory space available.
If the CDV block input is set again, this is only taken into account if the
CDV input was reset (i.e. was at 0) for at least 2 sampling times after re-
organization was completed. Otherwise the data at the input is ignored.
The CDM block output provides information about the coupling status.
The output is 1, if the coupling is enabled for general transmit/receive
operation. The CDM block output is 0, as long as the coupling is being
initialized or is being re-initialized (after a temporary fault), or the memory
is being re-formatted (refer to CDV connection).
Symbol
Brief description
Mode of operation
Communication blocks
Function Blocks - SIMATIC TDC 1-9
Edition 12.2004
CTS The configured name of its CPU is specified at this initialization input (its own
CPU).
CDV The memory of the data interface is re-formatted when CDV changes from 0 to 1.
(default : 0)
CDM Indicates the coupling status (faulted = 0, not faulted = 1).
(default : 0)
QTS Operating status of the function block. For QTS=0, an irreparable error is present; for QTS
= 1, the function block is operating error-free.
(default : 0)
Computation time [µs] CPU 550/551 8,0
Can be inserted online --
Can be configured in: Cyclic tasks
Executed in: Initialization mode
Normal mode
Special features -
I/O
Configuringdata
Communication blocks
1-10 Function Blocks - SIMATIC TDC
Edition 12.2004
1.2.3 @SRACK Subrack coupling central block
@SRACK
CP52A0 module name
GV CTS NCP I
No. of active subracks
subrack 1 name
S N01 A01 BO
subrack 1 active
subrack 2 name
S N02 A02 BO
subrack 2 active
subrack 3 name
S N03 A03 BO
subrack 3 active
subrack 43 name
S N43 A43 BO
subrack 43 active
subrack 44 name
S N44 A44 BO
subrack 44 active
CDM BO
coupling status
QTS BO
block status
YTS W
detailed status
the function block initializes and monitors the TCP/IP (UDP) coupling
(CP52A0 module).
the function block may only be configured in the sampling interval
32 ms <= TA <= 256 ms. Otherwise, an entry is made in the
communications error field.
Mode of operation
While the function block is being initialized, general preparations are
made to enable the coupling on CP52A0 side. The coupling is only
enabled after the normal mode has been executed several times.
After the coupling has been enabled, the central block checks that
the CP52M0 side is still present
the coupling from the CP52M0 side is enabled.
Further the central block monitors:
the number of active subracks (CP52A0)
the status of the registrated coupling partners on CP52A0 side
Transmitters and receivers in the slave-side subrack can only access the
GDM memory at the data interface after the @SRACK central block has
enabled the coupling.
The CP52A0 side is only enabled after the CP52M0 side has been
enabled.
The block outputs NCP, An, CDM and YTS are updated at each
processing cycle.
Only the inputs N01-N04 and the outputs A01-A04 are visible by default
to minimize the block. All further inputs Nn and outputs An can be made
visible at any time.
Subracks which should be monitored by the central block must be
declared from N01 upward (without empty string). Inputs after an empty
string will not be processed by the central block.
Symbol
Brief description
Communication blocks
Function Blocks - SIMATIC TDC 1-11
Edition 12.2004
CTS The configured name of the CP52A0 module is specified at this initialization
input.
Nn Name of the subrack, whose activity is to be indicated at output An.
(default: empty string)
CDM Indicates the coupling status (faulted = 0, not faulted = 1)
(default : 0)
NCP Specifies the number of active subracks (value range 0...44)
(default : 0)
An Indicates the activity from the subrack whose name is configured at Nn.
(default : 0)
QTS Operating status:
QTS = 1: the function block is operating error-free
QTS = 0: inactive after entering a communications error message
(default : 0)
YTS Detailed status display; for values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)
Computation time [µs] CPU 550/551 6,3
Can be inserted online --
Can be configured in: Cyclic tasks
Executed in: Initialization mode
Normal mode
Special features -
I/O
Configuringdata
Communication blocks
1-12 Function Blocks - SIMATIC TDC
Edition 12.2004
1.2.4 @TCPIP TCP/IP coupling central block
@TCPIP
module name
GV CTS CDM BO
coupling status
QTS BO
block status
YTS W
detailed status
the function block initializes and monitors the GDM coupling (CP52A0
module).
the function block may only be configured in the sampling interval 32
ms <= TA <= 256 ms. Otherwise, an entry is made in the
communications error field.
the function block initializes and monitors the TCP/IP (UDP)
coupling (CP51M1/CP5100 module).
the function block may only be configured in the sampling
interval 32 ms <= TA <= 256 ms. Otherwise, an entry is made in
the communications error field.
While the function block is being initialized, general preparations are
made to enable the coupling. The coupling is only enabled after the
normal mode has been executed several times.
After the coupling has been enabled, the central block monitors that
transmitters and receivers correctly log-on as well as the operating status
of the CP51M1/CP5100 module.
The block outputs YTS and CDM are updated at each processing cycle.
CTS The configured name of the CP51M1/CP5100 module is specified at this initialization
input.
CDM Indicates the coupling status (faulted = 0, not faulted = 1)
(default : 0)
QTS Operating status:
QTS = 1: the function block is operating error-free
QTS = 0: inactive after entering a communications error message
(default : 0)
YTS Detailed status display; for values at YTS, refer to: D7-SYS online help
"Help on events". (press key F1 in the CFC and call-up the topic
"Help on events" under "CFC for SIMADYN D")
(default : 0)
Computation time [µs] CPU 550/551 24,0
Can be inserted online --
Can be configured in: Cyclic tasks
Executed in: Initialization mode
Normal mode
Special features -
Symbol
Brief description
Brief description
Mode of operation
I/O
Configuringdata
Communication blocks
Function Blocks - SIMATIC TDC 1-13
Edition 12.2004
1.2.5 @MPI coupling central block
@MPI
module name.connector
GV CTS ECL I
error class
ECO I
error code
CDM BO
coupling status
QTS BO
block status
the function block initializes and monitors the MPI coupling (CP50M0).
the function block may only be configured in the sampling interval
32 ms <= TA <= 256 ms. Otherwise, an entry is made in the
communications error field.
While the function block is being initialized, general preparations are
made to enable the coupling. The coupling is only enabled after the
normal mode has been executed several times.
After the coupling has been enabled, the central block monitors that
transmitters and receivers correctly log-on as well as the operating status
of the CP50M0 interface.
Block outputs ECL, ECO and CDM are updated at each processing
cycle.
The computation time information in the technical data refers to a typical
task processing.
CTS The configured name of the CP50M0 module and connector X01 or X02 is
specified at this initialization input.
ECL Error class output. For ECL > 0, there is an irreparable error. The output should
always be evaluated in a direct relationship to the ECO block output.
ECO Error code output. For ECL = 0 and ECO = 0, there is no error. For ECO > 0,
there is either a configuring error (ECL = 0) or irreparable error (ECO > 0). The
output should always be evaluated in a direct relationship to the ECL block output.
For more detailed information regarding ECL and ECO,
refer to: Configuring Instructions, MPI coupling.
CDM Indicates the coupling status (faulted = 0, not faulted = 1)
QTS Block status:
QTS = 1: Block is operational.
QTS = 0: Block is disabled with an entry in the communications error field.
Computation time [µs] CPU 550/551 24,0
Can be inserted online --
Can be configured in: Cyclic tasks
Executed in: Initialization mode
Normal mode
Special features The function block may not be disabled per task
group.
Symbol
Brief description
Mode of operation
I/O
Configuringdata
Communication blocks
1-14 Function Blocks - SIMATIC TDC
Edition 12.2004
1.2.6 @PRODP Central block PROFIBUS DP coupling
@PRODP
module name.connector
GV CTS ECL I
error class
PROFIBUS address I MAA ECO I
error code
baud rate I BDR CDM BO
coupling status
only slave functionality I SLA QTS BO
block status
host CPU monitoring time I LCC
the function block initializes and monitors the PROFIBUS DP coupling
(CP50M0).
the function block may only be configured in the sampling interval
32 ms <= TA <= 256 ms. Otherwise an entry is made in the
communications error field.
While the function block is being initialized, general preparations are
made to enable the coupling. The coupling is only enabled after the
normal mode has been executed several times.
After the coupling has been enabled, the central block monitors that
transmitters and receivers correctly log-on as well as the operating status
of the CP50M0 interface.
Block outputs ECL, ECO and CDM are updated at each processing
cycle.
The computation time information in the technical data refers to the
typical task processing.
Symbol
Brief description
Mode of operation
Communication blocks
Function Blocks - SIMATIC TDC 1-15
Edition 12.2004
CTS The configured name of the CP50M0 module and connectors X01 or X02 are specified
at this initialization input.
MAA The PROFIBUS address for the CP50M0 interface is specified at this initialization input.
The data entry consists of a number from 1 to 123.
(default : 1)
BDR The baud rate is specified at this initialization input. The permissible values are
specified coded; the coding is as follows:
0 = 9.6 kbaud
1 = 19.2 kbaud
2 = 93.75 kbaud
3 = 187.5 kbaud
4 = 500 kbaud
5 = 1.5 Mbaud
6 = 3 Mbaud
7 = 6 Mbaud
8 = 12 Mbaud
(default : 5)
SLA Initialization input for only-slave functionality:
0: CP50M0 operates as PROFIBUS master and/or slave. A COM PROFIBUS -
database must be loaded.
1 or 2: CP50M0 operates as pure PROFIBUS slave without COM PROFIBUS database
1: slave with either inputs or outputs,
2: slave with inputs and outputs
(default: 0)
LCC Initialization input for the time in which the CP50M0 module monitors the SIMATIC TDC host
CPU:
<0: no monitoring
0...10: monitoring time = 1s (default)
>10: monitoring time in 1/10 s
(default: 10)
ECL Error class output. For ECL > 1 there is an irreparable error. The output must
always be evaluated in a direct relationship to the ECO block output.
(default : 0)
ECO Error code output. For ECL = 0 and ECO = 0, there is no error. For ECL = 0 and ECO > 0,
there is a configuring error. The output must always be evaluated in a direct relationship to
the ECL block output.
For a more precise explanation on ECL and ECO, refer to: Configuring Instructions,
PROFIBUS DP coupling.
(default : 0)
CDM Specifies the coupling status (faulted = 0, not faulted = 1).
(default : 0)
QTS Block status. For QTS=0, there is an irreparable error; for QTS=1, the function block operates
error-free.
(default : 0)
Computation time [µs] CPU 550/551 24,0
Can be inserted online --
Can be configured in: Cyclic tasks
Executed in: Initialization mode
Normal mode
Special features The function block may not be disabled per task
group.
I/O
Configuringdata
Function Blocks - SIMATIC TDC 2-1
Edition 03.2003
2 Service-/diagnostic blocks
2.1 MSTAT Displays the status of all modules in the rack
MSTAT
P01 W
Operating status, module slot 1
P02 W
Operating status, module slot 2
P03 W
Operating status, module slot 3
P04 W
Operating status, module slot 4
P05 W
Operating status, module slot 5
P021 W
Operating status, module slot 21
The slot always means the configured slot.
Function block MSTAT indicates the operating status of every module in
a subrack at its outputs.
This block allows each processor to interrogate the operating status of
other processors, e.g. to initiate fault/error handling.
This function block evaluates the module status information from the
buffer memory and provides it at its outputs coded as follows:
0: Boot phase
1: Initialization phase
2: Cyclic operation (RUN)
3: User stop
4: Stop due to initialization error
5: Stop due to system error
Px
(1 _ x _ 21)
Operating status of the module at slot x
Computation time [µs] CPU550/CPU551 8
Can be configured in Interrupt tasks
Cyclic tasks
Executed in Initialization mode
Normal mode
Special features -
Symbol
Brief description
Mode of operation
I/O
Configuring data
Service-/diagnostic blocks
2-2 Function Blocks - SIMATIC TDC
Edition 03.2003
2.2 MSTATB Displays the status of all modules in the rack
MSTATB
P01 BO
Operating status, module slot 1
P02 BO
Operating status, module slot 2
P03 BO
Operating status, module slot 3
P04 BO
Operating status, module slot 4
P05 BO
Operating status, module slot 5
P021 BO
Operating status, module slot 21
The MSTATB function block indicates the operating status (RUN or
STOP) of every module of a subrack at its outputs.
This block allows each processor to interrogate the operating status of
other processors, e.g. to initiate fault/error handling.
This function block evaluates module status information from the buffer
memory.
Logical 0: CPU is in the STOP status (user stop,
system fault/error), or the periphery has failed or the
block slot is empty (e.g. for IT)
Logical 1: CPU is in the run status, periphery is ready
Px
(1 _ x _ 21)
Operating status of the module at slot x
Computation time [µs] CPU550/CPU551 8,0
Can be configured in Interrupt tasks
Cyclic tasks
Executed in Initialization mode
Normal mode
Special features -
Symbol
Brief description
Mode of operation
I/O
Configuring data
Function Blocks - SIMATIC TDC 3-1
Edition 03.2003
3 Input/output blocks
Assignment of the input/output blocks to processor- and peripheral
devices
Block Module
CPU 550/551 SM 500
AFC X
3.1 AFC Analog input via V/f/D converter
AFC
hardware address
GV AD Y R
measured value
mode of operation
I MOD QF BO
group error message
offset compensation
ROFF YFW
error ID
scalling factor
RSF
trigger
BO TR
adjustment type
BO ADJ
analog input with V/f/D conversion (voltage/frequency/digital
conversion).
each hardware address may only be assigned once as a result of the
measuring technique.
the sampling times, in which the function block can be configured, are
limited.
This function block converts an analog voltage into a digital value with
voltage/frequency/digital conversion and, after multiplying this value with
SF and subracting OFF, outputs it at Y.
The hardware address of the analog input, from which the analog voltage
is to be read, is specified at input AD.
Each hardware address may only be assigned once.
The following is valid for converting analog voltage V into digital value Y:
Y= 1
t5V
U(t)dt SF - OFF
i
t
0
i
with: V - input voltage in volts
ti - integration (measuring) time
The measuring technique integrates continuously (without any gaps)
between the start and the end of the measurement.
Symbol
Brief description
Mode of operation
Input/output blocks
3-2 Function Blocks - SIMATIC TDC
Edition 03.2003
The permissible sampling time is limited due to the measuring technique
used.
The following is valid: 1 ms <= TA <= 130 ms.
f
f
#
*-
QF
YF
SF
OFF
TR
TRG
MOD
AD
Y
TRG - binary signal input via the front panel
The operating mode is set at input MOD.
MOD = 0 The integration time is the sampling time. A conversion is realized in each sampling time.
MOD = 1 Conversion is triggered via the "trigger" input TR.
The actual measuring time is terminated when the edge at TR goes from 0->1, the output
value is calculated and a new measuring time is started. The integration time is a multiple
of the sampling time. The first edge at TR after a reset starts the first measurement.
MOD = 2 Triggering by an external trigger signal.
The end of the current measuring time and the start of a new measuring time is
determined by an external signal. The last trigger signal, which was received between the
initialization mode and the start of the first system mode starts the first conversion (refer to
1 in the following diagram). The integration time is terminated by the last trigger signal
between two consecutive FB executions (refer to 2 in the following diagram). This means
that if several triggers are received between 2 consecutive FB executions, only the last is
effective and terminates the actual measuring time. The trigger signal is input via a plug
connector on the front panel of the module. If a trigger is simultaneously received when
the FB is being read-accessed, the trigger is suppressed and has no effect (refer to 3 in
the following diagram).
Block diagram
Operating modes
Input/output blocks
Function Blocks - SIMATIC TDC 3-3
Edition 03.2003
12 3
Init. mode First system mode
This trigger
starts the first
measuring time
This trigger has no
effect on the result
This trigger is
suppressed
Meas. time n Meas. time
n + 1
Meas. time
n + 2
- Trigger signal
- AFC
Operating mode 2
The adjustment is controlled via binary input ADJ:
ADJ Adjustment type
0No adjustment
0 > 1 Adjustment in the current sampling cycle
1Adjustment after 65 536 sampling cycles
Adjustment is always executed during initialization. During adjustment, no
actual value is available at output Y for 5 sampling cycles. The last
calculated value is kept.
The V/f/D conversion has, due to the measuring technique, a resolution
of
() ()
[]
AV UV
fc ti
=+
20
With fc = 16 MHz and
ti dependent on the operating mode MOD
Adjustment
Resolution
Input/output blocks
3-4 Function Blocks - SIMATIC TDC
Edition 03.2003
Output QF is set to 1, if there is a conversion error. The error cause is
coded in the fault Word at block output YF. Bits 1 to 8 contain errors from
cyclic operation, bits 9 to 16, initialization errors. The errors and the
response of the function block are listed in the following table.
Bit 1 is the LSB, bit 16 the MSB of the fault Word.
YF
Bit 1 Hardware fault in the V/f converter.
No measuring pulses have been received in the last measurement interval. The channel is
faulted.
Response:
Y = 0 is output up to the next reset.
Bit 2 Not used
Bit 3 Not used
Bit 4 Time counter overflow.
Response:
When converting: Y is not updated.
When compensating: Adjustment is aborted and is then repeated.
Bit 5
Bit 6
Bit 7
Not used
Not used
Not used
Bit 8 Adjustement error.
The values received at adjustment lie outside the tolerance range. The channel is faulted.
Response:
Y = 0 is output up to the next reset.
Bit 9 Configuring error, sampling time.
Sampling time TA lies outside the range, 1 ms to 130 ms.
Response:
TA < 1 ms: Adjustment is only executed during initialization, independent of ADJ.
TA > 130 ms: There is potential danger of a time counter overflow. The channel is faulted and
Y = 0 is output.
Bit 10 System error, sampling time cannot be determined.
Response:
Y = 0 is output up to the next reset.
Bit 11 Not used
Bit 12
Bit 13
Not used
Not used
Bit 14 Not used
Bit 15 Adjustement error.
The values received during adjustment lie outside the tolerances. The channel is faulted.
Response:
Y = 0 is output up to the next reset.
Bit 16 Incorrect operating mode.
An invalid value is entered at input MOD.
Response:
Internally it is assumed that MOD = 0.
Fault messages
Input/output blocks
Function Blocks - SIMATIC TDC 3-5
Edition 03.2003
AD Hardware address (no default)
MOD Operating mode with the following value range: 0 <= MOD <= 2 (initialization input). The
value at the input is limited to 0 when it is negative, and is also limited to 0 for values >= 3.
(default: 0)
OFF Offset compensation (default: 0.0)
SF Scaling factor (default: 5.0)
TR Trigger (default: 0)
ADJ Adjustment type (default: 0)
YOutput (default: 0.0)
QF Group error message (default: 0)
YF Error ID (default: 16#0000)
Computation time [µs] CPU 550/551 1,0
Can be inserted online --
Can be configured in Interrupt tasks
Cyclic tasks
Executed in Initialization mode
System mode
Normal mode
Special features Sampling time:
1ms <= TA <= 130ms
I/O
Configuringdata
Function Blocks - SIMATIC TDC 4-1
Edition 12.2003
4 Closed-loop control blocks
4.1 INT_M Modulo integrator for axis cycle correct integration
INT_M
Modulo value
DI MOD Y DI
Output
Input
DI X QP BO
Positive oberflow
Numerator, ratio
DI NM QN BO
Negative overflow
Denominator, ratio
DI DN YF W
Block error status
Setting value
DI SV
Reset
BO R
Set
BO S
Hold
BO H
the virtual master block INT_M is used to generate position reference
values in angular synchronism.
The block sums the input values X, weighted with ratio NM and DN.
If the sum of the modulo value MOD exceeds or falls below 0, the modulo
value is subtracted or added, and an overflow bit QP or QN is set for the
duration of the sampling time.
MOD Modulo value, value range 1 . . . 230 (default: 0)
X Input quantity of the integrator
e.g. velocity (ramp-function generator output)
(default: 0)
NM Numerator value for the ratio (gearbox factor)
NM X may not exceed 231,
value range: – 230 to + 230
(default: 1)
DN Denominator value for the ratio (gearbox factor),
value range: – 230 to + 230
(default: 1)
SV Setting value
Is the value which is set to the output Y with S=1.
(default: 0)
R Reset
R=1 Y=0
(default: 0)
S Setting
Bit to set the output value Y to the setting value SV
S=1 Y=SV (initial offset)
(default: 0)
H Hold
Holds the instantaneous value at output Y
H=1 Y=Yold
(default: 0)
Symbol
Brief description
Mode of operation
I/O
Closed-loop control blocks
4-2 Function Blocks - SIMATIC TDC
Edition 12.2003
Y Output quantity of the integrator
R=S=H=0 Y=Yold+XNM/DN
(default: 0)
QP Positive overflow
QP=1 Y + X MOD (Y=Y-MOD)
(default: 0)
QN Negative overflow
QN=1 Y+X < 0 (Y=Y+MOD)
(default: 0)
YF Error status of the block
YF=0 no error, YF > 0 coded error output
(default: 0)
The error status is output in a coded form at output YF of the modulo
integrator INT_M. The last error event is always displayed.
Value Significance
1 MOD > 230 or < 1
4 Division overflow, positive
8 Division overflow, negative
16 Overflow, rest positive
32 Overflow, rest negative
Computation time [µs] CPU550/CPU551 9,9
Can be inserted online Yes
Can be configured in Interrupt tasks
Cyclic tasks
Executed in Initialization mode
Normal mode
Special features -
Coded error output
Configuringdata
Function Blocks - SIMATIC TDC I-1
Edition 12.2004
Index
@
@GLOB Communications buffer coupling central block............................................................... 1-6
@LOCAL Local coupling central block.......................................................................................... 1-8
@MPI coupling central block....................................................................................................... 1-13
@PRODP Central block PROFIBUS DP coupling...................................................................... 1-14
@SRACK Subrack coupling central block .................................................................................. 1-10
@TCPIP TCP/IP coupling central block...................................................................................... 1-12
A
AFC Analog input via V/f/D converter ........................................................................................... 3-1
I
INT_M Modulo integrator for axis cycle-correct integration .......................................................... 4-1
M
MSTAT displays the status of all modules in the rack .................................................................. 2-1
MSTATB displays the status of all modules in the rack ................................................................ 2-2
R
RTCM System time distribution..................................................................................................... 1-1
S
SNTPR Time reception and transfer redundant............................................................................ 1-4