SIMATIC Sensors RFID systems FC 45 1 Introduction ______________ 2 Description ______________ SIMATIC Sensors RFID systems FC 45 Function manual 3 Parameterizing ______________ 4 Commissioning ______________ Error messages and troubleshooting 5 ______________ 6 Examples/applications ______________ Brief description of ASM hardware A ______________ Programming the MOBY-ASM on PROFIBUS B ______________ C Service & Support ______________ Release 03/2006 J31069-D0167-U001-A2-7618 Safety Guidelines This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are graded according to the degree of danger. Danger indicates that death or severe personal injury will result if proper precautions are not taken. Warning indicates that death or severe personal injury may result if proper precautions are not taken. Caution with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken. Caution without a safety alert symbol, indicates that property damage can result if proper precautions are not taken. Notice indicates that an unintended result or situation can occur if the corresponding information is not taken into account. If more than one degree of danger is present, the warning notice representing the highest degree of danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property damage. Qualified Personnel The device/system may only be set up and used in conjunction with this documentation. Commissioning and operation of a device/system may only be performed by qualified personnel. Within the context of the safety notes in this documentation qualified persons are defined as persons who are authorized to commission, ground and label devices, systems and circuits in accordance with established safety practices and standards. Prescribed Usage Note the following: Warning This device 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. Correct, reliable operation of the product requires proper transport, storage, positioning and assembly as well as careful operation and maintenance. Trademarks All names identified by (R) are registered trademarks of the Siemens AG. The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner. Disclaimer of Liability We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions. Siemens AG Automation and Drives Postfach 48 48 90437 NURNBERG GERMANY Order No.: J31069-D0167-U001-A2-7618 Edition 06/2006 Copyright (c) Siemens AG 2006. Technical data subject to change Table of contents 1 2 3 Introduction............................................................................................................................................. 1-1 1.1 Preface....................................................................................................................................... 1-1 1.2 Navigating in the Function Manual ............................................................................................ 1-2 Description.............................................................................................................................................. 2-1 2.1 Block specification ..................................................................................................................... 2-3 2.2 Configuration scheme ................................................................................................................ 2-5 2.3 Data structures of FC 45............................................................................................................ 2-6 2.4 Number of MOBY channels which can be connected ............................................................... 2-7 2.5 Addressing of MOBY channels .................................................................................................. 2-8 Parameterizing ....................................................................................................................................... 3-1 3.1 3.1.1 3.1.2 3.1.3 Parameter data block................................................................................................................. 3-1 INPUT parameters ..................................................................................................................... 3-3 Command and status word ........................................................................................................ 3-7 Further displays ....................................................................................................................... 3-10 3.2 3.2.1 3.2.2 3.2.3 MOBY commands.................................................................................................................... 3-11 Command parameters ............................................................................................................. 3-12 Command chaining .................................................................................................................. 3-17 Command repetition................................................................................................................. 3-19 3.3 3.3.1 3.3.2 3.3.3 Presence check and MDS control............................................................................................ 3-22 No MDS Control, No Presence Check: MDS_control = 0........................................................ 3-24 No MDS Control, Presence Control with Field Scanning: MDS_control = 1............................ 3-24 Field Scanning as MDS Control: MDS_control = 2.................................................................. 3-25 4 Commissioning ....................................................................................................................................... 4-1 5 Error messages and troubleshooting ...................................................................................................... 5-1 6 5.1 General errors ............................................................................................................................ 5-1 5.2 Error messages.......................................................................................................................... 5-2 Examples/applications ............................................................................................................................ 6-1 6.1 FC 45 scanning by user ............................................................................................................. 6-1 6.2 Processing of data memories/transponders .............................................................................. 6-2 6.3 Cyclic calling of FC 45 (e.g. in OB 1) ......................................................................................... 6-7 6.4 Programming a cold and warm restart....................................................................................... 6-8 6.5 Programming a module failure................................................................................................... 6-9 6.6 Data structure definition ........................................................................................................... 6-11 6.7 UDTs of FB 45 / FC 45 ............................................................................................................ 6-15 6.8 Determing the memory requirement in the SIMATIC............................................................... 6-20 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 iii Table of contents A B C iv Brief description of ASM hardware..........................................................................................................A-1 A.1 ASM 475.....................................................................................................................................A-1 A.2 ASM 473.....................................................................................................................................A-6 A.3 ASM 452...................................................................................................................................A-10 A.4 ASM 454...................................................................................................................................A-17 A.5 ASM 754...................................................................................................................................A-20 A.6 ASM 854...................................................................................................................................A-23 A.7 ASM 850...................................................................................................................................A-29 Programming the MOBY-ASM on PROFIBUS........................................................................................ B-1 B.1 Programming the MOBY-ASM on PROFIBUS DP-V1...............................................................B-1 B.2 Cyclic Control Word between Master and MOBY-ASM.............................................................B-5 B.3 Methods of operation with the ASM ...........................................................................................B-8 B.4 Command and acknowledgement telegrams...........................................................................B-13 B.5 PROFIBUS implementation .....................................................................................................B-22 B.6 Example of a PROFIBUS Trace ..............................................................................................B-25 Service & Support...................................................................................................................................C-1 C.1 Service & Support ......................................................................................................................C-1 C.2 Contacts .....................................................................................................................................C-1 C.3 Training ......................................................................................................................................C-2 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Table of contents Tables Table 2-1 Typical runtimes of FC 45 (cycle load of AS in ms) ................................................................... 2-3 Table 2-2 MOBY FC configuration scheme ............................................................................................... 2-5 Table 2-3 Number of MOBY channels ....................................................................................................... 2-7 Table 3-1 UDT 10 "MOBY Param"............................................................................................................. 3-2 Table 3-2 INPUT parameters ..................................................................................................................... 3-3 Table 3-3 Variables in command and status word..................................................................................... 3-8 Table 3-4 Displays.................................................................................................................................... 3-10 Table 3-5 UDT 20 "MOBY CMD" ............................................................................................................. 3-11 Table 3-6 Overview of commands ........................................................................................................... 3-12 Table 3-7 Write to MDS............................................................................................................................ 3-12 Table 3-8 Read MDS................................................................................................................................ 3-12 Table 3-9 Initialize MDS ........................................................................................................................... 3-13 Table 3-10 SLG status ............................................................................................................................... 3-14 Table 3-11 NEXT........................................................................................................................................ 3-14 Table 3-12 Terminate communication with MDS ....................................................................................... 3-15 Table 3-13 Antenna of write/read device ON/OFF..................................................................................... 3-15 Table 3-14 MDS status and diagnosis ....................................................................................................... 3-16 Table 3-15 DB 47 - declaration view .......................................................................................................... 3-17 Table 3-16 DB 47 - data view..................................................................................................................... 3-18 Table 3-17 Number of buffers on the ASM ................................................................................................ 3-20 Table 3-18 Field scanning as MDS control ................................................................................................ 3-25 Table 5-1 Classification of error messages................................................................................................ 5-2 Table 5-2 Error messages of the MOBY-ASM via the "error_MOBY" variable.......................................... 5-3 Table 5-3 Error variable "error_FC"............................................................................................................ 5-8 Table 5-4 Error variable "error_BUS" ....................................................................................................... 5-10 Table 6-1 Available memory capacities ..................................................................................................... 6-2 Table 6-2 UDT overview table.................................................................................................................. 6-15 Table 6-3 UDT 100 "MOBY MDS status"................................................................................................. 6-16 Table 6-4 UDT 110 "MOBY write/read device status" ............................................................................. 6-16 Table 6-5 UDT 120 "MOBY write/read device-Stat Diag 1" ..................................................................... 6-17 Table 6-6 UDT 130 "MOBY write/read device-Stat Diag 2" ..................................................................... 6-17 Table 6-7 UDT 140 "MOBY write/read device-Stat Diag 3" ..................................................................... 6-17 Table 6-8 UDT 260 "MDS status (mode 1, RF300)" ................................................................................ 6-18 Table 6-9 UDT 270: "MDS status (mode 2, RF300)" ............................................................................... 6-18 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 v Table of contents Table 6-10 UDT 280 "write/read device status (mode 6, RF300)" ............................................................. 6-19 Table A-1 Input parameters for ASM 475 ...................................................................................................A-2 Table A-2 Commands for ASM 475............................................................................................................A-3 Table A-3 Input parameters for ASM 473 ...................................................................................................A-7 Table A-4 Commands for ASM 473............................................................................................................A-7 Table A-5 Pin assignment of sockets X3, X4 .............................................................................................A-8 Table A-6 Setting of MOBY-relevant parameters .....................................................................................A-11 Table A-7 Input parameters for ASM 452 .................................................................................................A-11 Table A-8 Commands for ASM 452..........................................................................................................A-12 Table A-9 Control of the LEDs PRE/ERR1 and PRE/ERR2 ....................................................................A-15 Table A-10 LED indication for PROFIBUS diagnosis .................................................................................A-16 Table A-11 Input parameters for ASM 454 .................................................................................................A-18 Table A-12 Commands for ASM 454..........................................................................................................A-18 Table A-13 Processing times of MDS E6xx in multiple channel operation.................................................A-21 Table A-14 Input parameters for ASM 754 .................................................................................................A-21 Table A-15 Commands for ASM 754..........................................................................................................A-22 Table A-16 Input parameters for ASM 854 .................................................................................................A-24 Table A-17 Commands of the ASM 854 when MOBY_mode = B ..............................................................A-24 Table A-18 Input parameters for ASM 850 .................................................................................................A-30 Table B-1 Data record numbers (index) ...................................................................................................B-24 vi FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Introduction 1.1 1.1 1 Preface Purpose of this document This Function Manual contains all the information needed to configure and commission the system. It is intended both for programming and testing/debugging personnel who commission the system themselves and connect it with other units (automation systems, further programming devices), as well as for service and maintenance personnel who install expansions or carry out fault/error analyses. Scope of this documentation This documentation is valid for FC 45. The documentation describes the condition on delivery as of March 2006. Conventions The following terms/abbreviations are used synonymously in this document: * Reader, read/write device, write/read device * Tag, transponder, mobile data memory, MDS * Communication module, interface module, ASM History Previous editions of these operating instructions: Edition 03/2006 05/2005 03/2004 08/2002 12/2001 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 1-1 Introduction 1.2 Navigating in the Function Manual 1.2 1.2 Navigating in the Function Manual Structure of contents Contents Table of Contents Organization of the documentation, including the index of pages and chapters Introduction Purpose, layout and description of the important topics. Parameterizing Description of the parameter settings Commissioning Description of the commissioning procedure Error messages and troubleshooting Overview of error messages and troubleshooting guide Examples/applications Describes the application of FC 45 based on example applications. Appendix: Brief description of ASM hardware Description of the interface modules used for FC 45 Appendix: Programming the MOBYASM on PROFIBUS DP-V1 Information for control using a PC or third-party control system Appendix: Service & Support Service and support, contact partners, training centers 1-2 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 2 Description The FC 45 is a STEP7 function for MOBY identification technology. It can be used with both the SIMATIC S7-300 and S7-400 for various MOBY interface modules. $60 Figure 2-1 $60 $60$60 $60$60 $60 Interface modules for FC 45 Section "Brief description of ASM hardware" illustrates configurations with the various interface modules. The FC 45 can be operated in various different configurations: * The interface module is operated directly in a SIMATIC S7-300. * The interface module is located in the rack of an ET 200M or ET 200X. The ET200M/ET200X is used on an S7-300 or S7-400. * Since the interface module is a self-contained PROFIBUS slave, it is linked with the integrated PROFIBUS connection to a SIMATIC S7-300 or S7-400. These configurations can be mixed. Different interface modules can also be connected. Features of the interface For the features of the individual interface modules, see Section "Brief description of ASM hardware". Since the features of the individual ASMs are continuously being added to, you should always use the latest edition of this description. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 2-1 Description Performance features of FC 45 * All MOBY systems (write/read devices and MDSs) can be used with the FC 45. * The user can process a complete MDS with one command (up to 32KB). * The user can chain several commands together. This means that many small data areas of an MDS can be processed with one command start. * The data structures are set up conveniently via user-defined data types (UDTs). The UDTs are available with English (UDT 10, 20), German (UDT 11, 21) and Spanish (UDT 24) commentary. In this description, the UDTs are always referred to by their English designation (UDT 10, 20). * Transmission of the data to and from the ASM and execution of the commands on the ASM take place in parallel. This means optimal data throughput. * The use of symbolic names enhances the clarity in the user program, even where complex configurations are involved. PROFIBUS configuration A GSD file on the "Software MOBY" product (6GT2 080-2AA10) is included for the interface modules which can be connected directly to PROFIBUS. Technically, the FC 45 uses the PROFIBUS DP-V1 protocol. Important control data are cyclically sent in a data word. Actual MOBY data are transmitted in non-cyclic telegrams. Non-SIMATIC applications Applications programmed on third-party PLCs cannot use FC 45. The PROFIBUS interface for such applications is described in Section "Programming the MOBY-ASM on PROFIBUS DP-V1". Programmers of a remote controller can use this interface to develop their own MOBY function. The same or similar data structures as in FC 45 can be reproduced on a third-party PLC in conjunction with the FC 45 description and the UDTs. Requirements for using FC 45 The FC 45 can access the communication module (ASM) via any PROFIBUS master that has the system functions SFC 58/59. It is immaterial whether the PROFIBUS master is integrated into the S7-CPU or plugged into the rack as an add-on module (e.g. IM 467). Remember that the FC 45 uses non-cyclic message frames (SFC 58/59). Older CPUs of the SIMATIC family or a small model series may not have these services. Be sure to check this during configuration. * STEP7 Version The ASM 475 and ASM 473 modules require a STEP7 Version V5.1. 2-2 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Description 2.1 Block specification 2.1 2.1 Block specification Block number: FC 45 Block name: FC 45 Symbolic name: "MOBY FC" Family: - Work memory requirement: 7260 bytes Local data: 132 bytes Version: 2.6 Called blocks: SFC 58, SFC 59, SFC 20, SFC 21, SFC 1 Data block resources: MOBY Param = 300 bytes per channel (defined via UDT 10) Bit memories used: none Counters used: none Registers used: AR1, AR2 Call: cyclic Table 2-1 Typical runtimes of FC 45 (cycle load of AS in ms) S7-CPU Idle pass ASM Centrally in S7-300 Distributed ASM on PROFIBUS Read MDS Write MDS Read MDS Write MDS 3.4 3.6 315-2 DP 1.9 3.7 + n * 0.023 3.6 + n * 0.022 318-2 DP 0.13 1 + n * 0.01 1.3 + n * 0.007 0.4 0.45 416-2 DP 0.1 - - 0.35 0.38 315-2 PN/DP 317-2 PN/DP 318-2 PN/DP n = Amount in bytes of processed user data per read or write command When a command processes more than 233 bytes of MDS data, n = 233 must always be used in the table. Remarks: The times of the ASM for data communication with the data memories are described in the MOBY manual for configuration, mounting and service. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 2-3 Description 2.1 Block specification Calculating MOBY data throughput The formulas in the MOBY manual for configuration, mounting and service (Chapter 3) can be used to calculate data throughput with the FC 45. Configuration manuals are currently available for MOBY I (6GT2 097-4BA00-0EA2), MOBY E (6GT2 397-4BA00-0EA2), MOBY F (6GT2 497-4BA00-0EA2), MOBY U (6GT2 597-4BA00-0EA2) and MOBY D (6GT2 697-4BA00-0EA2). Applicable in general: t = k + t n k bytes tk Communication time between ASM, write/read device and MDS n k t bytes Amount of user data Constants (see table in configuration manual) Transmission time for 1 byte (see table in configuration manual) Transmission of the data to the MDS and transmission of the data between ASM and FC 45 take place in parallel. Usually no further time must be added for data transmission between ASM and FC 45 so that the time tk calculated above represents the total duration of the command. However, commands may require more time under the following conditions. * A very large number of MOBY channels are processed in parallel. * Very few (or only one) system resources are available for non-cyclic telegrams. * Slow transmission speeds are used on PROFIBUS. * Other applications are running on the S7 which require the non-cyclic telegram services (SFC 58/59) of the SIMATIC very frequently. 2-4 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Description 2.2 Configuration scheme 2.2 2.2 Table 2-2 Configuration scheme MOBY FC configuration scheme Ladder logic programming box MOBY FC Params_DB Parameters Data type Permissible range Description Params_DB INT 2 to 32767 Parameter data block number for a MOBY channel (write/read device) Params_ADDR INT 0, 300, 600,*... Address pointer in the parameter data block to the start of a UDT 10 Params_ADDR *) These values are exemplary whenever only data structures of the UDT 10 type are arranged in succession. These values change if UDT 10 is followed by the MOBY command (UDT 20). Params_DB and Params_ADDR form a pointer to a data structure. This data structure is defined by calling UDT 10 (English) or UDT 11 (German). A separate data structure must be defined for each MOBY channel (ASM or write/read device). See also Data structures of FC 45 (Page 2-6) FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 2-5 Description 2.3 Data structures of FC 45 2.3 2.3 Data structures of FC 45 The following figure shows an example of a definition of several MOBY channels with the related MDS commands and the user data. &DOOUHDGHU &DOOUHDGHU &DOO)& &DOO)& 3DUDPVB'% 3DUDPVB$''5 3DUDPVB'% 3DUDPVB$''5 &DOOUHDGHU &DOOUHDGHU &DOO)& &DOO)& 3DUDPVB'% 3DUDPVB$''5 3DUDPVB'% 3DUDPVB$''5 02% 32 KB. The data type here is WORD. 3-2 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.1 Parameter data block 3.1.1 INPUT parameters Table 3-2 INPUT parameters Variable Description ASM_address Logical base address of the ASM. This address must match the "start address" of the ASM in HW Config of the SIMATIC Manager. Remember that this address has nothing to do with the PROFIBUS address which is set on the ASM or the ET 200M. ASM_channel Number of the MOBY channel which is to be used ASM type Value range ASM 475, 452 ASM 454, 754, 854 ASM 473, 850 command_DB_ number command_DB_ address MDS_control 1, 2 1, 2, 3, 4 1 These INPUT parameters can be changed whenever ready = 1. An init_run does not need to be executed after Address within the "command_DB". The next MDS command starts at this address. "command_DB_number" changing these parameters. and "command_DB_address" form a data pointer to the next command (see Section "Configuration scheme"). Number of the data block in which the MDS command is specified MDS_control turns on/off the presence check or the MDS control on the ASM (see Section "Presence check and MDS control"). Value MDS control ASM type 0 Presence check is off. The variable ANZ_MSD_present doesn't indicate a valid value. all 1 Presence check is on. MDS control is off. The variable ANZ_MDS_present indicates an MDS is the transmission window of a write/read device. all 2 Presence check is on. MDS control is on, and control takes place with the presence check of the MDS. The NEXT command must be sent to the ASM each time an MDS is processed. 454 ECC_mode Turns ECC mode on (true) or off (false). Remember that ECC mode can only be used with MOBY I. RESET_long The init_run command transfers all INPUT parameters to the ASM. This bit must be set to TRUE when MOBY U/D or RF300 are used (MOBY_mode = 5). MOBY_mode Setting of the MOBY operating mode Value Operating mode FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 ASM type 3-3 Parameterizing 3.1 Parameter data block Variable Description 0 Default -; Reserved for setting the operating mode with switch or GSD parameterization. Various interfaces without switches interpret MOBY mode = 0 as MOBY I mode. 1 MOBY I or MOBY E (without MDS 507) all 4 MOBY I with MDS 507 452; 454 5 MOBY U/D or RF300 - without multitag handling 475; 473; 452 6 Res. for MOBY U - with multitag handling (FB 55) - 7 Res. for MOBY D or RF300 - with multitag handling - (FB 55) 8 MOBY I dialog 454; 452 9 MOBY V 452 A MOBY F with MDS F1xx 475; 473: 452; 854; 850 B MOBY F with MDS F4xx 475; 473: 452; 854; 850 C MOBY F (res. for MDS F2xx) - The following should be carefully noted: MOBY_mode may only be changed after an ASM is turned on. scanning_time MOBY I/V: Scanning_time is the scanning time for the MDS 507 of MOBY I and MOBY V. A value of 00 can be used here for all other types of MDS. The scan time setting (ABTA) is shown below (see also configuration manual of write/read device 44/MDS 507). %LW 7LPHYDOXH) 7LPHIDFWRU V V V V Example: A scanning time of 1 second results in ABTA = 81 hex for the parameter. 3-4 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.1 Parameter data block Variable scanning_time Description MOBY U: Scanning_time describes the standby time for the MDS. If the MDS receives an additional command before scanning_time has expired, this command can be executed immediately. If the MDS receives a command after scanning_time has expired, command execution is delayed by sleep_time of the MDS. Scanning_time should only be set when both of the following conditions exist. * The MDS uses several commands and * command execution must be concluded within a minimum time. 00 hex = no standby time (default) 01 hex = 7ms standby time 02 hex = 14ms standby time : C8 hex = 1400ms standby time Remember: Scanning_time affects the life of the battery. The longer scanning_time is, the shorter the life of the battery. For precise calculations, see the MOBY U manual for configuration, mounting and service. MOBY D or RF300: 00 hex (reserved) option_1 This byte is bit-coded. Its standard value is B#16#0. It can be used for special control on the ASM. %LW (5535( /('FRQWURO $60 VHH $SSHQGL[ 7KHIODVKLQJRIWKH(55/('LVUHVHWE\DQ LQLWBUXQ 2QWKH5)WKLVRSWLRQDOVRUHVHWV WKH(55B/('RQWKHUHDGHU $Q0'6FRPPDQGLVUHSRUWHGZLWKDQHUURU LIWKHUHLVQR0'6LQWKHILHOG 02%<,RQO\ WHVWPRGHPXVWQRWEHVHWLQQRUPDORSHUDWLRQ 02%<,RQO\ FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-5 Parameterizing 3.1 Parameter data block Variable distance_limiting Description MOBY U: Range limitation Normal transmission power 05 hex = 0.5 m 0A hex = 1.0 m 0F hex = 1.5 m 14 hex = 2.0 m 19 hex = 2.5 m 1E hex = 3.0 m 23 hex = 3.5 m Reduced transmission power 85 hex 8A hex 8F hex 91 hex 99 hex 9E hex A3 hex Reduced sending capacity must be set when several write/read devices are positioned close together or when data memories which are located in the vicinity of a write/read device are detected later or not at all. Disadvantage: The field lobe becomes smaller and there is less time for communication or positioning must be more precise. MOBY D: HF power from 0.5 W to 10 W in increments of 0.25 W 02 hex = 0.5 W : 10 hex = 4 W (default) : 28 hex = 10 W RF300: 00 hex (reserved) multitag MOBY U/D or RF300: Maximum number of MDSs being processed in parallel in the field. Permissible values: 1 field_ON_control MOBY U: BERO mode; automatic activation/deactivation of antenna field. The "Antenna ON/OFF" command is superimposed by the BERO mode. 00 hex 01 hex = = 02 hex = 03 hex = No BEROs; no write/read device synchronization One or two BEROs The BEROs are logically ORed. The field is ON during actuation of a BERO. One or two BEROs. The 1st BERO switches the field on and the 2nd BERO switches the field off. If two BEROs exist and a field_ON_time is configured, the field is automatically deactivated if the 2nd BERO does not switch within that BERO time. If no field_ON_time is configured, the field remains on until the 2nd BERO is actuated. Activate write/read device synchronization via cable connection (see manual for configuration, mounting and service for MOBY U) MOBY D or RF300: 00 hex (reserved) field_ON_time MOBY U: Time for BERO mode (field_ON_control = 02) 00 hex = 01 hex ... FF hex = Timeout monitoring is deactivated. The 2nd BERO is needed in order to switch the field off. 1 ... 255s turn on time for the write/read device field. = = I-Code 1 (e.g. MDS D139) ISO transponder MOBY D: MDS type 00 hex 01 hex RF300: 00 hex (reserved) reserved0 Reserved The permissible values of the INPUT parameters are listed in the hardware specifications. 3-6 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.1 Parameter data block 3.1.2 Command and status word The control bits of FC 45 are defined in the command and status word. The command and status word and the variables are generated using UDT 10. The variables and the associated relative addresses in UDT 10 are shown in the following figure. '%: '%%UHODWLYHDGGUHVVLQ8'7 '%% FDQFHObbbbbbbbbbbb FRPPDQGBVWDUW UHSHDWBFRPPDQG LQLWBUXQ $60BIDLOXUH )&BDFWLYH $1=BQH[W $1=BUHVHW $1=B0'6BSUHVHQW $1=BFDQFHO $1=B(&& 7REHVHWE\WKHXVHU UHVHUYHG /5BEDW EDWWHU\BORZ 0XVWEHVFDQQHGE\WKHXVHU 2SWLPXPVFDQELWV HUURU UHDG\ Figure 3-1 Assignment of the command and status word (DBW 18) with variable names FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-7 Parameterizing 3.1 Parameter data block Table 3-3 Variables in command and status word Variable Description cancel True = Interrupts a running command or a command chain. FC 45 then sets the "ready" variable. MOBY U/D: The cancel variable is not available. A command termination must be executed via the init_run variable. command_start True = Starts a command or a command chain repeat_command True = Command repetition: The last command or command chain stored on the interface module is processed again with the next MDS. Command processing for the MDS is not started until the MDS, which has already been processed, has left the transmission window (ANZ_MDS_present = 0) and a new MDS has entered the transmission window of the write/read device (ANZ_MDS_present: 0 1). False = No command repetition or command repetition is stopped after the command started with the repeat command has been processed. Remember that this bit must be reset by the user to stop command repetition. The result of command repetition is fetched when command_start is set by the user. repeat_command is not automatically reset by the FC 45 after command processing. The init_run and cancel commands reset the repeat_command variable. This also interrupts a command repetition on the ASM. repeat_command can be set again by the application with the next command_start. Handling of command repetition is described in Section "Command repetition". init_run True = Restart interface module FC 45 is reset and the interface module is initialized. All data and commands on the ASM are lost. This bit must be set in the restart OB (OB 100) for each MOBY channel or interface module. After a MOBY-ASM failure, error_MOBY=0F is signaled to the user. The user must then execute an init_run. Note: * The init_run bit is initialized with TRUE when a parameter data block is downloaded from the programming device to SIMATIC. This causes an automatic new start for the ASM. * The execution time of init_run is normally in the millisecond range. In the event of an error, the time may be up to 40s. ASM_failure True = The ASM has failed. This bit is set by the user in OB 122 (see Section "Programming FC45_active FC 45 is currently executing a command. This variable is set when the command is started (command_start=True) and remains active until * FC 45 has received the last acknowledgment from ASM. * the init_run bit has been set * The Cancel bit was set. * An error message was reported from the ASM. ANZ_next This bit is set when the last command executed was a NEXT command. ANZ_reset This bit indicates that the last command to be executed was a RESET. The RESET command was started by the user with "init_run." 3-8 a module failure"). FC 45 signals an error to the user (error_FC = 09) and interrupts a command in progress. If OB 122 is not programmed by the user, the PLC switches to the STOP state on an interface module failure. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.1 Parameter data block Variable Description ANZ_MDS_present Indicates the presence of an MDS in the write/read device's transmission window. ANZ_MDS_present is only indicated when the INPUT parameter MDS_control (see Section "INPUT parameters") was set by the user. Remember that when an init_run is being executed, the ANZ_MDS_present indication disappears briefly even when an MDS is permanently located in the transmission window. ANZ_cancel The last command executed was a command interruption (cancel). The bit is set when the ASM indicates a cancel acknowledgment with the cyclic word (see Section "Cyclic control word between master and MOBY-ASM"). The bit is reset automatically when a new command is started. ANZ_ECC MOBY I only: When the ECC driver is on (INPUT parameter "ECC mode" = TRUE), the bit indicates that the data read by the MDS have been corrected. ANZ_ECC is not an error message since the data are okay. ANZ_ECC is an indication that the MDS memory just processed may soon fail completely. reserved Not used at this time LR_bat This bit only applies when MDS is used with MOBY I. It indicates that a dialog battery of the MDS507 is dead. With all other MDSs, this bit can assume any state. battery_low Only with MOBY I/V with RAM-MDS: The back-up battery of the RAM-MDS is below the threshold value. Although, at room temperature, it will continue functioning with its remaining capacity for several months, we recommend changing the MDS's battery immediately or, when its battery cannot be changed, replacing the entire MDS. error FC 45 sets this bit if a command is terminated abnormally. The error bit is the checksum error bit for all errors which occur. The exact cause of the error is stored in variable error_ MOBY, error_FC or error_BUS (see Section "Further displays" and Section "Error messages and troubleshooting"). The error bit is reset when a command is restarted. ready Ready message: error bit = FALSE must be checked after ready = TRUE is signaled. This ensures that the command was executed normally. Note: The ready bit does not need to be set in order to start init_run or cancel. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-9 Parameterizing 3.1 Parameter data block 3.1.3 Further displays Table 3-4 Displays Variable Description ASM_busy This bit is set when the ASM is processing a command. "ASM_busy" is normally inverse to "ready". The interface module signals ASM_busy via the cyclic word (see Section "Cyclic control word between master and MOBY-ASM" under "ASM_busy_"). When the repeat_command automatic command start is used, this bit shows the processing of a new MDS with the command to be executed. MOBY U/D: No meaning. This variable is always false. command_rep_active The ASM is processing a command repetition. The bit is set as a response to the control variable repeat_command. After an init_run, command_rep_active is first reset by FC 45 and then set again after a delay following the transfer of the MOBY commands to the ASM by FC 45. number_MDS MOBY U/D: The number of MDSs presently located in the transmission window is indicated. If more than 15 MDSs are located in the field, number_MDS is indicated as 0F hex. error_MOBY This error was reported by the ASM. The error is usually displayed on the ERR LED of the ASM channel display (see Section "Error messages and troubleshooting"). error_FC Error messages from FC 45 (see Section "Error messages and troubleshooting") error_BUS The transmission path between FC 45 and ASM reports an error. It is usually a PROFIBUS error. (see Section "Error messages and troubleshooting" ). This error is signaled by system functions SFC 58/59. version_MOBY Indicates the firmware version of the MOBYASM. The value entered here is updated each time the ASM starts up. It is ASCII-coded. ([DPSOH '%% '%% KH[ KH[ 9HUVLRQ All other variables of UDT 10 are for FC-internal use. They must never be changed by the user. 3-10 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.2 MOBY commands 3.2 3.2 MOBY commands Note This chapter provides a description of all commands which can by processed by FC 45. The commands, which can actually be processed by the interface module you are using, are described here. Before you can start a MOBY command with command_start, you need to define the command. UDT 20 (commentary in English), UDT 21 (commentary in German) or UDT 24 (Spanish commentary) is available for the simple definition of a command. Table 3-5 Address UDT 20 "MOBY CMD" Name Type Initial value Comment +0.0 +1.0 command sub_command BYTE BYTE B#16#2, B#16#0 length INT * 1 +4.0 address_MDS WORD W#16#0 +6.0 +8.0 =10.0 DAT_DB_number DAT_DB_address INT INT * END_STRUCT 48 0 MDS: 2 = read, 1 = write INIT = bit pattern; END, SET, MDS, SLG=mode Amount of data to be written/read in bytes Start address on MDS, memory size for INIT; date for MDS Number of DAT_DB, data for MDS Pointer to start word in DAT_DB +2.0 0.0 STRUCT *) UDT 70 (data type WORD instead of INT) must be used for MDS/transponder memory > 32 KB. The "length" value is then specified in hexadecimal notation. The "actual value" of the variables can be modified using the editor in the data view of the DB or in the STEP 7 application program. Please note that the actual values can only be changed if no command is active (ready = 1). FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-11 Parameterizing 3.2 MOBY commands 3.2.1 Command parameters Overview of commands Table 3-6 Overview of commands Command Command [hex] normal chained* 01 41 Write data to MDS 02 42 Read data from MDS 03 43 Initialize MDS 04 44 SLG status 06 - NEXT 08 48 END; conclude communication with the MDS 0A 4A Antenna on/off 0B 4B MDS status *) Chained commands are not supported by all write/read devices or ASMs. Adhere to the information in the MOBY manuals for configuration, mounting and service. Write Table 3-7 Write to MDS Command [hex] 01 sub_command [hex] - length [dec] 1 to 32767 * length of the MDS data to be written address_MDS [hex] DAT_DB [dec] 0000 to FFFF The data are written to the MDS starting at this start address. Pointer to the user data which are to be written to the MDS Note *) When UDT 70 is used, "length" is specified as a hexadecimal value. The value range is then from 0001 to FFFF. A complete 64 KB transponder can thus be processed. Read Table 3-8 Read MDS Command [hex] 02 sub_command [hex] - length [dec] 1 to 32767 * length of the MDS data to be read address_MDS [hex] DAT_DB [dec] 0000 to FFFF The data are read from the MDS starting at this start address. Pointer to user data. FC 45 reads and stores the MDS data here. Note *) When UDT 70 is used, "length" is specified as a hexadecimal value. The value range is then from 0001 to FFFF. A complete 64 KB transponder can thus be processed. 3-12 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.2 MOBY commands Initialization Table 3-9 Command [hex] 03 Initialize MDS sub_command [hex] length [dec] 00 to FF, hex value - with which the MDS is written MDS type 1KB 2KB 8KB 8KB 32KB 752 bytes 192 bytes 16 bytes 2KB 32KB 44 bytes 112 bytes 256 bytes 1000 bytes 64 bytes 20 bytes 8KB 32KB 64KB MOBY I: MOBY I: MOBY I: MOBY I: MOBY I: MOBY E: MOBY F: MOBY F: MOBY U: MOBY U: MOBY D: MOBY D: MOBY D: MOBY D: MOBY D: RF300: RF300: RF300: RF300: address_MDS [hex] DAT_DB [dec] Note Memory size Init duration normal INIT duration with ECC 05 00 08 00 20 00 20 00 80 00 02 F0 00 C0 00 10 08 00 80 00 00 2C 00 70 01 00 04 00 00 40 00 14 20 00 80 00 FF 00 < 0.1 s 0.4 s 0.8 s 18 s 3s 0.8 s 2.2 s 0.25 s approx. 1 s approx. 1.5 s - 5s 20 s 54 s 75 s - - - - - approx. 0.2 s 0.3 s 1.2 s 2.4 s - Memory size of the MDS to be initialized VMDS ASM452 RAM FRAM EEPROM RAM/FRAM EEPROM EEPROM EEPROM RAM* RAM* MI-Code 1 ISO I-Code SLI ISO Tag-it HF-I ISO my-d ISO ST LRI512 EEPROM FRAM FRAM FRAM - *) The OTP memory is not initialized with this command. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-13 Parameterizing 3.2 MOBY commands SLG status Table 3-10 SLG status Command [hex] 04 sub_command [hex] length [dec] 01 = status after - UDT 1101 02 = status after UDT 1201 (last commands) 03 = status after UDT 1301 (error messages) 04 = status after UDT 1401 (MDS in field) 05 = status after UDT 150 (communication quality) 06 = Status after UDT 280 (diagnostics data) address_MDS [hex] - DAT_DB [dec] Pointer to result. The result is indicated with the respective UDT (see sub_command). Note MOBY U/D MOBY U MOBY U MOBY U MOBY U RF300 1) You will find the UDT description in Section "UDTs of FC45". NEXT Table 3-11 NEXT Command [hex] 06 sub_command [hex] - length [dec] - address_MDS [hex] - DAT_DB [dec] - Note NEXT: Processing of this MDS is finished. The NEXT command can also be used in a command chain (see Section "Command chaining"). However, the NEXT command must always be the last command in the chain. 3-14 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.2 MOBY commands END Table 3-12 Command [hex] 08 Terminate communication with MDS sub_command [hex] 00 = Processing with MDS has terminated length [dec] address_MDS [hex] - DAT_DB [dec] - - 01 = Processing pause with MDS1 Note ANZ_MDS_present is reset. ANZ_MDS_present remains set. 1) MOBY U: This command is recommended when scanning_time parameter is greater than 0 (standby time). Use of this command optimizes the life of the MDS battery. An additional MDS command must now wait for sleep_time of the MDS to expire again. Antenna on/off Table 3-13 Command [hex] 0A Antenna of write/read device ON/OFF sub_command [hex] 01 = antenna on length [dec] - 02 = stand-by; antenna off 09 = match antenna to environment (FFT) address_MDS [hex] - DAT_DB [dec] - Note The "antenna on/off" command connot be started by command repetition (see Section "Command repetition"). Write/read device 80 only (MOBY F) Only for MOBY F/U/D: This command is not needed for normal operation because, when a write/read device is turned on, its antenna is always on. The antennas must be turned off when two sensitive write/read devices are positioned very close to each other. The application software must ensure that only one antenna is on at a time. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-15 Parameterizing 3.2 MOBY commands MDS status Table 3-14 Command [hex] 0B 3-16 MDS status and diagnosis sub_command [hex] length [dec] address_MDS [hex] DAT_DB [dec] Note 00 = status and diagnosis - Today's date (week/year) for calculating the battery life (e.g. 1401 hex = 20th week of the year 2001) Pointer to result. The result is presented with UDT 100. Only MOBY U (see Section "UDTs of FC 45") 01 = type and write protection status - - Pointer to result. The result is presented with UDT 260. RF300 02 = diagnostic data - Pointer to result. The result is presented with UDT 270. RF300 - (see Section "UDTs of FC 45") (see Section "UDTs of FC 45") FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.2 MOBY commands 3.2.2 Command chaining Command chaining permits various address areas of the MDS to be processed by starting just one command. The advantage of command chaining is the optimum speed at which commands can be processed on the ASM. A command chain is set up by the user by storing a succession of UDT 20s in a DB. The chained commands must all be command type 4x. The last command in a chain must be type 0x. The FC 45 uses this to detect the end of a command chain. Example: An MDS is to process 4 data records. The command structure is stored in DB 47. The MDS data are stored consecutively in DB 48. Read MDS address 0000 hex Length 600 Read MDS address 1000 hex Length 100 Read MDS address 1200 hex Length 1 Write MDS address 1200 hex Length 1 Execution steps: 1. Define structure Table 3-15 DB 47 - declaration view Partial command STRUCT Partial command ARRAY [1 ... 4] Partial command UDT 20 Partial command END_STRUCT Note: 1 ... 4 = No. of partial commands 2. Specify the "starting values" in the data view FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-17 Parameterizing 3.2 MOBY commands Table 3-16 DB 47 - data view Name Initial value Comment Partial command [1].command Partial command [1].pattern Partial command [1].length Partial command [1].adress_MDS Partial command [1].DAT_DB_number Partial command [1].DAT_DB_address 42 00 600 0000 48 0 Read command; followed by another command Partial command [2].command Partial command [2].pattern Partial command [2].length Partial command [2].adress_MDS Partial command [2].DAT_DB_number Partial command [2].DAT_DB_address 42 00 100 1000 48 600 Read command; followed by another command Partial command [3].command Partial command [3].pattern Partial command [3].length Partial command [3].adress_MDS Partial command [3].DAT_DB_number Partial command [3].DAT_DB_address 42 00 1 1200 48 700 Read command; followed by another command Partial command [4].command Partial command [4].pattern Partial command [4].length Partial command [4].adress_MDS Partial command [4].DAT_DB_number Partial command [4].DAT_DB_address 01 00 1 1200 48 701 Write command, last command in chain See also Command parameters (Page 3-12) 3-18 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.2 MOBY commands 3.2.3 Command repetition Operating principle After a new start (or init_run) of the ASM, the FC 45 transmits the command (or command chain) once to the ASM. Command transmission is automatic with the first command_start. This command (or the last command or the command chain) always remains intermediately stored in the ASM. If command repetition is started now, the intermediately stored command on the ASM is executed again, and the result(s) transferred to the FC 45. Advantages of command repetition * Data transmission on the (PROFI) BUS is minimized. This is particularly noticeable with extensive bus configurations and slow (bus) transmission speeds. * The ASM processes each MDS independently of the FC 45. In concrete terms, this means each MDS is processed even in applications with a very fast sequence of MDSs. This takes place no matter what the (PROFI) BUS speed. * Total data throughput is increased considerably particularly with controllers which have few system resources for non-cyclic telegrams. * Use of command repetition to read fixed-code MDSs also has its advantages (see Section "Processing of data memories"). FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-19 Parameterizing 3.2 MOBY commands Programming There are two programming methods. * Reading (processing) each MDS which comes by. After the ASM is programmed with a command, repeat_command is set and remains set. The following diagram shows the primary states. UHDG\ FRPPDQGBVWDUW UHSHDWBFRPPDQG $60BEXV\ $1=B0'6BSUHVHQW 7KHXVHUVWDUWVKLVKHUFRPPDQG IDVWHUWKDQWKH0'6VFDQSDVVWKH ZULWHUHDGGHYLFH 7KHUHVXOWLVDYDLODEOHWRWKHXVHU UHDG\ LPPHGLDWHO\DIWHUWKH FRPPDQGLVSURFHVVHG $60BEXV\ Figure 3-2 7KH0'6VSDVVE\WKHZULWHUHDG GHYLFHIDVWHUWKDQWKHXVHUFDQIHWFK WKHUHVXOWV,QVXFKFDVHVWKHUHVXOWV DUHLQWHUPHGLDWHO\VWRUHGRQWKH$60 7KHUHVXOWVDUHWKHQUHDGODWHU 5HVXOWVDUH IHWFKHGRQWKH $60 Continuous reading of each passing MDS/transponder (repeat_command remains set) When permanent command repetition is used, data may be transferred to the FC 45 slower than new MDSs are being processed (fast MDS sequence, slow data transmission). In such cases, the results are intermediately stored on the ASM. The ASM has a number of buffers for this intermediate storage. When the buffers are full and the FC 45 has not fetched data and additional MDSs arrive, these MDSs are no longer processed. Table 3-17 Number of buffers on the ASM ASM type ASM 475/473 ASM 454 ASM 754 ASM 854 ASM 452 Write/read device U92* Write/read device D10 RF300 No. of buffers per channel 70 39 9 39 3 150 100 246 Max. user data which can be processed with command repetition 16310 bytes 9087 bytes 2097 bytes 9087 bytes 699 bytes 34950 bytes 23300 bytes 57318 bytes *) The number of buffers described here can always be used by MOBY U regardless of the ASM type. One buffer can hold up to 233 bytes of user data. 3-20 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.2 MOBY commands * Specific reading (processing) of an MDS. The user starts the processing of each new MDS in his/her application. The following time diagram illustrates this principle. UHDG\ FRPPDQGBVWDUW UHSHDWBFRPPDQG $60BEXV\ $1=B0'6BSUHVHQW 7KHIROORZLQJVHTXHQFHPXVWEHSURJUDPPHGE\WKHXVHU 7KHXVHUVHWVFRPPDQGBVWDUWDQGUHSHDWBFRPPDQGVLPXOWDQHRXVO\DWWKHVWDUWRIWKHFRPPDQG 7KHXVHUZDLWVIRU$60BEXV\ DQGWKHQUHVHWVUHSHDWBFRPPDQG 7KHFRPPDQGKDVEHHQSURFHVVHGDIWHUUHDG\ LVUHSRUWHGE\WKH)&1RIXUWKHU0'6VDUH SURFHVVHGDXWRPDWLFDOO\E\WKH$60 Figure 3-3 Starting specific reading with repeat_command by the user FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-21 Parameterizing 3.3 Presence check and MDS control 3.3 3.3 Presence check and MDS control Various operating modes can be parameterized for MDS control (with parameter MDS_control). The exact interaction between these modes for the following components: * Presence check * MDS control * Next command is described in this chapter. In its default state, the ASM uses presence check and no MDS control. Presence check The presence check is a piece of logic in the MOBY-ASM's firmware which recognizes whether a mobile data memory is in the transmission window of the write/read device. It can be controlled with various mechanisms. The selection is performed with parameter MDS_control. A mechanism is currently available. Field scanning (MDS_control = 1, 2): The ASM's firmware continuously scans its surroundings via the magnetic field to determine whether a mobile data memory is present. A hysteresis during field scanning suppresses most of the switching back and forth of ANZ_MDS_present when a mobile data memory stops on the border of the field. Presence A mobile data memory is located in the field of the write/read device. The presence bit (ANZ_MDS_present in command and status word) is set (see Section "Command and status word). The presence display is usually implemented via the PRE LED on the front of the ASM (see Section "Brief description of ASM hardware"). MDS control MDS control is turned on when "MDS_control = 2" is set. MDS control is an option of the firmware of the ASM. It synchronizes the MDSs in the material flow with the user program. It supplies an error message when synchronization is lost. The following are considered asynchronous. * MDS whose command was not fully processed by the ASM leaves the transmission window. * MDS which is moving through the transmissionn window but is not processed by the user program. An enabled MDS conrtol forces use of the NEXT command in the application. 3-22 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.3 Presence check and MDS control NEXT command The Next command switches ASM control to the next mobile data memory. The Next command must always be programmed when MDS control is used (MDS_control = 2). After the ASM acknowledges the Next command, a read/write job for the next MDS can be sent immediately to the write/read device. The new command waits on the ASM until the old MDS has left the field and a new one has entered. This type of programming makes it possible to execute an ASM command as soon as an MDS enters the field of the write/read device. It can be very advantageous to add the NEXT command at the end of a command chain (see Section "Command chaining"). See also INPUT parameters (Page 3-3) FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-23 Parameterizing 3.3 Presence check and MDS control 3.3.1 No MDS Control, No Presence Check: MDS_control = 0 The magnetic field of the write/read device is not turned on unless a valid MDS command (read, write, initialize) is started. After a data memory has been detected and the command has been executed, the write/read device is turned off again. This makes it possible to implement projects in which the distance from one write/read device to another write/read device may be less than specified. Prerequisite: the write/read device stations which are close to each other must be addressed in multiplex mode. This may become necessary in applications in which large amounts of data must be transferred in dynamic operation. Stopping the conveyor belt can be avoided by dividing up the data and spreading it over several write/read devices. Note The NEXT command cannot be used when the MOBY-ASM is run with MDS_control = 0. If NEXT is started anyway, the error message error_MOBY = 10 hex is generated. 3.3.2 No MDS Control, Presence Control with Field Scanning: MDS_control = 1 In this mode, the field of the selected write/read device is always on. As soon as an MDS moves into the field of the write/read device, this is indicated to the user via the ANZ_MDS_present bit (see Section "Command and status word"). The user can then start a command at any time. There is no error message if the MDS leaves the field during processing. Note The NEXT command cannot be used when the MOBY-ASM is run without MDS control. If NEXT is started anyway, the error message error_MOBY = 10 hex is generated. 3-24 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Parameterizing 3.3 Presence check and MDS control 3.3.3 Field Scanning as MDS Control: MDS_control = 2 After a new start or a restart of the AS or after a new start or RESET command of the FC 45, the write/read device is turned on and remains active until the AS or ASM is turned off. The ASM continuously scans the field around the write/read device for the presence of a data memory. When the ASM detects a data memory, the ANZ_MDS_present bit is returned to the user during the next bus cycle or FC call. Similarly, ANZ_MDS_present becomes 0 when the data memory moves out of the write/read device's field. If the data memory stops exactly on the border of the magnetic field of the write/read device, there is no danger of ANZ_MDS_present switching back and forth continuously. This hysteresis function is handled by the processor on the ASM. Read/write commands can be sent to the FC 45 with complete transparency for the MDS control. The ANZ_MDS_present variable also retains complete validity after the start of a command. Table 3-18 Field scanning as MDS control % :ULWHUHDG GHYLFH F / K PP GHSHQGVRQ0'6W\SH E +\VWHUHVLVILHOGIRU 0'6FRQWURO K D 0'6 'LUHFWLRQRIPRWLRQRI 0'6 7UDQVPLVVLRQZLQGRZ 'DWDH[FKDQJHEHWZHHQ 0'6DQGZULWHUHDGGHYLFH L, B: Dimensions of the transmission window of a write/read device at working distance to MDS (see MOBY I configuration manual) L = field length; B = field width h: Hysteresis: Area in which an ANZ_MDS_present bit which has been set once remains set a: Point at which the mobile data memory is detected by the write/read device. From this point on, the waiting MOBY command is processed with the MDS. ANZ_MDS_present remains set. b: The MOBY command must have been executed by this point since the data memory is leaving the transmission window. ANZ_MDS_present still remains set. c: Reset ANZ_MDS_present in control and status word. The MDS has left the transmission window of the write/read device. A command which has still not been processed is terminated, and ASM error 01 hex is generated. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 3-25 Parameterizing 3.3 Presence check and MDS control Time diagram UHDG\ $GGLWLRQDOFRPPDQGVRSWLRQDO FRPPDQGBVWDUW 5($' FRPPDQGBVWDUW 1(;7 LQLWBUXQ $1=B0'6BSUHVHQW $SSO\ SRZHU VXSSO\WR $60 5(6(7 FRPPDQGDIWHU $60 VVWDUWXS PHVVDJH QR 0'6SUHVHQW 0'6HQWHUV ZULWHUHDG GHYLFH V ILHOG 5HDGZULWH FRPPDQGV DUHH[HFXWHG E\ ZULWHUHDG GHYLFH $60KDV UHFHLYHGD 1(;7 FRPPDQG 0'6 OHDYHV ZULWHUHDG GHYLFH V ILHOG $FRPPDQG IRUDQHZ 0'6FDQEH VWDUWHGE\WKH )&)% 7KHVHHGJHVPXVWEHFRQWUROOHGE\WKHXVHU Figure 3-4 Time diagram for MDS_control = 2 ASM error messages Error 01 hex: The MDS leaves the write/read device's field while a command is being processed with this MDS. The command is aborted. The read data are invalid. With a write command, the data on the MDS may be inconsistent. Error 02 hex: No command is active on the ASM. During this time, an MDS passes through the write/read device's field shown above or command processing of the MDS is not concluded with NEXT. The error is reported during the next FC 45 command. Notice * The ASM is unable to determine whether an MDS passed through the complete field or whether the MDS moved into the field briefly and then backed out again. * When using field scanning, it is essential to maintain the distance between two write/read devices specified in the configuration guidelines (see manual on configuration, installation and service). 3-26 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 4 Commissioning 1st step: Install ASM in STEP 7 * ASM 475, 473: The installation program for the ASM 475, 473 must be executed once on the STEP 7 PC. * PROFIBUS-ASM: The GSD file (Siem809F.GSD for ASM 454, 754, 854, 850 or Siem80B6.GSD for ASM 452) must be linked to the device catalog with HW Config (Tools > Install new GSD...). 2nd step: Configure hardware in STEP 7 The configuration varies depending on which MOBYASM is being used. * ASM 475: Centralized configuration in S7-300 * ASM 475, 473: Distributed setup with PROFIBUS and ET 200M, ET 200X * ASM 452, 454, 754, 854, 850: Distributed setup with PROFIBUS The following figure shows the placement of the MOBY-ASMs in the hardware catalog. $60LQ FHQWUDOL]HG Figure 4-1 HJ$60LQ GLVWULEXWHG FRQILJXUDWLRQYLD $60 LQGLVWULEXWHG FRQILJXUDWLRQYLD Placement of the MOBY-ASMs in the hardware catalog FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 4-1 Commissioning When configuring the ASMs, make sure that the I address and the Q address have the same values. The value in the I address field must be copied later on into the ASM_address variable in the STEP 7 project. If a MOBY-ASM has more than one channel (e.g. ASM 475 = 2 channels, ASM 454 = 4 channels), the same I address must be used for every channel. The following figure shows an example of a hardware configuration: Figure 4-2 Example of a hardware configuration If the project is downloaded onto the hardware in this state (without the user program), the SIMATIC CPU and the PROFIBUS should switch to the RUN state. If they don't, continue with PROFIBUS trouble-shooting (check the PROFIBUS address settings on the ASM against the configuration in HW Config). 4-2 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Commissioning 3rd step: Set caracteristics of the ASM If the interfaces (e.g., ASM 452, 473, 475) are different, you can now set the basic function of the ASM (e.g., MOBY U, filehandler, etc.) in the object properties of the module. The object properties are shown in one of the following windows. The possible options are shown in the drop-down menus. $60REMHFWSURSHUWLHV Figure 4-3 $60REMHFWSURSHUWLHVDUH VWRUHGLQWKH*6'ILOH Configuring the object properties FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 4-3 Commissioning 4th step Process STEP 7 project This step is based on the sample program supplied with the system. * Copy the sample program for FC 45 into the new STEP 7 project. * Continue as shown below based on the number of MOBY channels (number of write/read devices). - Declare the UDT 10 in DB 45 and the associated MOBY command(s) (UDT 20) in DB 47 - Then display DB 45 in the "data view" of the editor and modify the "input parameters" in the "actual value" column. For simple commissioning of MOBYI/E, all you have to do is adjust parameters ASM_address and ASM_channel to the HW Config addresses. General requirement: All MOBY channels (write/read devices) use the same command (DB47) and the same data (DB48). :KHQFRPPLVVLRQLQJ02%<,( WKHYDOXHLVFRUUHFWKHUH 2WKHUZLVHWKLVYDOXHPXVWEH DGMXVWHG 7KHVHWZRYDULDEOHV PXVWEHPRGLILHGIRU HDFKFKDQQHO 7KHSRLQWHUWRFRPPDQGB'%FDQUHWDLQ WKHGHIDXOWYDOXHRQLQLWLDOFRPPLVVLRQLQJ Figure 4-4 Edit DB 45 * Edit OB 1 and program a cyclic FC 45 call for each channel; declare a bit memory for the command start for each MOBY channel. * Set the variable "init_run" in the parameter DB in OB 100 for each MOBY channel. 4-4 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Commissioning 5th step: Download and test the program * Download the project onto the SIMATIC CPU * Connect a write/read device of the parameterized MOBY type to each MOBY channel. * After restarting the SIMATIC CPU (STOP RUN), the CPU should not be in STOP mode. If the CPU does indicate STOP, you should continue by troubleshooting. This is done by evaluating the diagnostic messages of the CPU (function: destination system module status). The main causes of errors are: - There is a mismatch between the I/O address of the modules in HW Config and the ASM_address configured in the MOBY DB (UDT 10) or the ASM_address does not exist on the I/O. - A slave has failed and OB 122 is not programmed. * Since the default parameterization of the FC 45 is set with MDS_control = B#16#1, the presence check on the write/read device must already be active now. This is indicated by the flickering RxD LED on the ASM. If you now place an MDS in the transmission window of a write/read device, the PRE or ANW LED must go on. If the RxD LED does not go on, continue with trouble-shooting as described in the next point. * Checking operation using the programming device Use the "Modify variable" function to indicate the state of communication between FC 45 and ASM, examine errors and start commands. The following figure shows the necessary variables: It can be found in the sample project under the name "Status Channel 1": Figure 4-5 Variables for checking operation - VAT1 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 4-5 Commissioning The variables ready = TRUE and error = FALSE should now be indicated for each channel. If ready = FALSE: * This channel is not called in OB 100. * This channel is not processed cyclically by an FC 45 call in OB 1. If error = TRUE: * The exact cause of the error is stored in variable error_MOBY, error_FC or error_BUS. The error causes and their remedy are described in Section "Error messages and troubleshooting". The variable ANZ_MDS_present now indicates the presence of an MDS as soon as you place an MDS in the transmission window of the write/read device. This is the same indication as the PRE LED on the ASM. You can now start the configured MOBY command via the auxiliary variable "command_start" = TRUE. If there is no MDS in the write/read device's transmission window, the command remains in processing on the ASM for an indefinite length of time. This status is indicated by "ready" = FALSE in the "Modify variable" window. Now place an MDS in the transmission window. As soon as the MDS has been processed, the result is transferred to FC 45 and "ready" = TRUE is indicated. * Commissioning of the MOBY components is thus complete. You can now program your own MOBY application based on the sample program. 4-6 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Error messages and troubleshooting 5.1 5.1 5 General errors Automation system switches to STOP * OB 86 not programmed and a slave has failed. * A slave has failed, and OB122 is not programmed. The error does not occur until FC 45 is called. * The pointer Params_DB, command_DB or DAT_DB does not exist or is pointing to a nonexistent address area. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 5-1 Error messages and troubleshooting 5.2 Error messages 5.2 5.2 Error messages An error condition exists in FC 45 whenever the "error" variable is enabled on a channel. If this is the case, the exact cause of the error can be determined from variable "error_MOBY", "error_FC" or "error_BUS". Table 5-1 Classification of error messages Error variable error_MOBY Classification This error was reported by the MOBY-ASM / write/read device. There are two main reasons for this: * Communication between ASM and write/read device or between write/read device and MDS is faulty. * The ASM is unable to process the command. Error_MOBY is indicated on the ASM on the ERR LED with an appropriate flashing pattern. error_FC This error is signaled by FC 45. Main cause * There is a parameter error in "Params_DB" or "command_DB". error_BUS The transport layer of PROFIBUS is signaling an error. A PROFIBUS tracer and a PROFIBUS tester (BT 200; Order No. 6ES7 181-0AA00-0AA0) is an invaluable tool for accurate troubleshooting. The PROFIBUS system diagnostics can provide further information about the cause of the error. The error shown here is reported by the SFC 58/59 system function in the RET_VAL parameter. For a detailed description of the RET_VAL parameter, please refer to the SIMATIC S7 system manuals (see System software for S7-300/400). Notice When several error occur with chained commands, the "error variable" always indicates the first error detected. 5-2 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Error messages and troubleshooting 5.2 Error messages error_MOBY The ERR LED flashes when the ASM reports error messages. Table 5-2 Error messages of the MOBY-ASM via the "error_MOBY" variable Error code (B#16#..) Flashing of ERR LED 00 - Description No error Default value if everything is ok. 1x No error ASM has executed a start-up and is waiting for an init_run. 01 2x Presence error: The MDS has moved out of the write/read device's transmission window. The MOBY command was executed only partially. Read command: No data are transmitted to FC 45. Write command: The MDS which just left the field contains an incomplete data record. * Distance between write/read device and MDS not adhered to * Configuration error: The data record to be processed is too large (in dynamic mode) The next command is automatically executed on the next MDS. A read, write or NEXT command is possible. * With timeout: No MDS in field 02 2x Presence error: An MDS has passed by a write/read device without being processed by a MOBY command. Processing error: Command processing of an MDS (read and/or write) was not concluded with NEXT. This error message is not reported immediately. Instead, the ASM waits for the next command (read, write, NEXT). This command is immediately replied to with this error. This means that a read or write command is not processed. The next command is executed normally by the ASM again. An init_run from the FC 45 also resets this error state. Bit2 is set in parameter option_1 and no MDS is in the transmission window. 03 3x Error in the connection to the write/read device. Write/read device does not answer. * Cable between MOBY-ASM and write/read device is wired incorrectly or cable break. * The 24 V supply voltage is not connected or is not on or has failed briefly. * Automatic fuse on the ASM has blown. * Hardware defect * Another write/read device is in the vicinity or is active. * Interference on DI/DO, write/read device or PROFIBUS line * Execute init_run after error correction FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 5-3 Error messages and troubleshooting 5.2 Error messages Error code (B#16#..) Flashing of ERR LED 04 4x Description Error in MDS's memory The MDS has never been write-accessed or has lost the contents of its memory due to battery failure. * Replace MDS (if battery bit is set). * Install MDS with the STG. * Reinitialize MSD (see Section "Command parameter settings"). 05 5x Unknown command FC 45 is sending an uninterpretable command to the MOBY-ASM. * Command_DB contains invalid command parameters. * The command_DB was overwritten by the user * The MDS reported an address error. MOBY F: * Read/write area is protected by password. * FFT command can only be used when ANW check is off. 06 6x Field interference on write/read device The write/read device is receiving interference from its environment. * External interference field. The field of interference can be verified with the "inductive field indicator" of the STG. * The distance between two write/read devices is too small and does not correspond to the configuration guidelines * The connecting cable to the write/read device is defective or too long or does not comply with the specification * MOBY U: MDS has left the field during communication. * MOBY U: Communication between write/read device and MDS was terminated by interference (e.g., person/foreign body moving between write/read device and MDS). 07 7x Too many transmit errors The MDS was not able to correctly receive the command or the write data from the ASM even after several attempts. * The MDS is positioned exactly on the boundary of the transmission window. * Data transmission to the MDS is being affected by external interference. MOBY F: Another MDS was detected in the field while the command was being processed. 5-4 08 8x CRC sending error * The receiver monitor has detected at least one fault during transmission. - Cause same as error B#16#06. * MDS signaling CRC error frequently. - The MDS is positioned exactly on the boundary of the write/read device. - The hardware of the MDS and/or write/read device is defective. 09 9x Only during initialization: CRC error during acknowledgment receipt from MDS * Cause same as error B#16#06. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Error messages and troubleshooting 5.2 Error messages Error code (B#16#..) Flashing of ERR LED Description 0A 10x Only during initialization: MDS is unable to perform the initialization command. * MDS is defective. 0B 11x MOBY I: Only during initialization: Timeout during initialization of the MDS * The MDS is positioned exactly on the boundary of the transmission window. * The MDS needs too much current (defect). * For MDS 507 only: Check FC 45 parameters MOBY_mode and scanning_time 0C 12x 0D 13x MOBY U: Memory of MDS cannot be read correctly. Memory of the MDS cannot be write-accessed. * Memory of the MDS is defective. * EEPROM MDS was written too frequently and has reached the end of its service life * MOBY E: The MDS left the transmission window while being writeaccessed. The data on the MDS may be incorrect. Address error The address area of the MDS was exceeded. * The start address in command_DB is invalid at command start (see Section "Processing data memories") * The start address must be 40 hex for MOBY F (MDS F4xx). * The MDS is not the right type. * RF300: Attempted write access to write-protected areas (address area FF00 - FF90) 0E 14x ECC error (only possible when ECC_mode = TRUE) The data could not be read by the MDS. * Data of the MDS have been lost (MDS defective). * The MDS was not initialized with ECC driver. - Initialize MDS * MDS with EEPROM has reached the end of its service life. The data have been lost. - Replace the MDS * The MDS was moved out of the transmission window while being write-accessed. - The MDS is not positioned correctly. * Command to ASM was issued incorrectly by user. 0F 1x 15x Start-up message from ASM. The ASM was off and has not yet received a RESET command. * Execute an init_run * The same physical ASM channel is used in two (or more) UDT 10 structures. Check ASM_address and ASM_channel in all UDT 10 structures. Only with MOBY F: * Internal driver error. Repeat command. * FFT command was started with MDS F1xx in the field. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 5-5 Error messages and troubleshooting 5.2 Error messages 5-6 Error code (B#16#..) Flashing of ERR LED Description 10 16x 11 - 12 18x Internal ASM communication error * Connector contact problem on the ASM * Defective ASM hardware - Return ASM for repair * Start init_run command after error correction. 13 19x ASM / write/read device U does not have enough buffer to store the command intermediately. 14 20x Internal ASM / write/read device error * Program sequence error on the ASM * Turn power of ASM off and on again. * Start init_run command after error correction. * MOBY U: Watchdog errror on write/read device. 15 21x Wrong parameterization of the ASM/SLG * Check INPUT parameters in UDT 10 * Check parameters in HW Config * RESET command is parameterized incorrectly. * After a start-up, the ASM has still not received an init_run. 16 22x The FC command cannot be executed with the ASM parameters on PROFIBUS. * Length of the input/output areas too small for the cyclic I/O word. Did you use the right GSD file? * FC command (e.g., read) with too much user data (data length > 233 bytes). 17 23x Communication error between FC 45 and MOBY-ASM. Handshake error * Params_DB (UDT 10) of this ASM station is being overwritten by other parts of the program * Check parameters of MOBY-ASM in UDT 10 * Check FC 45 command which caused this error * Start init_run command after error correction. 18 - An error has occurred which must be acknowledged with an init_run. * A temporary short circuit has occurred on PROFIBUS. * The RESET command is faulty. * Start init_run command after error correction. * Check parameters ASM_address, ASM_channel, and MOBY_mode. Next command not possible or not permitted * ASM is running without MDS control (MDS_control = 0,1). * ASM has already received a Next command. * ASM / write/read device doesn't recognize NEXT command. Short circuit or overload of the 24 V outputs (DQ, error code, presence) * The affected output is turned off. * All outputs are turned off when total overload occurs. * A reset can only be performed by turning the 24 V voltage off and on again. * Then start init_run. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Error messages and troubleshooting 5.2 Error messages Error code (B#16#..) Flashing of ERR LED 19 25x Description Previous command is active or buffer overflow. The user sent a new command to the ASM although the last command was still active. * Active command can only be terminated with an init_run. * Before a new command can be started the READY bit must be 1 (exception: init_run). * Two FC 45 calls were parameterized with the same "ASM_address" and "ASM_channel" parameters * Two FC 45 calls are using the same Params_DB pointer. * Start init_run command after error correction. * When command repetition (e.g., fixed code MDS) is used, no data are fetched from the MDS. The data buffer on the ASM has overflowed. MDS data have been lost. 1A - PROFIBUS DP error occurred. * The PROFIBUS DP bus connection was interrupted - Wire break on the bus - Bus connector on ASM was removed briefly * PROFIBUS DP master no longer addresses the ASM * Execute an init_run * The ASM has detected a message frame interruption on the bus. The PROFIBUS may have been reconfigured (e.g. with HW Config). This error is only indicated when access monitoring has been enabled in the PROFIBUS configuration. 1B 27x Only with MOBY F: * CRC check in data telegram is incorrect. Checksum error between ASM and write/read device * Interface on ASM or write/read device is defective (hardware defect). * Check wiring of ASM-write/read device cable. 1C 28x The antenna of the write/read device is turned off. An MDS command to the ASM was started in this state. * Turn on the antenna with the command "antenna on/off." * The antenna is turned on (off) and has received an additional turnon (turn-off) command. * MOBY F: An FFT command was started when antenna was off (antenna on/off with sub_command = 09). 1D - More MDSes are in the transmission window than the SLG is capable of processing simultaneously. * Only 1 MDS can be processed at a time with FC 45. 1E 30x Error when processing the function * The data in UDT 10 are invalid (e.g. write command with length = 0); check UDT 10 and execute init_run * ASM hardware defect: ASM receives wrong data during init_run. * The "number of bytes" byte does not match the user data length (see Section "Programming the MOBY-ASM on PROFIBUS DPV1"). FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 5-7 Error messages and troubleshooting 5.2 Error messages Error code (B#16#..) Flashing of ERR LED 1F - Description Running command canceled by RESET (init_run or cancel) or bus connector removed * Communication with the MDS was terminated by init_run. * This error can only be reported on init_run or cancel error_FC Table 5-3 Error code (B#16#..) 5-8 Error variable "error_FC" Description 00 No error; default value if everything is ok. 01 Params_DB not available in SIMATIC 02 Params_DB too small * UDT 10/11 was not used during definition * Params_DB must be 300 bytes in length (for each channel) * Check that Params_DB and Params_ADDR are correct 03 The DB after the "command_DB_number" pointer is not available in the SIMATIC. 04 "command_DB" in the SIMATIC too small * UDT 20/21 was not used during command definition * The last command in "command_DB" is a chained command; reset the chaining bit * Check command pointer command_DB_number/command_DB_address 05 Invalid command type. The valid commands are described in Section "MOBY commands". * Check command pointer command_DB_number/command_DB_address * Check the current values in command_DB - Execute an init_run 06 Unexpected acknowledgement received. The parameters of the command and acknowledgement telegram do not match (command, length, address_MDS). * The user changed the command_DB_number/_address pointer during command execution. * The user changed the command parameters in the MOBY CMD data block (UDT 20) during command execution. * Check the ASM_address and ASM_channel parameter settings. ASM_address and ASM_channel have the same parameters for different channels. * Acknowledgement and command counters (see Section "Cyclic control word between master and MOBY-ASM") between ASM and FC no longer synchronized - Execute an init_run 07 The MOBY_mode or MDS_control parameter (defined in UDT 10) has an illegal value (see Section "Parameter data block"). 08 A bus error has occurred which is reported by system functions SFC 58/59. More information on this error is available in the error_BUS variable. * ASM_address or ASM_channel not available * Execute an init_run FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Error messages and troubleshooting 5.2 Error messages Error code (B#16#..) 09 Description The ASM has failed. * Power failure on MOBY-ASM * PROFIBUS connector removed or PROFIBUS cable interrupted * ASM_address or ASM_channel not available This error is indicated if the ASM_failure bit (see Section "Command and status word") was set in OB 122. OB 122 is called if FC 45 can no longer access the cyclic word for MOBY-ASM. 0A Another init_run was started without waiting for ready during execution of the init_run command * Do not set init_run cyclically * The same physical ASM channel is used in two (or more) UDT 10 structures. Check ASM_address and ASM_channel in all UDT 10 structures. 0B init_run cannot be executed; cyclic Process image to the ASM is faulty; FC 45 reports timeout of the process image to the ASM The timeout time can be adapted in the DBB 58 of the UDT 10 if required. The default value is 50 (dec)=2 seconds. Greater values (255 max.) will increase the timeout time. * ASM_address in UDT 10 is parameterized incorrectly. ASM_address may be for wrong module. * ASM_channel setting is 16 or 0 * ASM hardware/firmware is faulty. * The same physical ASM channel is used in two (or more) UDT 10 structures. Check ASM_address and ASM_channel in all UDT 10 structures. 0C Area length error on block move for FC 45. * DAT_DB does not exist or is too small. Check DAT_DB_number and DAT_DB_address in UDT 20 * Write command with length = 0 was issued. * Execute an init_run 0D An init_run was not completed correctly. The process image is inconsistent. This message is equivalent to a timeout. A timeout is reported 40s after starting init_run. This time can be adjusted in DBW 52 if necessary. * Run init_run again * Turn ASM off and on again. * The RUN/STOP switch on the CPU was pressed rapidly several times in succession (particularly with slow PROFIBUS baud rates) * The same physical ASM channel is used in two (or more) UDT 10 structures. Check ASM_address and ASM_channel in all UDT 10 structures. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 5-9 Error messages and troubleshooting 5.2 Error messages error_BUS Table 5-4 Error code (W#16#...) 800A Description ASM is not ready (temporary message). * This message is given to a user who is not using the FC 45 and is continuously polling the ASMs acyclicaly. 8x7F Internal error on parameter x. Cannot be remedied by the user. 8x22 8x23 Area length error on reading parameter. Area length error on writing parameter. This error code indicates that parameter x is partially or completely outside the operand area or the length of a bit array for an ANY parameter is not divisible by 8. 8x24 8x25 Area error on reading parameter. Area error on writing parameter. This error code indicates that parameter x is within an area not allowed for the system function. 8x26 Parameter contains a time cell number which is too high. 8x27 Parameter contains a counter cell number which is too high. 8x28 8x29 Alignment error on reading parameter. Alignment error on writing parameter. The reference to parameter x is an operand whose bit address is not equal to 0. 8x30 8x31 The parameter is located within the write-protected global DB. The parameter is located within the write-protected instance DB. 8x32 8x34 8x35 The parameter contains a DB number which is too high. The parameter contains an FC number which is too high. The parameter contains an FB number which is too high. 8x3A 8x3C 8x3E The parameter contains a DB number which is not loaded. The parameter contains an FC number which is not loaded. The parameter contains an FB number which is not loaded. 8x42 An access error occurred while the system was attempting to read a parameter from the I/O area of the inputs. An access error occurred while the system was attempting to write a parameter to the I/O area of the outputs. 8x43 5-10 Error variable "error_BUS" 8x44 8x45 Error on nth (n > 1) read access after an error occurred. Error on nth (n > 1) write access after an error occurred. 8090 Specified logical base address is invalid: No assignment in SDB1/SDB2x exists, or it is not a base address. 8092 A type other than BYTE has been specified in an ANY reference. 8093 The area identifier contained in the configuration (SDB1, SDB2x) of the logical address is not permitted for these SFCs. Permitted: * 0 = S7-400 * 1 = S7-300 * 2, 7 = DP modules FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Error messages and troubleshooting 5.2 Error messages Error code (W#16#...) Description 80A0 Negative acknowledgment while reading from module. FC fetches acknowledgment although no acknowledgment is ready. A user who is not using the FC 45 would like to fetch DS 101 (or DS 102 to104) although no acknowledgment is available. * Perform an init_run for new synchronization between ASM and application. 80A1 Negative acknowledgment while writing to the module. FC sends command although ASM is unable to receive a command. 80A2 DP protocol error in layer 2. Could be a hardware defect. 80A3 DP protocol error in Direct-Data-Link-Mapper or User-Interface/User. Could be a hardware defect. 80B0 * * * * SFC not possible for module type Data record unknown to module Data record number 241 is not allowed. Data records 0 and 1 are not permitted for SFC58 "WR_REC." 80B1 The length specified in the RECORD parameter is wrong. 80B2 The configured slot is not occupied. 80B3 Actual module type is not the module type specified in SDB1. 80C0 * * RDREC: The module has record, but it doesn't have any read data. WRREC: ASM is not ready to receive new data - Wait until the cyclic counter has been incremented 80C1 The data of the preceding write job on the module for the same data record have not yet been processed by the module. 80C2 The module is currently processing the maximum possible number of jobs for a CPU. 80C3 Required resources (memory, etc.) are currently in use. This error is not reported by FC 45. If this error occurs, FC 45 waits until the system is able to provide resources again. 80C4 Communication error * Parity error * SW ready not set * Error in block length management * Checksum error on CPU side * Checksum error on module side 80C5 Distributed I/O not available FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 5-11 Error messages and troubleshooting 5.2 Error messages 5-12 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6 Examples/applications 6.1 6.1 FC 45 scanning by user Scanning of FC 45 takes place in accordance with the structogram in the following figure. 5HVWDUW6HWLQLWBUXQ 2% &\FOLFVFDQQLQJ6HWFRPPDQGBVWDUW VWDUWFRPPDQG RQO\LIUHDG\ UHDG\ " < 1 HUURU " < 3RVVLEOHWLPHRXW PRQLWRULQJE\XVHU LQLWBUXQRU FDQFHORQWLPHRXW 1 $1=BUHVHWRU $1=BFDQFHOVHW " 1 < EDWWHU\BORZ " < 1 &KDQJHEDWWHU\ PHVVDJHRQ SULQWHU (UURUKDQGOLQJ HYDOXWLRQRI HUURUB02%< HUURUB)& DQG HUURUB%86 +HUHQR FRPPXQLFDWLRQ WRRNSODFHZLWK 0'6 &RPPDQG2. &RPPDQG2. SURFHVVGDWD 6HWFRPPDQGBVWDUW VWDUWQH[WFRPPDQGLIGHVLUHG Figure 6-1 Structogram for scanning of FC 45 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6-1 Examples/applications 6.2 Processing of data memories/transponders 6.2 6.2 Processing of data memories/transponders Data memory types Mobile data memories with different storage capacities are available. The following table specifies the memory capacities currently available. Table 6-1 Available memory capacities Memory capacity 2 (1.7) Kbytes Memory type MOBY family MDS type RAM MOBY I e.g. MDS 302 8 (7) Kbytes EEPROM / FRAM MOBY I e.g. MDS 413E 32 (28) Kbytes FRAM MOBY I e.g. MDS 514 752 bytes EEPROM MOBY E e.g. MDS E600 5 bytes RAM MOBY F e.g. MDS F125 192 bytes EEPROM, 4 bytes of fixed code MOBY F e.g. MDS F415 2KB RAM, 16 bytes OTP MOBY U e.g. MDS U313 32 KB RAM, 16 bytes OTP MOBY U e.g. MDS U524 44 bytes EEPROM MOBY D e.g. MDS D139/ I-Code 1 112 bytes EEPROM MOBY D I-Code SLI 256 bytes EEPROM MOBY D Tag-it HF-I 1000 bytes EEPROM MOBY D my-d 20 bytes EEPROM RF300 RF320T 8KB FRAM RF300 e.g. RF340T 32 KB FRAM RF300 e.g. RF350T 64KB FRAM RF300 e.g. RF350T (64K) Addressing The data memories are addressed linearly from address 0000 to the end address. The ASM or write/read device automatically recognizes the size of the memory on the MDS. When the end address on the MDS is exceeded, the user receives an error message in error_MOBY. The next table shows the address space of the individual MDS versions. The variables address_MDS and length (see Table "UDT 20 MOBY CMD" in Section "MOBY commands") must be configured according to this address space. 6-2 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Examples/applications 6.2 Processing of data memories/transponders Address space of MDS versions for MOBY I, E, F, U and D System Addressing 16-Bit Hexadecimal Number MOBY I Integer number 2 KB data memory with RAM Start address 0000 0000 (with ECC) +0 +0 (with ECC) End address 07FC 06F1 (with ECC) +2044 +1777 (with ECC) 8 KB data memory with EEPROM/RAM/FRAM Start address End address 0000 0000 (with ECC) +0 +0 (with ECC) 1FFC 1BF1 (with ECC) +8188 +7153 (with ECC) 32 KB data memory with RAM/FRAM Start address 0000 0000 (with ECC) +0 +0 (with ECC) End address 7FFC 6FF1 (with ECC) +32764 +28657 (with ECC) MOBY E 752 byte data memory with EEPROM Start address 0000 +0 End address 02EF +751 ID no.: (fixed-coded; can only be read as a whole) Start address Length MOBY F 1FF0 +8176 0004 +4 MDS F1xx (5-byte fixed code) Start address 0000 +0 Length 0005 +5 MDS F4xx (192 bytes) Start address 0040 +64 End address 00FF +255 ID no.: (fixed-coded; can only be read as a whole) Start address 0000 +0 Length 0004 +4 MOBY U 2 KB data memory Start address 0000 +0 End address 07FF +2047 Read OTP memory (write access only possible once) The OTP memory of MOBY U can only be processed completely, i.e. the start address must always be specified with value FFF0 hex and the length with value 10 hex. Start address Length FFF0 -16 10 +16 ID no.: (four fixed-coded bytes; can only be read with the MDS status command) 32 KB data memory Start address 0000 +0 End address 7FFF +32767 Read OTP memory (write access only possible once)* Start address Length FFF0 -16 10 +16 ID no.: (four fixed-coded bytes; can only be read with the MDS status command) FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6-3 Examples/applications 6.2 Processing of data memories/transponders System Addressing MOBY D 16-Bit Hexadecimal Number Integer number MDS D139 (I-Code 1; 44 bytes) Start address 0000 +0 End address 002B +43 ID no.: (fixed-coded; can only be read as a whole) Start address FFF0 -16 Length 0008 +8 ISO-MDS (I-Code SLI; 112 bytes) Start address 0000 +0 End address 006F +111 ID no.: (fixed-coded; can only be read as a whole) Start address Length FFF0 -16 0008 +8 ISO MDS (Tag-it HF-I; 256 bytes) Start address 0000 +0 End address 00FF +255 ID no.: (fixed-coded; can only be read as a whole) Start address FFF0 -16 Length 0008 +8 ISO MDS (my-d SRF55V10P; 1000 bytes) Start address 0018 +24 End address 03FF +1023 ID no.: (fixed-coded; can only be read as a whole) Start address FFF0 -16 Length 0008 +8 16-Bit Hexadecimal Number Integer number Address space of the transponder versions for RF300 System Addressing RF300 20 bytes of data memory (EEPROM) R/W or OTP memory (EEPROM) (The EEPROM user memory for RF300 can be used either as R/W memory or as an OTP memory (see RF300 system manual)) Start address FF00 -256 End address FF13 -237 ID no.: (fixed-coded; can only be output as a whole) 6-4 Start address FFF0 -16 Length 0008 +8 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Examples/applications 6.2 Processing of data memories/transponders System Addressing RF300 16-Bit Hexadecimal Number Integer number 8 KB data memory (FRAM/EEPROM) R/W or OTP memory (EEPROM) (The EEPROM user memory for RF300 can be used either as R/W memory or as an OTP memory (see RF300 system manual)) Start address FF00 -256 End address FF13 -237 R/W memory (FRAM) Start address 0000 +0 End address 1FFC +8188 ID no.: (fixed-coded, can only be read as a whole) Start address FFF0 -16 Length 0008 +8 32 KB data memory (FRAM/EEPROM) R/W or OTP memory (EEPROM) (The EEPROM user memory for RF300 can be used either as R/W memory or as an OTP memory (see RF300 system manual)) Start address FF00 -256 End address FF13 -237 R/W memory (FRAM) Start address End address 0000 +0 7FFC +32764 ID no.: (fixed-coded; can only be output as a whole) Start address FFF0 -16 Length 0008 +8 64 KB data memory (FRAM/EEPROM) R/W or OTP memory (EEPROM) (The EEPROM user memory for RF300 can be used either as R/W memory or as an OTP memory (see RF300 system manual)) Start address FF00 -256 End address FF13 -237 0000 +0 FEFC - R/W memory (FRAM) Start address End address ID no.: (fixed-coded; can only be output as a whole) Start address FFF0 -16 Length 0008 +8 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6-5 Examples/applications 6.2 Processing of data memories/transponders RF300: Address mapping on the transponder R/W EEPROM memory and OTP memory is only available once on the transponder. The following table shows the mapping of addresses on the transponder. Data can be read via the R/W address or the OTP address. R/W EEPROM Write OTP once Address Length Address Length FF00 1 .. 20 FF80 4,8,12,16,20 FF01 1 .. 19 FF02 1 .. 18 FF03 1 .. 17 FF04 1 .. 16 FF84 4,8,12,16 FF05 1 .. 15 FF06 1 .. 14 FF07 1 .. 13 FF08 1 .. 12 FF88 4,8,12 FF09 1 .. 11 FF0A 1 .. 10 FF0B 1 .. 9 FF0C 1 .. 8 FF8C 4,8 FF90 4 FF0D 1 .. 7 FF0E 1 .. 6 FF0F 1 .. 5 FF10 1 .. 4 FF11 1 .. 3 FF12 1 .. 2 FF13 1 Notice Write access to addresses starting at FF80 to FF93 activates the write protection (OTP function) on the EEPROM user memory. This operation is not reversible. Switching on write protection must always take place in ascending order without gaps, starting at address FF80. See also MOBY commands (Page 3-11) 6-6 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Examples/applications 6.3 Cyclic calling of FC 45 (e.g. in OB 1) 6.3 6.3 Cyclic calling of FC 45 (e.g. in OB 1) The following program is an example of how to call and scan FC 45 in an application. The definition of the data structure is described in Section "Data structure definition". The parameter settings for the MOBY command were set up during the definition of the "MOBY DB". Block: OB1 cycle execution Network: 1 call FC45 memory bit 1.0 is set: Start MOBY command memory bit 1.1 is set: Start MOBY command memory bit 1.2 is set: Start init_run for memory bit 1.3 is set: Start init_run for memory byte 2: OB1 used as edge triggered CALL "MOBY FC" Params_DB :=45 Params_ADDR :=0 for 1st SLG for 2nd SLG 1st SLG 2nd SLG memory // Call FC 45 for each SLG in each cycle CALL "MOBY FC" Params_DB :=45 Params_ADDR :=300 A M 1.2 FP M 2.2 S "MOBY DB".SLG[1].init_run SPB x01 // memory bit init_run for 1st SLG UN "MOBY DB".SLG[1].ready SPB x01 U "MOBY DB".SLG[1].error SPB x01 x01: A M 1.0 FP M 2.0 S "MOBY DB".SLG[1].command_start // memory bit command_start for 1st SLG A M 1.3 FP M 2.3 S "MOBY DB".SLG[2].init_run SPB x02 // memory bit init_run for 2nd SLG UN "MOBY DB".SLG[2].ready SP B x02 U "MOBY DB".SLG[2].error SPB x02 U M 1.1 FP M 2.1 S "MOBY DB".SLG[2].command_start x02: // memory bit command_start for 2nd SLG NOP 0 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6-7 Examples/applications 6.4 Programming a cold and warm restart 6.4 6.4 Programming a cold and warm restart The MOBY-ASM is restarted by setting the "init_run" variable. The ASM and FC 45 are completely reparameterized and synchronized with init_run. An init_run is necessary after * switching on the SIMATIC (OB 100) * Power supply of ASM is turned on. * an interruption in PROFIBUS communication * an error message in variable "error_BUS" Block: OB100 complete restart Network: 1 set init_run bit for all channels which are configured in DB45 SET S S "MOBY DB".SLG[1].init_run "MOBY DB".SLG[2].init_run In a distributed configuration of an ASM (e.g. via PROFIBUS), the ASM may be switched off and on again due to system conditions (see Section "Programming a module failure"). When this happens, the ASM reports the power failure to the FC 45 (and thus to the user). The user must then perform an init_run for this ASM before a MOBY command can be started again. Note: The "init_run" variable is set to TRUE in the project supplied with the system. This automatically triggers an "init_run" whenever the parameter data block is downloaded onto the PLC (see Table "INPUT parameters" in Section "INPUT parameters"). 6-8 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Examples/applications 6.5 Programming a module failure 6.5 6.5 Programming a module failure The failure of a PROFIBUS module can be detected primarily using the PROFIBUS system diagnostics. However, if a failed slave is addressed via FC 45, an I/O access error is generated in SIMATIC. As a result * OB 122 is called. * the PLC switches to STOP if no OB 122 is programmed. A feature implemented in FC 45 allows a normal error to be signaled to the user (error_FC=09) when a MOBY PROFIBUS slave fails. To do this, the user sets bit "ASM_failure = 1" in OB 122 for the failed MOBY channel. The following example shows a possible OB 122 implementation. Block: OB122 Network: 1 Reset channel 1 on error x1: L #OB122_MEM_ADDR L "MOBY DB".SLG[1].ASM_address -D SRW 1 L 1 +D // Temporary OB122 L "MOBY DB".SLG[1].ASM_channel ==I SPBN x1 // Compare with config. channel SET S "MOBY DB".SLG[1].ASM_failure // Power failure on ASM // Formula: // (#OB122_MEM_ADDR - SLG[x].ASM_address) / 2 + 1 NOP 0 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6-9 Examples/applications 6.5 Programming a module failure Network: 2 Reset channel 2 on error L #OB122_MEM_ADDR L "MOBY DB".SLG[2].ASM_address -D SRW 1 L 1 +D x2: // Formula: // (#OB122_MEM_ADDR SLG[x].ASM_address) / 2 + 1 L "MOBY DB".SLG[2].ASM_channel ==I SPBN x2 // Compare with config. channel SET S "MOBY DB".write/read device[2].ASM_failure // Power failure on ASM NOP 0 OB 86 must also be available on the automation system in addition to OB 122 to prevent the system from switching to STOP if a PROFIBUS slave fails. No code needs to be programmed in OB 86 for the correct operation of FC 45. After the error on the ASM has been corrected and the ASM is ready for operation again, the user must send an init_run to the FC 45. The ASM is then ready for operation. 6-10 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Examples/applications 6.6 Data structure definition 6.6 6.6 Data structure definition The developer can define different MOBY data structures depending on the structure of the application. Some example structures are given below. 1st example Four SLGs are parameterized. One command is assigned to each write/read device. MOBY parameters (DB 45), MDS commands (DB 47), and data (DB 48) are assigned to different data blocks. The declaration view is shown. Block: DB45; MOBY parameters Address 0.0 +0.0 *300.0 Name Type STRUCT Initial value Comment Write/ ARRAY [1..4] read device UDT10 =1200.0 END_STRUCT Block: DB47; 4 MDS commands Address 0.0 +0.0 Name Type STRUCT Initial value Comment Command ARRAY [1..4] *10.0 UDT20 =40.0 END_STRUCT Block: DB48; MOBY data Address 0.0 +0.0 Name Type Initial value Comment STRUCT Data ARRAY [1..1024] *1.0 BYTE =1024.0 END_STRUCT When the data blocks have been defined, the "actual value" of the data must be edited using the "View Data view" menu. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6-11 Examples/applications 6.6 Data structure definition 2nd example 2 commands are assigned directly to each MOBY channel. The MOBY parameters and the MOBY commands of all write/read devices are stored in a "MOBY DB". A nested structure is used in the declaration. 'HFODUDWLRQYLHZ '% 'DWDYLHZ VFKHPDWLF 02%@ 8'7 6758&7 FRPPDQG$55$<>@ 8'7 (1'B6758&7 (1'B6758&7 &KDQQHO>@ &KDQQHO>@ &KDQQHO>@ FRPPDQGBVWDUW LQLWBUXQ FRPPDQGB'%BQXPEHU FRPPDQGB'%BDGGUHVV UHDG\ HUURU 7KH02%@ &RPPDQG>@ &KDQQHO>@ &RPPDQG>@ FRPPDQG DGGUHVVB0'6 OHQJWK '$7B'%BQXPEHU '$7B'%BDGGUHVV Figure 6-2 6-12 Example of several MOBY commands assigned to one channel FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Examples/applications 6.6 Data structure definition The following shows an extract from a STEP 7 user program. It shows how a large number of MOBY channels can be handled easily using symbolic names. A command is started via each of the inputs 0.0, 0.1 and 0.3. An edge trigger flag is used to prevent the command from being started several times: A AN A AN S S AN R MOBY DB.channel[1].ready // 1st MOBY MOBY DB.channel[1].error I 0.0 EdgeTriggerFlag_1 MOBY DB.channel[1].command_start EdgeTriggerFlag_1 I 0.0 EdgeTriggerFlag_1 A AN A AN S S AN R MOBY DB.channel[2].ready // 2nd MOBY MOBY DB.channel[2].error I 0.1 EdgeTriggerFlag_2 MOBY DB.channel[2].command_start EdgeTriggerFlag_2 I 0.1 EdgeTriggerFlag_2 A AN A AN S S AN R MOBY DB.channel[3].ready // 3rd MOBY MOBY DB.channel[3].error I 0.3 EdgeTriggerFlag_3 MOBY DB.channel[3].command_start EdgeTriggerFlag_3 I 0.3 EdgeTriggerFlag_3 Call "MOBY FC" Params_DB: = 45 Params_ADDR: = 0 Call "MOBY FC" Params_DB: = 45 Params_ADDR: = 320 Call "MOBY FC" Params_DB: = 45 Params_ADDR: = 640 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6-13 Examples/applications 6.6 Data structure definition 3rd example A separate data block is assigned to each MOBY channel. It contains the parameters, commands and data for a channel. Space for 10 MOBY channels should be reserved on each channel. 'HFODUDWLRQYLHZ 'DWDYLHZ VFKHPDWLF '%5HDGHU 8'7 6758&7 FRPPDQG$55$<>@ 8'7 (1'B6758&7 GDWD$55$<>@ %<7( (QG6758&7 5HDGHU '% $GG '%5HDGHU 8'7 6758&7 FRPPDQG$55$<>@ 8'7 (1'B6758&7 GDWD$55$<>@ %<7( (QG6758&7 '%5HDGHU 8'7 6758&7 FRPPDQG$55$<>@ 8'7 (1'B6758&7 GDWD$55$<>@ %<7( (QG6758&7 Figure 6-3 6-14 5HDGHU '% $GG 5HDGHU '% $GG 1DPH $60BDGGUHVV $60BFKDQQHO &RPPDQGFRPPDQG &RPPDQGDGGUHVVB 0'6 &RPPDQGOHQJWK 'DWD>@ 'DWD>@ 'DWD>@ 'DWD>@ Example of a separate data block assigned to each MOBY channel FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Examples/applications 6.7 UDTs of FB 45 / FC 45 6.7 6.7 UDTs of FB 45 / FC 45 The "MDS status" and "Write/read device status" commands supply a variety of data. The UDTs described in the following section can be used for clear presentation and easy definition of the data blocks for the result. Table 6-2 UDT overview table UDT Description Described in English German Spanish 10 11 14 Parameter data block Section "Parameter data block" 20 21 24 MOBY commands Section "MOBY commands" 60 61 64 Parameter data block for MDS > 32 KB 70 71 74 MOBY commands for MDS > 32 KB 100 101 104 Result of MDS status Section "UDTs of FB 45 / FC 45" 110 111 114 Result of write/read device status (sub_command = 01) Section "UDTs of FB 45 / FC 45" 120 121 124 Result of write/read device diagnosis I (sub_command = 02) Section "UDTs of FB 45 / FC 45" 130 131 134 Result of write/read device diagnosis II (sub_command = 03) Section "UDTs of FB 45 / FC 45" 140 141 144 Result of write/read device diagnosis III (sub_command = 04) Section "UDTs of FB 45 / FC 45" 260 261 264 Result of MDS status (sub_command = 01, RF300) Sample project on software CD 270 271 274 Result of MDS status (sub_command = 02, RF300) Sample project on software CD 280 281 284 Result of read/write device status (sub_command = 06, RF300) Sample project on software CD FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6-15 Examples/applications 6.7 UDTs of FB 45 / FC 45 UDT 100: Result of MDS status Table 6-3 UDT 100 "MOBY MDS status" Address 0.0 Name Type STRUCT Comment +0.0 +4.0 +6.0 +10.0 +12.0 UID MDS_type sum_subframe_access sum_searchmode_access ST_date_Week DWORD BYTE DINT INT BYTE +13.0 +14.0 +16.0 =18.0 ST_date_Year battery_left ST BYTE INT BYTE END_STRUCT MDS (unique identifier) MDS Sum of subframe access Sum of searchmode Date of last sleep-time change (week of year) Date of last sleep-time change (year) Battery left (percentage) Actual sleep-time value on MDS UDT 110: Result of write/read device status (mode 1) Table 6-4 UDT 110 "MOBY write/read device status" Address 0.0 Name Type STRUCT Comment +0.0 +1.0 +2.0 +4.0 +6.0 +8.0 +10.0 +12.0 +14.0 +15.0 +16.0 +17.0 +18.0 +19.0 status_info hardware hardware_version loader_version firmware firmware_version driver driver_version interface baud reserved1 reserved2 reserved3 distance_limiting_writ e/read device multitag_write/read device field_ON_control_write /read device field_ON_time_write/re ad device BYTE CHAR WORD WORD CHAR WORD CHAR WORD BYTE BYTE BYTE BYTE BYTE BYTE Write/read device mode Type of hardware HW version Version of loader FW Firmware version Type of driver Version of driver Interface (RS 232/RS 422) Baud rate Reserved Reserved Reserved Ranges/performance setting (RF300: res.) Multitag write/read device +20.0 +21.0 +22.0 BYTE BYTE BYTE +23.0 sync_write/read device BYTE +24.0 +25.0 status_ant stand_by BYTE BYTE +26.0 =28.0 MDS_control BYTE END_STRUCT 6-16 BERO operating mode (RF300: res.) MOBY U: BERO time MOBY D: MDS type (RF300: res.) Semaphore control (synchronization with write/read device) (RF300: res.) Status of antenna Time of standby after command execution (RF 300: res.) Presence FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Examples/applications 6.7 UDTs of FB 45 / FC 45 UDT 120: Result of write/read device diagnosis I Table 6-5 UDT 120 "MOBY write/read device-Stat Diag 1" Address 0.0 Name Type STRUCT Comment +0.0 +1.0 +2.0 +3.0 +4.0 . . . =234.0 status_info number_functions function_01_01 function_01_02 function_01_03 . . . BYTE BYTE BYTE BYTE BYTE Write/read device status mode Range: 1...33 * * * END_STRUCT *) An area of seven bytes each is reserved for 33 commands. UDT 130: Result of write/read device diagnosis II Table 6-6 UDT 130 "MOBY write/read device-Stat Diag 2" Address 0.0 Name Type STRUCT Comment +0.0 +1.0 +2.0 *1.0 status_info number_errors error_number BYTE BYTE ARRAY [1...235] BYTE Write/read device status mode Range: 1...235 Error appeared on write/read device =238.0 END_STRUCT UDT 140: Result of write/read device diagnosis III Table 6-7 UDT 140 "MOBY write/read device-Stat Diag 3" Address 0.0 Name Type STRUCT Comment +0.0 +1.0 +2.0 *4.0 status_info number_MDS UID BYTE BYTE ARRAY [1...24] DWORD Write/read device status mode Range: 1...24 Identified UID (MDS number) =98.0 END_STRUCT FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6-17 Examples/applications 6.7 UDTs of FB 45 / FC 45 UDT 260: Result of MDS status (mode 1, RF300) Table 6-8 UDT 260 "MDS status (mode 1, RF300)" Address 0.0 Name Type STRUCT Comment +0.0 +1.0 status_info UID MDS status mode Number of MDS (unique identifier) +9.0 MDS_type BYTE ARRAY[1...8] BYTE BYTE +10.0 Lock_state BYTE MDS type 01 = Tag without FRAM 02 = Tag with FRAM 8KB 03 = Tag with FRAM 32KB 04 = Tag with FRAM 64KB EEPROM write protection status %LW QRWXVHG %ORFN )))) %ORFN ))&))) %ORFN ))))% %ORFN )))) %ORFN )))) :ULWHSURWHFWLRQVWDWXV EORFNQRWSURWHFWHG UZ EORFNSURWHFWHG UR +11.0 to +16.0 =18.0 res. Reserved END_STRUCT UDT 270: Result of MDS status (mode 2, RF300) Table 6-9 UDT 270: "MDS status (mode 2, RF300)" Address 0.0 Name Type STRUCT Comment +0.0 +1.0 status_info UID MDS status mode Number of MDS (unique identifier) +9.0 LFD BYTE ARRAY[1...8] BYTE BYTE +10.0 FZP BYTE +11.0 FZP BYTE +12.0 +13.0 to +16.0 =18.0 ANWZ res. BYTE BYTE 6-18 Relationship between power flow density limit and actual measured value Error counter, passive (errors during idle time) Error counter, active (errors during communication) Presence counter Reserved END_STRUCT FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Examples/applications 6.7 UDTs of FB 45 / FC 45 UDT 280: Result of read/write status (mode 6, RF300) Table 6-10 UDT 280 "write/read device status (mode 6, RF300)" Address 0.0 Name Type STRUCT Comment +0.0 +1.0 status_info FZP BYTE BYTE +2.0 +3.0 +4.0 +5.0 +6.0 +7.0 +8.0 to +26.0 =28.0 ABZ CFZ SFZ CRCFZ BSTAT ASMFZ res. BYTE BYTE BYTE BYTE BYTE BYTE BYTE Write/read device status mode Error counter, passive (errors during idle time) Abort counter Code error counter Signature error counter CRC error counter Current command status Interface error counter for ASM Reserved END_STRUCT FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 6-19 Examples/applications 6.8 Determing the memory requirement in the SIMATIC 6.8 6.8 Determing the memory requirement in the SIMATIC The memory resources used in SIMATIC S7 by a MOBY application should normally not reach the system limits on the PLC. However, if the following conditions occur simultaneously, the memory requirement must be considered: * SIMATIC S7 with small memory configuration * Many MOBY channels (write/read devices) are processed in one S7. * Processing of large volumes of data on each MOBY channel The following example shows a configuration for the memory required by FC 45 in an S7. Twenty write/read devices with 1KB of MDS data each are to be processed: Memory Requirements [KB] per channel Total - ~7 Parameter data block (UDT 10) 0.3 6 Command data block (UDT 20) 0.01 0.2 1 20 1.31 33.2 FC 45 (needed once) DB for MDS data Total In this configuration, a SIMATIC CPU with only 48 KB memory can reach the memory limits quickly if further programs are also running. 6-20 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A A Brief description of ASM hardware This appendix discusses the special features of the individual interface modules which can be addressed with the FC 45. For a detailed hardware description of the interface modules with installation notes, see the appropriate MOBY manual on configuring, mounting and service. A.1 A.1 ASM 475 The ASM 475 is an S7-300 module. It can be used in a centralized layout with an S7-300 or in a distributed layout with an ET 200M. $60b 2WKHUPRGXOHVIURP WKH6UDQJH LQFOXGLQJ$60 $60BFKDQQHO :ULWHUHDGGHYLFH 0'6 Figure A-1 :ULWHUHDGGHYLFH :ULWHUHDGGHYLFH DQG0'6IURPWKH 02%<(),8' IDPLO\ 0'6 Configurator for ASM 475 (centralized layout) Hardware configuration The ASM 475 is integrated in the hardware configuration of the SIMATIC Manager by calling Setup.exe in the directory daten\S7_OM on the RFID Systems Software & Documentation CD. Currently, the ASM 475 cannot be integrated in masters of other manufacturers. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-1 Brief description of ASM hardware A.1 ASM 475 Write/read device / reader connection system Prefabricated write/read device connection cables are available in various lengths for the ASM 475. The cores at the open end to the ASM/communication module are marked with connection numbers. When making the connections, make sure that the cable shield is led over the shield connecting element. See MOBY manual on configuration, installation and service for more information. Input parameters for ASM 475 The assignment is made in UDT 10 (see Section "Parameter data block"). Table A-1 Address +0.0 Input parameters for ASM 475 Name ASM_address Permissible values 256, 272, 288 ... 752 256, 272, 288, ... 2 1 +2.0 +8.0 +9.0 ASM_channel MDS_control ECC_mode 256, 260, 264, ... 1, 2 B#16#0, 1 TRUE, FALSE +9.1 RESET_long TRUE, FALSE +10.0 MOBY_mode B#16#1, 5, A, B +11.0 scanning_time B#16#00 ... FF +12.0 +13.0 option_1 distance_limiting B#16#00, 02, 04, ... B#16#05, 0A, 0F, 14, 19, 1E, 23 +14.0 multitag B#16#1 +15.0 field_ON_control B#16#0, 1, 2 +16.0 field_ON_time B#16#00 ... FF Comment Centralized layout: Addresses are specified by HW Config (see Section "Addressing of MOBY channels"). Distributed layout: Automatic or manual address assignment 2 parallel channels Enable/disable presence check TRUE is only permitted when MOBY_mode is parameterized with 1. TRUE, if MOBY_mode = 5 (MOBY U or RF300) MOBY I/E/F/U1/D1 A value other than 00 is only recommended when MOBY_mode was parameterized appropriately (see Section "INPUT parameters"). See Section "INPUT parameters" MOBY U1/D1(see Section "INPUT parameters") MOBY U1/D1 or RF3001 MOBY U1/D1(see Section "INPUT parameters") MOBY U1/D1(see Section "INPUT parameters") 1) valid only for 6GT2 002-0GA10 2) valid only for 6GT2 002-0GA00 A-2 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.1 ASM 475 Table of commands for ASM 475 The assignment is made in UDT 20 using the "Command" variable (see Section "Command parameter settings"). Table A-2 Commands for ASM 475 Command code Description available in the MOBY system normal Chained3 01 41 Write to MDS/transponder all 02 42 Read MDS/transponder. Read fixed code all 03 43 Initialize MDS/transponder status1 04 44 Write/read device 08 48 END1 0A 4A Turn antenna on/off 0B 4B MDS status1 all U/D2 or RF3002 U F/U/D or RF300 U or RF300 1) These commands are only available for 6GT2 002-0GA10. 2) Please read Section "Command parameters". 3) Chained commands are not supported by all write/read devices, please note the information in the MOBY manuals for configuration, mounting and service. Command repetition: Command repetitionn as described in Section "Command repetition" is available on ASM 475 with MLFB 6GT2 002-0GA10. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-3 Brief description of ASM hardware A.1 ASM 475 Interfaces and indicators of the ASM 475 $&7B (55B 35(B 5['B 7 7 5 5 $&7B (55B 35(B 5['B 7 7 5 5 :ULWHUHDGGHYLFHb 6) '&9 :ULWHUHDGGHYLFHb 02%< $60 *7*$ 6WDWXVDQGHUURULQGLFDWRUV A-4 5HDGHUFRQQHFWLRQ GLDJUDP7KHQXPEHUV IRUWKHFRQQHFWLRQUHIHU WRSOXJFRQQHFWRU;RQ WKHWRSRIWKHKRXVLQJ SF: System fault (hardware error on ASM) DC 5 V: 24V are connected to ASM and the 5V on ASM are okay. ACT_1, ACT_2: The corresponding write/read device is active in processing an application command. ERR_1, ERR_2: A flashing pattern indicates the last error to occur. This indicator can be reset with the parameter option_1 (see Section "INPUT parameters"). PRE_1, PRE_2: Indicates the application of an MDS. RxD_1, RxD_2: Indicates live communication with the write/read device. May also indicate malfunctions on the write/read device. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.1 ASM 475 The following ASM states are indicated with the LEDs PRE, ERR and SF. SF PRE_1 ERR_1 PRE_2 ERR_2 Description, Causes, Remedy ON OFF/ON ON (perm.) OFF/ON ON (perm.) ON OFF ON OFF OFF Hardware is defective (RAM, Flash, ...) OFF 2 Hz OFF 2 Hz OFF OFF 2 Hz 2 Hz 2 Hz 2 Hz any 5 Hz 5 Hz 5 Hz 5 Hz OFF OFF 1x flash every 2 s OFF 1x flash every 2 s FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Loader is defective (can only be fixed at the plant). Firmware loading process is active and/or no firmware detected load firmware do not switch off ASM during this process Loading of firmware aborted due to error restart needed reload firmware check update files Operating system error switch ASM off/on ASM has booted and is waiting for a RESET (init_run) from the user. A-5 Brief description of ASM hardware A.2 ASM 473 A.2 A.2 ASM 473 0D[RI$60VFDQEH RSHUDWHGLQRQH(7; $60BDGGUHVV $60BFKDQQHO Figure A-2 Maximum configuration of ASM 473 on an ET 200X with sample addressing Depending on the PROFIBUS master, up to 126 ET 200X modules can be run on one PROFIBUS branch. Hardware configuration The ASM 473 is integrated in the hardware configuration of the SIMATIC Manager by calling Setup.exe in the directory daten\S7_OM on the RFID Systems Software & Documentation CD. Currently, the ASM 473 cannot be integrated in masters of other manufacturers. Reader connection system A write/read device always occupies the two M12 connection sockets X3 and X4 on the ASM 473. A prefabricated cable makes it easy to connect the write/read device. The standard model of the connection cable is 2 m in length. Other lengths are available on request. An SLG cable connector with screw-type terminals is available for users who want to make their own cables. Cables and SLG cable connectors can be ordered from the MOBY catalog. A-6 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.2 ASM 473 Input parameters for ASM 473 The assignment is made in UDT 10 (see Section "Parameter data block"). Table A-3 Input parameters for ASM 473 Address Name +0.0 ASM_address Permissible values 256, 260, 264, 268, ... +2.0 +8.0 +9.0 ASM_channel MDS_control ECC_mode 1 B#16#0, 1 TRUE, FALSE +9.1 RESET_long TRUE, FALSE +10.0 MOBY_mode B#16#1, 5, A, B +11.0 scanning_time B#16#00 ... FF +12.0 +13.0 option_1 distance_limiting B#16#00, 02, 04, ... B#16#05, 0A, 0F, 14, 19, 1E, 23 +14.0 multitag B#16#1 +15.0 field_ON_control B#16#0, 1, 2 +16.0 field_ON_time B#16#00 ... FF Comment Automatic or manual address assignment Each ASM 473 occupies four bytes of I/O in the peripheral area of the controller. 1 channel per ASM Enable/disable presence check TRUE is only permitted when MOBY_mode is parameterized with 1. TRUE, if MOBY_mode = 5 (MOBY U or RF300) MOBY I/E/F/U1/D1 A value other than 00 is only recommended when MOBY_mode was parameterized appropriately (see Section "INPUT parameters"). See Section "INPUT parameters" MOBY U1/D1 (see Section "INPUT parameters") MOBY U1/D1 or RF3001 MOBY (see MOBY (see U1/D1 Section "INPUT parameters") U1/D1 Section "INPUT parameters") 1) valid only for 6GT2 002-0HA10 Table of commands for ASM 473 The assignment is made in UDT 20 using the "Command" variable (see Section "Command parameter settings"). Table A-4 Commands for ASM 473 Description Command code available in the MOBY system normal Chained3 01 41 Write to MDS all 02 42 Read MDS; read fixed code all 03 43 Initialize MDS all status1 04 44 Write/read device 08 48 END1 0A 4A Turn antenna on/off 0B 4B MDS status1 U/D2 or RF3002 U F/U/D or RF300 U or RF300 1) These commands are only available for 6GT2 002-0HA10. 2) Please read Section "Command parameters". 3) Chained commands are not supported by all write/read devices. Bitte beachten Sie entsprechende Please adhere to the information in the MOBY manuals for configuration, mounting and service. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-7 Brief description of ASM hardware A.2 ASM 473 Command repetition: Command repetition as described in Section "Command repetition" is available on ASM 473 with MLFB 6GT2 002-0HA10. Interfaces and indicators of the ASM 473 Figure A-3 Interfaces and indicators of the ASM 473 Table A-5 Pin assignment of sockets X3, X4 Socket Pin Pin Assignment (write/read device) X3 1 +RxD 2 +TxD X4 3 -TxD 4 -RxD 5 PE 1 +24 V 2 n. c. 3 0V 4 n. c. 5 PE LEDs for PROFIBUS DP General indicators (SF, BF, ON, DC24V) are located on the basic model of the ET 200X. A-8 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.2 ASM 473 LEDs for MOBY RxD: Indicates live communication with the write/read device. PRE: Indicates the presence of an MDS. ERR: Error indication by flashing pattern (see Section "Error messages") This indicator can be reset with the parameter option_1 (see Section "INPUT parameters"). The following ASM states are also indicated with the LEDs "PRE" and "ERR". PRE ERR Description, Causes, Remedy OFF/ON ON (perm.) Hardware is defective (RAM, flash,...) ON OFF Loader is defective (can only be fixed at the plant). 2 Hz OFF Firmware loading process is active and/or no firmware detected load firmware do not switch off ASM during this process 2 Hz 2 Hz Loading of firmware aborted due to error restart needed reload firmware check update files 5 Hz 5 Hz Operating system error switch ASM or ET 200X base station OFF/ON OFF 1x flash every 2s ASM has booted and is waiting for a RESET (init_run) from the user. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-9 Brief description of ASM hardware A.3 ASM 452 A.3 A.3 ASM 452 The ASM 452 is a PROFIBUS DP-V1 slave with degree of protection IP67. Up to two write/read devices / readers can be connected in parallel to it. The two write/read devices are processed in pseudo parallel. This means that, from the user's point of view, command processing takes place in parallel. Internally, however, the ASM/communication module processes the two write/read devices in succession. The MDS / transponder which enters the transmission window of a write/read device first is processed first. This may significantly increase the processing time of the other write/read device. This is the reason dynamic processing of several MDSs simultaneously has not been approved. $7FRPS3& 352),%86'3 PDVWHUPRGXOH HJ6&38 352),%86OLQH $60BFKDQQHO 9 IRU$60DQG ZULWHUHDGGHYLFH WRRWKHU 352),%86 EXVQRGHV QGZULWHUHDGGHYLFH 1RWZLWK02%<,GLDORJ 1RWZLWK02%<8'5)b Figure A-4 ASM 452 configurator Hardware configuration The ASM 452 is integrated into the hardware configuration of the SIMATIC Manager or into another PROFIBUS Master by means of the GSD file SIEM80B6.GSD. The file is incorporated in the hardware configuration of the SIMATIC Manager using the function "Tools > Install new GSD ...". This file is located in the directory daten\PROFI_GSD\ASM452 of the RFID Systems Software & Documentation CD. A-10 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.3 ASM 452 Parameter setting by means of GSD file In addition to the PROFIBUS-relevant control parameters, several MOBY-relevant control parameters are also defined for the ASM 452 in the GSD file. The MOBY-relevant parameters are set using the "Object properties" of the slave in the hardware configuration. The following table shows the possible settings: Table A-6 Setting of MOBY-relevant parameters Parameter name MOBY mode Value Comment MOBY I, E, F normal addressing (Default) MOBY I filehandler only with FC 46 MOBY U/D normal addressing MOBY U filehandler Baud rate for write/read device MOBY U only with FC 46 or FC 56 (multitag) 19.2 kbps 57.6 Kbps (Default) Input parameters for ASM 452 The assignment is made in UDT 10 (see Section "Parameter data block"). Table A-7 Input parameters for ASM 452 Address Name +0.0 ASM_address +2.0 ASM_channel Permissible values 256, 260, 264, 268, ... 1, 2 +8.0 MDS_control B#16#0, 1 +9.0 ECC_mode TRUE, FALSE +9.1 RESET_long TRUE, FALSE +10.0 MOBY_mode B#16#1, 4, 5, 8, 9, A, B +11.0 scanning_time B#16#00 ... FF +12.0 +13.0 option_1 distance_limiting +14.0 +15.0 +16.0 multitag field_ON_control field_ON_time B#16#00, 02, 04 B#16#05, 0A, 0F, 14, 19, 1E, 23 B#16#1 B#16#0, 1, 2 B#16#00 ... FF FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Comment Each ASM 452 occupies four bytes of I/O in the I/O area of the controller. 2 quasi parallel channels; channel 2 not for MOBY U/D/I dialog 0= no presence check 1= presence check TRUE, if MOBY_mode = 5 (MOBY U) Special features of the MOBY I dialog (8): * Write/read device must be type SLG4x. * Write/read device must be connected to channel 1 (ASM_channel = 1). * Channel 2 is not available. * The VMDS memory size is 1280 bytes. The INIT command for the VMDS must be specified using 0500 hex. Special features of the MOBY U/D (5): * Channel 2 is not available. A value other than 00 is only recommended when MOBY_mode was parameterized appropriately (see Section "INPUT parameters"). See Section "INPUT parameters" MOBY U/D (see Section "INPUT parameters") MOBY U/D MOBY U/D (see Section "INPUT parameters") MOBY U/D (see Section "INPUT parameters") A-11 Brief description of ASM hardware A.3 ASM 452 Table of commands for ASM 452 The assignment is made in UDT 20 using the "Command" variable (see Section "Command parameter settings"). Table A-8 Commands for ASM 452 Command code normal Chained2 01 41 Description available in the MOBY system Write to MDS all all 02 42 Read MDS; read fixed code 03 43 Initialize MDS all U1/D1 04 44 SLG status 08 48 Turn off MDS 0A 4A Turn antenna on/off. With MOBY F the command is only effective when one write/read device is used on the ASM 452. 0B 4B MDS status U F/U/D U 1) Please read Section "Command parameters". 2) Chained commands are not supported by all write/read devices, please adhere to the information in the MOBY manuals for configuration, mounting and service. Setting the PROFIBUS address, activating/deactivating the terminating resistor ([DPSOH7HUPLQDOUHVLVWDQFHRII FRQGLWLRQRQGHOLYHU\ 21 2)) ([DPSOH352),%86DGGUHVV FRQGLWLRQRQGHOLYHU\ 1RUPDOXVH 21 A-12 $60FRPSDWLEOH XVH*6'ILOH VLHPG FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.3 ASM 452 Interfaces and indicators of the ASM 452 6) %) &RQQHFWLRQV IRU352),%86 21 ; /('VIRU 352),%86'3 3RZHULQGLFDWRU '&9 ; ; 6/* ; 5[' 35((55 35((55 ; &RQQHFWRU 6XSSO\YROWDJH 9'& ; ; 6/* ,QWHUIDFHV ;; IRU ZULWHUHDGGHYLFH /('VIRU ZULWHUHDGGHYLFH 5[' LEDs for PROFIBUS DP, Power display Meaning SF System Fault (see Table "LED indication for PROFIBUS diagnosis") BF Bus Fault (see Table "LED indication for PROFIBUS diagnosis") ON Lights up when there is logic voltage at the ASM (is generated by the 24 V supply voltage). DC 24 V Lights up when the 24 V supply voltage is connected to the ASM. LEDs for write/read device Meaning SLG 1 Write/read device 1 is selected SLG 2 Write/read device 2 is selected PRE/ERR 1 Channel 1: MDS present or error display MDS present: The LED is permanently ON; if more than one MDS is in the field (multitag only), the number of MDSs is indicated by short interruptions of the LED. PRE/ERR 2 Channel 2: MDS present or error display Error indication: The LED is permanently OFF. The last error number is indicated by brief light pulses. RxD SLG active with command Only write/read device 1 or write/read device 2 can be selected. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-13 Brief description of ASM hardware A.3 ASM 452 Interface assignments Interface A-14 Connection for PROFIBUS Pin Assignment X 11 and X 12 1 2 3 4 5 6 Signal B (red) PE PE (not wired) Signal A (green) L+ (not wired) M (not wired) Connection for power supply Pin Assignment X 13 1 2 3 4 5 6 PE L+ M PE L+ M Connection for write/read device Pin Assignment X1/X3 1 2 3 4 5 +RxD +TxD -TxD -RxD PE X2/X4 Pin X2 X4 1 2 3 4 5 +24 V PRE/ERR2 0V PRE/ERR1 PE +24 V res. (DE1) 0V res. (DE0) PE FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.3 ASM 452 Change indication mode of the LEDs PRE/ERR1 and PRE/ERR2 INPUT parameter option_1 can be used to change the indication mode of LEDs PRE/ERR1 and PRE/ERR2 (see also the "INPUT parameters" table in Section "INPUT parameters"). Table A-9 Control of the LEDs PRE/ERR1 and PRE/ERR2 option_1 Meaning of PRE/ERRx The LED indicates both ANZ_MDS_present and error_MOBY. When an MDS is in the field (ANZ_MDS_present = 1), errors are not indicated by the LEDs. The LED only indicates error_MOBY. The LED only indicates ANZ_MDS_present. The LED indicates both ANZ_MDS_present and error_MOBY. When an error output is queued, no ANZ_MDS_present is indicated. The error indication can only be reset with the init_run command and setting bit 1 in option_1. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-15 Brief description of ASM hardware A.3 ASM 452 PROFIBUS Diagnosis "ON" LED is not on or is flashing If the "ON" LED is not on, this means that either no supply voltage or too low voltage is available to the ASM452. Possible causes include a bad fuse or missing/too low supply voltage. Flashing or absence of this LED may mean that the module is defective. Diagnosis with LEDs The following table lists possible error indications with their meanings and provides remedies. Table A-10 "BF" LED On Flashe s Flashe s LED indication for PROFIBUS diagnosis "SF" LED Status not relevant On Off Cause of error * ASM 452 is in start-up mode. - * * Connection to DP Master failed. ASM 452 not detecting a baud rate. * * Check the PROFIBUS DP connection. Check the DP master. * * Bus interrupt DP Master not functioning * * Check all cables on your PROFIBUS DP network. Check whether the connector plugs for PROFIBUS DP are securely plugged into the ASM 452. * The configuration data sent to the ASM 452 by the DP master do not match the configuration of the ASM 452. * Check the configuration of the ASM 452 (input/output, PROFIBUS address). Correct GSD file used? (SIEM80B6.GSD) * * On A-16 Flashes Error correction * * ASM 452 has detected the baud rate, but * is not being addressed by the DP Master. ASM 452 has not been configured. * Check the PROFIBUS address set on the ASM 452 or in the configuration software. Check the configuration of the ASM 452 (station type). There is a hardware defect in the ASM 452. Replace the ASM 452. * FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.4 ASM 454 A.4 A.4 ASM 454 The ASM 454 is a PROFIBUS slave. Up to four MOBY I/E/V write/read devices can be connected. 352),%86PDVWHU 6 )&)% 6 )&)% 2WKHUPDVWHU WKLUGSDUW\)&)% 352),%86 '39 $60BFKDQQHO Figure A-5 9 '& a 9 02% Install new GSD ...". You will find the file on the CDRFID Systems Software & Documentation in the directory daten\PROFI_GSD\ASM454-754-85x. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-17 Brief description of ASM hardware A.4 ASM 454 Input parameters for ASM 454 The assignment is made in UDT 10 (see Section "Parameter data block"). Table A-11 Input parameters for ASM 454 Address +0.0 Name ASM_address Permissible values 256, 264, 272, 280, ... +2.0 +8.0 ASM_channel MDS_control 1, 2, 3, 4 B#16#0, 1, 2 +9.0 ECC_mode TRUE, FALSE +9.1 +10.0 RESET_long MOBY_mode FALSE B#16#1, 4, 8, 9 +11.0 scanning_time B#16#00 ... FF +12.0 +13.0 +14.0 +15.0 +16.0 option_1 distance_limiting multitag field_ON_control field_ON_time B#16#00, 02, 04 B#16#0 B#16#1 B#16#0 B#16#0 Comment Each ASM 454 occupies 8 byte of I/O in the I/O area of the control unit 4 parallel channels 0 = no presence check 1 = presence check 2 = MDS control via NEXT activated (no MOBY U) MOBY I dialog with 16KB VMDS on request. (Dialog only possible with write/read device of type write/read device 4x.) A value other than 00 is only recommended when MOBY_mode was parameterized appropriately (see Section "INPUT parameters"). See Section "INPUT parameters" Not relevant (no MOBY U) Table of commands for ASM 454 The assignment is made in UDT 20 using the "Command" variable (see Section "Command parameter settings"). Table A-12 Commands for ASM 454 Description Command code available in the MOBY system normal Chained1 01 41 Write to MDS all 02 42 Read MDS; read fixed code all 03 43 Initialize MDS all 06 - NEXT command. Only permitted when "MDS_control = 2" is used. all 1) Chained commands are not supported by all write/read devices. Bitte beachten Sie entsprechende Please adhere to the information in the MOBY manuals for configuration, mounting and service. A-18 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.4 ASM 454 Switch settings, interfaces and indicators of the ASM 454 ASM 454: Write/read device / write/read device side 35( LED PRE: "Presence" of an MDS in transmission window. RxD: SLG active with command ERR: Error indicated by flashing LED Interfaces 1-4 Connections for up to four write/read devices (55 5[' Meaning ,QWHUIDFHV ASM 454: PROFIBUS side LED 352),%86 6(5,$/ '&9 6)%) 21 $&7 ON: (green) 24 V on ASM ACT: (green) This LED flashes once briefly when a command is finished. SF/BF: (red) System Fault/Bus Fault RAM Error Interfaces Meaning PROFIBUS PROFIBUS DP interface SERIAL RS 232/RS 422 interface (only relevant for firmware download) DC 24 V Power supply for ASM 454 21 QRWDVVLJQHG Meaning 6(5,$/LQWHUIDFH 2156 2))56 RQO\UHOHYDQWIRUILUPZDUHGRZQORDG 6HW352),%86DGGUHVV 21 21 21 ([DPSOH 352),%86DGGUHVV FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-19 Brief description of ASM hardware A.5 ASM 754 A.5 A.5 ASM 754 The ASM 754 is a PROFIBUS slave. Up to four MOBY E SLAs (read/write antenna) can be operated on it. The 4 SLAs are processed in "pseudo parallel." This means that, from the user's point of view, command processing takes place in parallel. However, in reality, the ASM processes the 4 antennas in succession. The MDS which enters the transmission window of an SLA first is processed first. This may considerably lengthen the processing times of the other channels (SLAs). This is the reason dynamic processing of several MDSs simultaneously has not been approved. 352),%86PDVWHU 6 )&)% 6 )&)% 2WKHUPDVWHU WKLUGSDUW\)&)% 9 '& a 9 352),%86 '39 $60BFKDQQHO Figure A-6 02% Install new GSD ...". Sie finden die Datei auf der CD RFID Systems Software & Documentation in the directory daten\PROFI_GSD\ASM454-754-85x. A-20 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.5 ASM 754 Processing times of MDS E6xx in multiple channel operation The following table shows the processing times when one command is started simultaneously on 1, 2, 3, or 4 channels. Table A-13 Processing times of MDS E6xx in multiple channel operation Time to Read 752 Byte SLA per ASM Single Command Time to Write 752 Byte Chained Command 1 3.3 s 2.5 s 2 6.6 s 5s 3 9.8 s 7.5 s 4 13 s 10 s The times in the table are minimum times. Slow PROFIBUS baud rates and large bus configurations may increase these times. Input parameters for ASM 754 The assignment is made in UDT 10 (see Section "Parameter data block"). Table A-14 Input parameters for ASM 754 Address +0.0 Name ASM_address +2.0 +8.0 ASM_channel MDS_control Permissible values 256, 264, 272, 280, ... 1, 2, 3, 4 B#16#0, 1 +9.0 +9.1 +10.0 +11.0 ECC_mode RESET_long MOBY_mode scanning_time FALSE FALSE B#16#1 B#16#00 +12.0 +13.0 +14.0 +15.0 +16.0 option_1 distance_limiting multitag field_ON_control field_ON_time B#16#00, 02, 04 B#16#0 B#16#1 B#16#0 B#16#0 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Comment Each ASM 754 occupies 8 byte of I/O in the I/O area of the control unit 4 pseudo parallel channels 0 = no presence check 1 = presence check No ECC driver (no MOBY U) Only MOBY I/E protocol permitted No parameterization of the scanning time See Section "INPUT parameters" Not relevant (no MOBY U) A-21 Brief description of ASM hardware A.5 ASM 754 Table of commands for ASM 754 The assignment is made in UDT 20 using the "Command" variable (see Section "Command parameter settings"). Table A-15 Commands for ASM 754 Command code Description normal Chained 01 41 Write to MDS 02 42 Read MDS; read fixed code 03 43 Initialize MDS Switch settings, interfaces and indicators of the ASM 754 See Section "Switch settings, interfaces and indicators of the ASM 454" in Chapter "ASM 454" A-22 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.6 ASM 854 A.6 A.6 ASM 854 The ASM 854 is a PROFIBUS slave. Up to four MOBY F SLAs can be connected in parallel to it. In addition to standard programming with the FB 45, the ASM 854 can also directly process the fixed-code data memories (type MDS F1xx) using the process image. Programming is described later (process image mode). 352),%86PDVWHU 9 '& 6 )&)% 6 )&)% 2WKHUPDVWHU WKLUGSDUW\)&)% 352),%86 '39 $60BFKDQQHO Figure A-7 a 9 02% Install new GSD ...". Sie finden die Datei auf der CD RFID Systems Software & Documentation in the directory daten\PROFI_GSD\ASM454-754-85x. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-23 Brief description of ASM hardware A.6 ASM 854 Input parameters for ASM 854 The assignment is made in UDT 10 (see Section "Parameter data block"). Table A-16 Input parameters for ASM 854 Address +0.0 Name ASM_address +2.0 +8.0 ASM_channel MDS_control Permissible values 256, 264, 272, 280, ... 1, 2, 3, 4 B#16#0, 1 +9.0 +9.1 +10.0 +11.0 +12.0 +13.0 +14.0 +15.0 +16.0 ECC_mode RESET_long MOBY_mode scanning_time option_1 distance_limiting multitag field_ON_control field_ON_time FALSE FALSE B#16#A, B B#16#00 B#16#00, 01, 04, 08 B#16#0 B#16#1 B#16#0 B#16#0 Comment Each ASM 854 occupies 8 byte of I/O in the I/O area of the control unit 4 parallel channels 0 = no presence check 1 = presence check (must always be set when using MOBY_mode = A (MDS F1xx)) No ECC driver (no MOBY U) Only MOBY F parameterization No parameterization of the scanning time (See Section "INPUT parameters") Not relevant (no MOBY U) Table of commands for ASM 854 The assignment is made in UDT 20 using the "Command" variable (see Section "Command parameter settings"). Table A-17 Commands of the ASM 854 when MOBY_mode = B Description Command code normal Chained 01 41 Write to MDS 02 42 Read MDS 03 43 Initialize MDS 0A 4A Antenna on/off The command table is valid for the FB 45. No commands are transferred to the ASM when fixed-code MDSs are processed with the process image. Special features of the fixed-code MDS (MOBY_mode = A) When in this mode, the ASM automatically reads each new MDS as it arrives. The user does not need to start a command. The user issues the read command using UDT 20. repeat_command and command_start must then be issued simultaneously to start the command and fetch the data. Switch settings, interfaces and indicators of the ASM 854 See Section "Switch settings, interfaces and indicators of the ASM 454" in Chapter "ASM 454" A-24 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.6 ASM 854 Parameterizing process image mode Note Process image mode does not use the FB 45. This section describes how to handle and program the process image mode. Only fixed-code MDSs of type "MDS F1xx" can be read in this mode. Process image mode is parameterized in HW Config by selecting the appropriate entry from the GSD file. Process image mode does not offer functions for the application. 2QO\RQH6/$LVXVHGRQ WKH$60 $60BFKDQQHO $OOIRXUFKDQQHOVRQWKH $60DUHLQXVH Figure A-8 Selecting process image mode for ASM 854/850 based on the number of channels Process image mode: Operating principle After the ASM and PROFIBUS have powered up, code 00 00 00 00 00 is stored in the process image for each MDS. Each SLA channel immediately starts to scan its surroundings for a new MDS no. As soon as the MDS no. has been read, the process image indicates the fixed-code information. The new MDS no. is retained until an MDS with a new no. is read. The new MDS overwrites the old number. The data must be read to a data block with SFC 14 to ensure that the number is always transferred consistently with PROFIBUS or is indicated on the S7. In addition to the 5 bytes of fixed-code information, status information is located in the 1st byte of the process image which the user can evaluate. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-25 Brief description of ASM hardware A.6 ASM 854 Process image mode: Programming The data must be scanned by SFC 14 to ensure consistent representation of the information which was read. The following example shows the programming of the ASM 854 in process image mode. Block: OB1 MOBY F with ASM 854 in process image mode Network: 1 The data of 9 MOBY F channels are read consistently to DB 20. The 9 channels are distributed over 3 ASM 854s. CALL "DPRD_DAT" LADDR :=W#16#0 RET_VAL :=MW0 RECORD :=P#DB20.DBX 0.0 BYTE 24 // = SFC14 // 1st ASM 854 has I/O address 0 // The data are stored in DB 20 starting at address 0. Since 4 channels are used, the data length is 24 bytes. CALL "DPRD_DAT" LADDR :=W#16#24 RET_VAL :=MW1 RECORD :=P#DB20.DBX 24.0 BYTE 24 // 2nd ASM 854 has I/O address 24 // The data are stored in DB 20 starting at address 24. Since 4 channels are used, the data length is 24 bytes. CALL "DPRD_DAT" LADDR :=W#16#48 RET_VAL :=MW2 RECORD :=P#DB20.DBX 48.0 BYTE 6 // 3rd ASM 854 has I/O address 48 // The data are stored in DB 20 starting at address 48. Since 1 channel is used, the data length is 6 bytes. // New data can be processed in DB20 starting here. A-26 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.6 ASM 854 Process image mode: data representation and evaluation The following figure shows the layout of the ASM data after SFC 14 is called. The presentation also applies when the ASM data are directly viewed in the process image. &KDQQHO 6WDWXV>@ 'DWD 'DWD 6WDWXV>@ 'DWD 'DWD 'DWD 'DWD 'DWD 6WDWXV>@ 'DWD 'DWD 'DWD 'DWD 'DWD 6WDWXV>@ 'DWD 'DWD 'DWD 'DWD 'DWD 'DWD 'DWD 'DWD &KDQQHO &KDQQHO &KDQQHO 06%RIGDWD /6%RIWKHGDWD 5HODWLYHDGGUHVV LQ'%RULQ SURFHVVLPDJH %LW (UURU &K &K &K +5 35( = = 7ZRELWFRXQWHU7KLVFRXQWHULVDOZD\V LQFUHPHQWHGE\RQHZKHQDQHZ0'6LVUHDG $IWHUDFKDQJHLQWKHFRXQWHUGDWDWR FRQWDLQDQHZ0'6QXPEHU 3UHVHQFHLQGLFDWHVWKHSUHVHQFHRIDQ0'6LQWKH WUDQVPLVVLRQZLQGRZRIDQ6/$ +LVWRULFDOUHDGLQIRELW$VHWELWLQGLFDWHVWKDWWKH0'6PRYHG DFURVVWKHILHOGDWPD[LPXPSRVVLEOHVSHHG7KHGDWDFRXOGRQO\EH UHDGRQFHIURPWKH0'6 ,QIRUPDWLRQRQFKDQQHODOORFDWLRQRIWKHGDWD &KDQQHO &KDQQHO &KDQQHO &KDQQHO (UURUPHVVDJHLIHUURU 7KHGDWDDUHLQYDOLG'DWDE\WHFRQWDLQVDQHUURUFRGH 7KHIROORZLQJHUURUFRGHVDUHSRVVLEOH KH[ WKH0'6GDWDKDYHFKDQJHGZLWKRXWDSUHVHQFHFKDQJH )KH[ $60SRZHUXSWKHFRXQWHUV = KDYHEHHQUHVHWWR KH[ LQWHUQDOUXQWLPHHUURURQ$60 Figure A-9 Data presentation and evaluation in process image mode FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-27 Brief description of ASM hardware A.6 ASM 854 Process image mode: time diagram (UURU = = 35( 'DWD (UURU) 6WDUWXSRI $60 Figure A-10 A-28 VW0'6 QG0'6 UG0'6 1RUPDOUHDGLQJRI QHZ0'6 WK0'6 WK0'6 7KHVDPH0'6HQWHUV WKHUHDGILHOGVHYHUDO WLPHV1RFKDQJHRQ = Time diagram for process image mode FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Brief description of ASM hardware A.7 ASM 850 A.7 A.7 ASM 850 The ASM 850 is a PROFIBUS slave. One MOBY F SLA can be connected. In addition to standard programming with the FB 45, the ASM 850 can also directly process the fixed-code data memories (type MDS F1xx) using the process image. The programming is described in Section "ASM 854". 352),%86PDVWHU 9 '& 6 )&)% 6 )&)% 2WKHUPDVWHU WKLUGSDUW\)&)% $60BFKDQQHO 6/$ a 9 352),%86 '39 02% Install new GSD ...". Sie finden die Datei auf der CD RFID Systems Software & Documentation in the directory daten\PROFI_GSD\ASM454-754-85x. FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 A-29 Brief description of ASM hardware A.7 ASM 850 Input parameters for ASM 850 The assignment is made in UDT 10 (see Section "Parameter data block"). Table A-18 Input parameters for ASM 850 Address Name Permissible values 256, 264, 272, 280, ... +0.0 ASM_address +2.0 +8.0 ASM_channel MDS_control 1 B#16#0, 1 +9.0 +9.1 +10.0 +11.0 ECC_mode RESET_long MOBY_mode scanning_time FALSE FALSE B#16#A, B B#16#00 +12.0 option_1 +13.0 +14.0 +15.0 +16.0 distance_limiting multitag field_ON_control field_ON_time B#16#00, 01, 04, 08 B#16#0 B#16#1 B#16#0 B#16#0 Comment Each ASM 850 occupies 8 byte of I/O in the I/O area of the control unit 1 channel 0= no presence check 1= presence check No ECC driver (no MOBY U) Only MOBY F parameterization No parameterization of the scanning time (See Section "INPUT parameters") Not relevant (no MOBY U) Table of commands for ASM 850 The assignment is made in UDT 20 using the "Command" variable (see Section "Command parameter settings"). Table A-18 Commands of the ASM 850 Command code Description normal Chained 01 41 Write to MDS 02 42 Read MDS; read fixed code 03 43 Initialize MDS 0A 4A Antenna on/off The command table is valid for the FB 45. No commands are transferred to the ASM when fixed-code MDSs are processed with the process image. Switch settings, interfaces and indicators of the ASM 850 See Section "Switch settings, interfaces and indicators of the ASM 454" in Chapter "ASM 454" A-30 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 B Programming the MOBY-ASM on PROFIBUS B.1 B.1 B Programming the MOBY-ASM on PROFIBUS DP-V1 For whom is this Appendix intended? This section does not need to be considered by SIMATIC users. It is intended particularly for programmers of PCs and third-party PLCs. The information enables the programmer to develop customized function blocks or drivers for the MOBY-ASM. Note Some signals in this appendix have the same meaning as the variables in Section "Parameter data block". In order to distinguish between them, an underscore "_" is appended to the relevant signals (e.g. ANZ_MDS_present_). FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 B-1 Programming the MOBY-ASM on PROFIBUS B.1 Programming the MOBY-ASM on PROFIBUS DP-V1 Communication between ASM and PROFIBUS master PROFIBUS-DP must be able to transfer both the cyclic (DP) and the non-cyclic data (DPV1). 352),%86'3 PDVWHUZLWK '39IXQFWLRQ 352),%86'39 02%<$60 &\FOLFFRPPXQLFDWLRQYLD 352),%86'36WDWXVLQIRUPDWLRQLV H[FKDQJHG VHH6HFWLRQ&\FOLFFRQWUROZRUG EHWZHHQPDVWHUDQG02%<$60 02%<$60 2WKHUILHOG GHYLFHV $F\FOLFFRPPXQLFDWLRQYLD 352),%86'39&RPPDQGVDQG DFNQRZOHGJHPHQWVDUHH[FKDQJHG VHH6HFWLRQ&RPPDQGDQG DFNQRZOHGJHPHQWWHOHJUDPV The master may only send new commands to the slave (MOBY-ASM) when the ASM is ready. Status information is used to indicate that the MOBY-ASM is ready. The same applies to acknowledgments. The MOBY-ASM may only fetch new acknowledgments when a new acknowledgment is actually waiting (i.e. has not yet been read). This information is also indicated by a state info. Two indications are defined in the state info. The PROFIBUS DP master uses these two indications to decide whether a DP-V1 telegram can be executed to or from the MOBY-ASM. B-2 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Programming the MOBY-ASM on PROFIBUS B.1 Programming the MOBY-ASM on PROFIBUS DP-V1 Principle of controlling non-cyclic communication with command and acknowledgment counter $FNQRZOHGJHPHQWFRXQWHU &RPPDQGFRXQWHU '3 9 02 DF %< WLYH $6 0 WH UDP OHJ HJ WHO 9 UDP &R UHD PPD G\ QG '3 D PP &R G\ UHD 02%<$60 DFWLYH '39WHOHJUDP JUDP WHOH '39 QG 0 $6 %< 2 0 LYH W DF OH P JUD H W '39WHOHJUDP 02 DF %< WLYH $6 0 &R UHD PPD G\ QG JUDP WHOH '39 PDQ &RP \ G UHD G '3 9 WH 9 '3 OHJ UDP 6WDWXVRIFRXQWHUVDIWHU$60SRZHUXSRUDIWHUDQLQLWBUXQB Figure B-1 Command and acknowledgement counter states As you can see from the diagram above, a DP-V1 telegram triggers the change from one defined state to the next. A new DP-V1 telegram is not permitted until the next state is reached. A DP-V1 telegram is either a command to the ASM or an acknowledgment from the ASM. For this reason, it is important to tell the master whether a new DP-V1 telegram can be executed. Each state is coded in 2 bits and counted up (as shown in the diagram above)hence the name state bits or state counters. The state bits are transmitted cyclically to the master via PROFIBUS DP. The user must evaluate the bits in his program. When the state bit changes, a new state (new state = old state + 1) is created. Only now can the next DP-V1 telegram be sent. Two states must be coded. 1. Command state (command counter) to tell the user whether a new/next command may be transferred to the MOBY-ASM 2. Acknowledgment state (acknowledgment counter) to tell the user whether a new acknowledgment from the MOBY-ASM is waiting FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 B-3 Programming the MOBY-ASM on PROFIBUS B.1 Programming the MOBY-ASM on PROFIBUS DP-V1 The user must evaluate the acknowledgement state with higher priority. I.e. when the user wants to send a telegram to the ASM but a telegram from the ASM is waiting to be fetched at the same time, the telegram from the ASM must be fetched first. Both the command and the acknowledgment state are coded in 2 bits each. Both states are stored in a byte (see Section "Cyclic control word between master and MOBY-ASM"). B-4 FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 Programming the MOBY-ASM on PROFIBUS B.2 Cyclic Control Word between Master and MOBY-ASM B.2 B.2 Cyclic Control Word between Master and MOBY-ASM The cyclic control word is used to synchronize telegram communication between master (FB / FC) and slave (MOBY-ASM). The actual non-cyclic command and acknowledgment frames via DP-V1 may not be started until this is indicated by the cyclic byte of the MOBY-ASM in the command or acknowledgment counter. &\FOLFZRUGWR02%<$60 3HULSKHUDORXWSXW UHSHDWBFRPPDQGB RSWLRQDO 5HVHUYHG LQLWBUXQB 6WDUWXSRI352),%86'3PDVWHU 7KLVELWIRUFHVD02%<$60VWDUWXS %LWLVVXEVHTXHQWO\VHWLQWKHSHULSKHUDO LQSXW FDQFHOB FRPPDQGWHUPLQDWLRQ 5HVHUYHGIRU'2 &\FOLFZRUGIURP02%<$60 3HULSKHUDOLQSXW 6WDUWXSPHVVDJH 7KLVELWLQGLFDWHVWKDWWKH02%<$60KDVVWDUWHGXS $1=BUHVHWB :KHQLQLWBUXQBLVUHVHWWKH02%<$60FDQFHOVWKLV ELWDJDLQ2WKHUFRPPDQGVH[FHSWIRU5(6(7RUDQ LQYDOLG5(6(7FRPPDQGDUHWKHQGHQLHGZLWKDQHUURU PHVVDJH Figure B-2 5HDGHUBHUURU 02%<8RQO\ 0'6BSUHVHQFHB FKDQJHGB $1=BFDQFHOB IRU)&)% &DQFHO XQXVHG DFNQRZOHGJH PHQW 5HVHUYHG $FNQRZOHGJHPHQWFRXQWHUORZHUELW 4/ $FNQRZOHGJHPHQWFRXQWHUKLJKHUELW 4+ QXPEHUB0'6B 02%<8RQO\ $1=B0'6B SUHVHQWB SUHVHQFH &RPPDQGFRXQWHUORZHUELW %/ &RPPDQGFRXQWHUKLJKHUELW %+ $60BEXV\B 2SHUDWLRQZLWKUHSHDWBFRPPDQGB $FRPPDQGLVFXUUHQWO\EHLQJ SURFHVVHGE\WKH0'6 7KHELWLVVHWDVVRRQDVDQ0'6 HQWHUVWKHILHOGRIWKHUHDGHUZKLOHWKH UHSHDWBFRPPDQGELWLVVHW7KHELWLV UHVHWZKHQWKH0'6FRPPXQLFDWLRQ LVFRPSOHWH7KHUHVXOWVPD\QRW KDYHEHHQWUDQVPLWWHGWRWKH$60 KRZHYHU 2SHUDWLRQZLWKRXWUHSHDWBFRPPDQGB %LWLVDFWLYHDVVRRQDVWKH$60LV SURFHVVLQJDFRPPDQG FRPPDQGBUHSHDWBDFWLYHB 7KLVELWLVWKHFRQILUPDWLRQ PLUURULQJ RI UHSHDWBFRPPDQGB,WLVXVHGIRULQIRUPDWLRQ DQGHUURUDQDO\VLV7KHFRPPDQGUHSHWLWLRQ ZDVVWDUWHGRQWKH$60EHWZHHQVHWWLQJRI UHSHDWBFRPPDQGBDQGUHDGRXWRIWKHHQDEOHG FRPPDQGBUHSHDWBDFWLYHELW Structure of the cyclic control word FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 B-5 Programming the MOBY-ASM on PROFIBUS B.2 Cyclic Control Word between Master and MOBY-ASM After start-up, the cyclic word of MOBY-ASM takes on the following states (bits 8 to 15 are shown). %HIRUH FRPPDQG 3RZHUXS %HIRUHDFNQRZO %HIRUH %HIRUHDFNQRZO $IWHU FRPPDQG HGJHPHQW FRPPDQG HGJHPHQW &RPPDQG &RPPDQG &RPPDQG 5(6(7 Synchronizing of command and acknowledgment counters The command (BZ) and acknowledgment (QZ) counters are synchronized during a start-up. The ASM sets QZ = 0 and BZ = 1. The start-up can be triggered by both the ASM (return of power) and the user (init_run_). LQLWBUXQB $1=BUHVHWB $F\FOLF WHOHJUDP 5(6(7FRPPDQG WR$60 5(6(7FRPPDQG IURP$60 UHDG\ %=4= DQ\YDOXH %= 4= GHILQHGUHVHW %= 4= UHDG\ UHDG\PHVVDJHLQXVHUSURJUDP Figure B-3 ,IDFRPPDQGZDVLQWHUUXSWHG E\D5(6(7 RU LQLWBUXQB HUURUPHVVDJH )LVWULJJHUHGKHUH Power-up timing initiated by user LQLWBUXQB $1=BUHVHWB $F\FOLF WHOHJUDP UHDG\ %= 5(6(7FRPPDQG WR$60 %= %= 5(6(7FRPPDQG IURP$60 4= UHDG\ UHDG\PHVVDJHLQXVHUSURJUDP Figure B-4 B-6 Power-up timing of ASM initiated by power failure FB 45 Function manual, Release 03/2006, J31069-D0166-U001-A2-7618 Programming the MOBY-ASM on PROFIBUS B.2 Cyclic Control Word between Master and MOBY-ASM Terminating a command with Cancel BZ and QZ are not reset with Cancel. FDQFHOB $1=BFDQFHOB $F\FOLF WHOHJUDP $FNQRZOHGJHPHQWZLWK HUURU) UHDG\ &DQFHOLIQRFRPPDQG DFWLYDWHG 4= 4= &DQFHOLI$60FXUUHQWO\SURFHVVLQJDFRPPDQG RQO\RQHHUURUDFNQRZOHGJHPHQWLVPDGHLIVHYHUDOFRPPDQGV FRPPDQGFKDLQV DUHFDQFHOHG WKHLQFUHPHQWDWLRQRI4=DQGZLWKGUDZDORI$Q]BFDQFHOBFDQEHLQGLFDWHGVLPXOWDQHRXVO\WRWKHXVHU UHDG\ UHDG\PHVVDJHLQXVHUSURJUDP Figure B-5 Cancel timing FC 45 Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618 B-7 Programming the MOBY-ASM on PROFIBUS B.3 Methods of operation with the ASM B.3 B.3 Methods of operation with the ASM Commands are executed one at a time This means that, after each command, the user must wait for the acknowledgment (result) before the next command is sent to the ASM. This type of programming involves the following characteristics. * Simple function block programming * No optimal-speed data transmission for several consecutive commands The following diagram shows the sequence of command and acknowledgement exchange between user (DP master) and MOBY-ASM. 02%