s Contents, Foreword Communication blocks SIMATIC TDC Function Blocks Manual Service-/diagnostic blocks Input/output blocks Closed-loop control blocks Edition 12.2004 Index Safety guidelines 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. Correct usage 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. Trademarks 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. 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. 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 A&D Frauenauracher Strae 80 91056 Erlangen Siemens Aktiengesellschaft Siemens AG 2004 Technical data subject to change. Editions SIMATIC TDC Manual Function Blocks Edition 12.2004 NOTE Overview (chapter editions) 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 Function Blocks - SIMATIC TDC Edition 12.2004 ii Foreword Purpose of this Manual 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 Basic knowledge required This Manual addresses programmers and commissioning engineers. General knowhow regarding automation technology is required in order to understand the contents of the Manual Validity of the Manual This Manual is valid for SIMATIC D7-SYS Version 6.2. Additional support 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: Training Center * 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. Function Blocks - SIMATIC TDC Edition 12.2004 iii Foreword Information overview 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 System and communications configuring D7-SYS Content 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 Basis software for D7-SYS 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. iv Function Blocks - SIMATIC TDC Edition 12.2004 Foreword Guide 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. A&D Technical Support Can be accessed globally at any time of the day: World-wide (Nurnberg) 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 (Nurnberg) Authorization United States (Johnson City) Technical Support and Authorization Asia / Australia (Peking) Technical Support and 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 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 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. Function Blocks - SIMATIC TDC Edition 12.2004 v Contents Foreword ........................................................................................................................................ iii 1 Communication blocks.......................................................................................................... 1-1 1.1 1.1.1 1.1.2 Communications utility, time of day synchronization ................................................ 1-1 RTCM System time distribution ................................................................................ 1-1 SNTPR Time reception and transfer redundant ....................................................... 1-4 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 Central coupling blocks............................................................................................. 1-6 @GLOB Communications buffer coupling central block .......................................... 1-6 @LOCAL Local coupling central block ..................................................................... 1-8 @SRACK Subrack coupling central block.............................................................. 1-10 @TCPIP TCP/IP coupling central block ................................................................. 1-12 @MPI coupling central block .................................................................................. 1-13 @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 Edition 12.2004 vii 1 Communication blocks 1.1 Communications utility, time of day synchronization 1.1.1 RTCM System time distribution Symbol RTCM module name, time source set year set month set day set hour set minute setting signal Brief description GV I I I I I BO TM XYR XMO XDA XHR XMI IS TS TUC QTS YTS BO I I BO system time is selb-controlled version counter block status status * 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. Mode of operation 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. Function Blocks - SIMATIC TDC Edition 12.2004 1-1 Communication blocks Permissible data for the setting quantities: Setting input Setting input range Units XYR 00, 01, ..., 99 Year XMO 01, 02, ..., 12 Month XDA 01, 02, .., 31 Day XHR 00, 01, ..., 23 Hour XMI 00, 01, ..., 59 Minute 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. I/O 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) 1-2 Function Blocks - SIMATIC TDC Edition 12.2004 Communication blocks 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) Configuringdata Computation time [s] CPU 550/551 Can be inserted online -- Can be configured in Cyclic tasks Executed in Initialization mode Normal mode Special features - Function Blocks - SIMATIC TDC Edition 12.2004 8,3 1-3 Communication blocks 1.1.2 SNTPR Time reception and transfer redundant Symbol SNTPR Coupling module 1 Name of receive channel Coupling module 2 Name of receive channel 2 Receive channel mode Time zone Timeout monitoring time Mode of operation Redundancy changeover GV S GV S S R TS CT1 AR1 CT2 AR2 MOR TZ TIO YTS YTZ YT1 YT2 LFZ QTS CP TO1 TO2 I I W W I BO I BO BO Fault display Supplementary display to YTS Status, receive channel 1 Status, receive channel 2 Last fault Transfer state (1=ok) Actual clock (0/1/2) Timeout, clock 1 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). Connections 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) 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) 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. 1-4 SNTP_R.U-00123 SNTP_R.U-00123 Function Blocks - SIMATIC TDC Edition 12.2004 Communication blocks 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. Fault states Configuring data 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 Can be inserted online No 37 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). Function Blocks - SIMATIC TDC Edition 12.2004 1-5 Communication blocks 1.2 Central coupling blocks 1.2.1 @GLOB Communications buffer coupling central block Symbol @GLOB communications buffer module name GV reorganization BO Brief description CTS CDV CDM QTS BO coupling status 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. Mode of operation 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 reorganization 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. 1-6 Function Blocks - SIMATIC TDC Edition 12.2004 Communication blocks I/O 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) Configuringdata Computation time [s] CPU 550/551 Can be inserted online -- Can be configured in: Cyclic tasks Executed in: Initialization mode Normal mode Special features - Function Blocks - SIMATIC TDC Edition 12.2004 3,5 1-7 Communication blocks 1.2.2 @LOCAL Local coupling central block Symbol @LOCAL CPU module name GV reorganization BO Brief description CTS CDV CDM QTS BO coupling status 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 CPUlocal 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. Mode of operation 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 reorganization 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). 1-8 Function Blocks - SIMATIC TDC Edition 12.2004 Communication blocks I/O 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) Configuringdata Computation time [s] CPU 550/551 Can be inserted online -- Can be configured in: Cyclic tasks Executed in: Initialization mode Normal mode Special features - Function Blocks - SIMATIC TDC Edition 12.2004 8,0 1-9 Communication blocks 1.2.3 @SRACK Subrack coupling central block Symbol @SRACK CP52A0 module name subrack 1 name subrack 2 name subrack 3 name GV S S S subrack 43 name S subrack 44 name S Brief description CTS N01 N02 N03 NCP A01 A02 A03 I BO BO BO N43 N44 A43 A44 CDM QTS YTS BO BO BO BO W No. of active subracks subrack 1 active subrack 2 active subrack 3 active subrack 43 active subrack 44 active coupling status block status 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. 1-10 Function Blocks - SIMATIC TDC Edition 12.2004 Communication blocks I/O 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) Configuringdata Computation time [s] CPU 550/551 Can be inserted online -- Can be configured in: Cyclic tasks Executed in: Initialization mode Normal mode Special features - Function Blocks - SIMATIC TDC Edition 12.2004 6,3 1-11 Communication blocks 1.2.4 @TCPIP TCP/IP coupling central block Symbol @TCPIP module name GV Brief description CTS CDM QTS YTS BO coupling status BO block status 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. Brief description Mode of operation * 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. I/O 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) Configuringdata 1-12 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 - Function Blocks - SIMATIC TDC Edition 12.2004 Communication blocks 1.2.5 @MPI coupling central block Symbol @MPI module name.connector GV Brief description CTS ECL ECO CDM QTS I I BO BO error class error code coupling status 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. Mode of operation 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. I/O 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. Configuringdata Computation time [s] CPU 550/551 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. Function Blocks - SIMATIC TDC Edition 12.2004 24,0 1-13 Communication blocks 1.2.6 @PRODP Central block PROFIBUS DP coupling Symbol @PRODP module name.connector GV PROFIBUS address I baud rate I only slave functionality I host CPU monitoring time I Brief description CTS MAA BDR SLA LCC ECL ECO CDM QTS I I BO BO error class error code coupling status block status * 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. Mode of operation 1-14 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. Function Blocks - SIMATIC TDC Edition 12.2004 Communication blocks I/O 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) Configuringdata Computation time [s] CPU 550/551 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. Function Blocks - SIMATIC TDC Edition 12.2004 24,0 1-15 2 Service-/diagnostic blocks 2.1 MSTAT Displays the status of all modules in the rack Symbol MSTAT P01 P02 P03 P04 P05 P021 W W W W W Operating status, module slot 1 Operating status, module slot 2 Operating status, module slot 3 Operating status, module slot 4 Operating status, module slot 5 W Operating status, module slot 21 The slot always means the configured slot. Brief description 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. Mode of operation This function block evaluates the module status information from the buffer memory and provides it at its outputs coded as follows: 0: 1: 2: 3: 4: 5: Boot phase Initialization phase Cyclic operation (RUN) User stop Stop due to initialization error Stop due to system error I/O Px Operating status of the module at slot x (1 _ x _ 21) Configuring data Computation time [s] CPU550/CPU551 Can be configured in Interrupt tasks Cyclic tasks Executed in Initialization mode Normal mode Special features - Function Blocks - SIMATIC TDC Edition 03.2003 8 2-1 Service-/diagnostic blocks 2.2 MSTATB Displays the status of all modules in the rack Symbol MSTATB P01 P02 P03 P04 P05 P021 Brief description BO BO BO BO BO Operating status, module slot 1 Operating status, module slot 2 Operating status, module slot 3 Operating status, module slot 4 Operating status, module slot 5 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. Mode of operation 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 I/O Px Operating status of the module at slot x (1 _ x _ 21) Configuring data 2-2 Computation time [s] CPU550/CPU551 Can be configured in Interrupt tasks Cyclic tasks Executed in Initialization mode Normal mode Special features - 8,0 Function Blocks - SIMATIC TDC 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 Symbol AFC hardware address mode of operation offset compensation scalling factor trigger adjustment type Brief description GV I R R BO BO AD MOD OFF SF TR ADJ Y QF YF R measured value BO group error message W error ID * 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. Mode of operation 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= with: 1 t i 5V ti 0 U(t)dt SF - OFF 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. Function Blocks - SIMATIC TDC Edition 03.2003 3-1 Input/output blocks The permissible sampling time is limited due to the measuring technique used. The following is valid: 1 ms <= TA <= 130 ms. Block diagram ADJ AD f f # * - MOD SF OFF TR TRG Y QF YF TRG - binary signal input via the front panel Operating modes 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). 3-2 Function Blocks - SIMATIC TDC Edition 03.2003 Input/output blocks Init. mode First system mode 2 1 3 This trigger has no effect on the result This trigger starts the first measuring time Meas. time n Meas. time n+1 This trigger is suppressed Meas. time n+2 - Trigger signal - AFC Operating mode 2 Adjustment The adjustment is controlled via binary input ADJ: ADJ Adjustment type 0 No adjustment 0>1 Adjustment in the current sampling cycle 1 Adjustment 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. Resolution The V/f/D conversion has, due to the measuring technique, a resolution of A ( V) = With Function Blocks - SIMATIC TDC Edition 03.2003 ( U + 20)[ V] fc t i fc = 16 MHz and ti dependent on the operating mode MOD 3-3 Input/output blocks Fault messages 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. 3-4 Function Blocks - SIMATIC TDC Edition 03.2003 Input/output blocks I/O AD Hardware address 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) Y Output (default: 0.0) QF Group error message (default: 0) YF Error ID (default: 16#0000) Configuringdata (no default) Computation time [s] CPU 550/551 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 Function Blocks - SIMATIC TDC Edition 03.2003 1,0 3-5 4 Closed-loop control blocks 4.1 INT_M Modulo integrator for axis cycle correct integration Symbol INT_M Modulo value Input Numerator, ratio Denominator, ratio Setting value Reset Set Hold Brief description Mode of operation DI DI DI DI DI BO BO BO MOD X NM DN SV R S H Y QP QN YF DI BO BO W Output Positive oberflow Negative overflow Block error status 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. I/O 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) (default: 1) NM X may not exceed 231 , value range: - 2 30 to + 2 30 DN Denominator value for the ratio (gearbox factor), (default: 1) value range: - 2 30 to + 2 30 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) Function Blocks - SIMATIC TDC Edition 12.2003 4-1 Closed-loop control blocks 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) Coded error output 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 Configuringdata 4-2 Significance 1 MOD > 2 30 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 - Function Blocks - SIMATIC TDC Edition 12.2003 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 Function Blocks - SIMATIC TDC Edition 12.2004 I-1