SIMATIC NET AS-Interface Master Module CP 242-2 Volume 1 of 1 1 Introduction 2 Technical Description and Installation Guidelines for the CP 242-2 3 Interface to the User Program 4 Standard Operation 5 Extended Operation 6 Replacing a Defective Slave / Automatic Address Programming 7 Error Indicators of the CP 242-2 / Dealing with Errors Appendix A AS-Interface Protocol Implementation Conformance Statement (PICS) B References C Abbreviations and Glossary D Notes on the CE Label C79000-
Wir haben den Inhalt der Druckschrift auf Übereinstimmung mit der beschriebenen Hard- and Software geprüft. Dennoch können Abweichungen nicht ausgeschlossen werden, so daß wir für die vollständige Übereinstimmung keine Gewähr übernehmen. Die Angaben in der Druckschrift werden jedoch regelmäßig überprüft. Notwendige Korrekturen sind in den nachfolgenden Auflagen enthalten. Für Verbesserungsvorschläge sind wir dankbar.
SIMATIC NET AS-Interface Master Module CP 242-2 Description C79000-B8976-C105
Note We would point out that the contents of this product documentation shall not become a part of or modify any prior or existing agreement, commitment or legal relationship. The Purchase Agreement contains the complete and exclusive obligations of Siemens. Any statements contained in this documentation do not create new warranties or restrict the existing warranty.
B8976105/01 Contents Contents 1 Introduction ............................................................................................... 1-1 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 General ........................................................................................................................... 1-2 Overview of the Chapters................................................................................................. 1-2 Symbols and Conventions Used in the Text .........................
Contents B8976105/01 5.2 5.2.1 5.2.1.1 5.2.1.2 5.2.1.3 5.2.1.4 5.2.1.5 5.2.1.6 5.2.1.7 5.2.1.8 5.2.1.9 5.2.1.10 5.2.1.11 5.2.1.12 5.2.1.13 5.2.1.14 5.2.1.15 5.2.1.16 5.2.1.17 5.2.1.18 5.2.1.19 5.2.1.20 5.2.1.21 5.2.1.22 5.2.1.23 5.2.1.24 5.2.1.25 Description of the AS-i Commands............................................................................... 5-4 Commands Supported by the CP 242-2 ........................................................................... 5-4 Set_Permanent_Parameter........
B8976105/01 1 AS-i Master Module CP 242-2 Introduction This manual describes the functions and programming of the CP 242-2. Before you read this manual, it is assumed that you know the contents of the manual 'AS-Interface Introduction and Basic Information’. We recommend the following procedure when... ...you want an overall picture of the ASInterface. ´ Read the manual ‘AS-Interface Introduction and Basic Information'.
AS-i Master Module CP 242-2 1.1 B8976105/01 General 1.1.1 Overview of the Chapters Chapter 1 Introduction Chapter 1 contains general information about the layout and use of the manual. Chapter 2 Technical Description and Installation Guidelines for the CP 242-2 Chapter 2 provides you with an overview of the modes, installation and startup and the display and control elements of the CP 242-2.
B8976105/01 1.1.2 AS-i Master Module CP 242-2 Symbols and Conventions Used in the Text General symbols in the text: This symbol indicates an action for you to perform. ± This symbol indicates a list. This symbol highlights special features or dangers. 1.1.3 Requirements for Understanding the Manual To fully understand the manual, you should already be familiar with the following: ± STEP 7 microprogramming ± The ‘AS-Interface Introduction and Basic Information' manual. 1.1.
AS-i Master Module CP 242-2 B8976105/01 1-4
B8976105/01 2 AS-i Master Module CP 242-2 Technical Description and Installation Guidelines for the CP 242-2 This chapter outlines the basic functions of the CP 242-2 and explains how the module is installed and started up. You will learn the following: ± Which PLC systems can be operated using the CP 242-2 on the AS-Interface. ± How to install the CP 242-2. ± Which modes are supported by the CP 242-2.
AS-i Master Module CP 242-2 2.1 2.1.1 B8976105/01 Overview of the Module Introduction The CP 242-2 module can be operated in the S7-200 programmable controller. It allows the connection of an AS-i chain to this programmable controller.
B8976105/01 2.1.2 AS-i Master Module CP 242-2 Technical Data of the Module The CP 242-2 module has the following technical data: Bus cycle time Configuration AS-i master profiles supported Attachment to the AS-i cable Address range Power supply SIMATIC backplane bus Current consumption from the AS-i cable Power supply from the AS-i cable Current consumption from 5 V DC 5 ms with 31 slaves Using button on the front panel or with the “Configure Total System” command in extended operation (Section 5.
AS-i Master Module CP 242-2 2.1.3 B8976105/01 Display and Control Elements of the CP 242-2 The following diagram shows the front panel of the CP 242-2 with its displays and control elements. The AS-i cable is connected below the front panel at the front of the CP 242-2. The SET and DISPLAY buttons are below the front cover on the front of the CP 242-2.
B8976105/01 AS-i Master Module CP 242-2 2.1.3.1 Meaning of the Display and Control Elements The front panel of the CP 242-2 has a row of 8 LEDs. The upper three LEDs are the group indicators. The meaning of the lower 5 LEDs depends on the status of the group indicators. ± If none of the group indicator LEDs is lit, the lower 5 LEDs indicate the status of the CP 242-2. The labeling to the right of the LEDs then indicates the meaning. The default display is this status display.
AS-i Master Module CP 242-2 CM (yellow) B8976105/01 Configuration Mode. This displays the operating mode of the CP 242-2. LED lit: LED unlit: Configuration mode Protected mode The configuration mode is only required when installing the CP 242-2. In the configuration mode, the CP 242-2 activates all connected slaves and exchanges data with them. For more information about the configuration mode, refer to Section. 2.1.7 . 2.1.3.
B8976105/01 AS-i Master Module CP 242-2 2.1.3.4 Meaning of the Buttons SET button The SET button is required for configuring the CP 242-2 in standard operation. ± This button is only effective when the PLC_RUN bit is set to ‘0’ in the control byte of the CP 242-2. This is always the case when the S7-200 CPU is in the STOP mode. If the CP 242-2 is in the configuration mode (the “CM” LED is lit), you can configure automatically by pressing the button the CP 242-2.
AS-i Master Module CP 242-2 2.1.4 B8976105/01 Slots Permitted for the CP 242-2 in the SIMATIC S7-200 System The CP 242-2 can be inserted in all slots for expansion modules in the S7-200 programmable controller. There may, however, be restrictions depending on the CPU or power supply unit being used in terms of the following: ± Expandability with several expansion modules, ± The electrical configuration, in other words the total current consumption from the S7 backplane bus. 2.1.
B8976105/01 2.1.6 AS-i Master Module CP 242-2 Addressing the CP 242-2 in the PLC From the point of view of the S7-200 CPU, the CP 242-2 behaves logically as if it were two consecutive expansion modules: ± The first module is an 8DI/8D0 digital module. It occupies 8 input and 8 output bits in the address base of the digital inputs and outputs. The 8 input bits form the status byte of the CP 242-2. Using this byte, the CP 242-2 transfers status information to the PLC user program.
AS-i Master Module CP 242-2 B8976105/01 2. CPU 214 and one CP 242-2 CPU 214 I0.0 I0.1 I0.2 I0.3 I0.4 I0.5 I0.6 I0.7 I1.0 I1.1 I1.2 I1.3 I1.4 I1.5 CP 242-2 Q0.0 Q0.1 Q0.2 Q0.3 Q0.4 Q0.5 Q0.6 Q0.7 Q1.0 Q1.1 I2.0 I2.1 I2.2 I2.3 I2.4 I2.5 I2.6 I2.7 Q2.0 Q2.1 Q2.2 Q2.3 Q2.4 Q2.5 Q2.6 Q2.7 AIW0 AIW2 AIW4 AIW6 AIW8 AIW10 AIW12 AIW14 AQW0 AQW2 AQW4 AQW6 AQW8 AQW10 AQW12 AQW14 3. CPU 214 and two CP 242-2s CPU 214 I0.0 I0.1 I0.2 I0.3 I0.4 I0.5 I0.6 I0.7 I1.0 I1.1 I1.2 I1.3 I1.4 I1.5 CP 242-2 Q0.0 Q0.1 Q0.
B8976105/01 AS-i Master Module CP 242-2 4. CPU 214, one 8DI module, one 3AI/1AO module and one CP 242-2 CPU 214 I0.0 I0.1 I0.2 I0.3 I0.4 I0.5 I0.6 I0.7 I1.0 I1.1 I1.2 I1.3 I1.4 I1.5 2.1.7 Q0.0 Q0.1 Q0.2 Q0.3 Q0.4 Q0.5 Q0.6 Q0.7 Q1.0 Q1.1 8DI 3AI / 1AO I2.0 I2.1 I2.2 I2.3 I2.4 I2.5 I2.6 I2.7 AIW0 AIW2 AIW4 CP 242-2 AQW0 I3.0 I3.1 I3.2 I3.3 I3.4 I3.5 I3.6 I3.7 Q2.0 Q2.1 Q2.2 Q2.3 Q2.4 Q2.5 Q2.6 Q2.
AS-i Master Module CP 242-2 B8976105/01 Configuration of the CP 242-2 during installation and startup of the AS-i network The following situation is assumed: The connected AS-i slaves have been supplied with unique addresses (for example using an address programming device). The AS-Interface is complete, in other words the AS-i power supply unit is in operation and the slaves are connected to the AS-i cable.
B8976105/01 3 3.1 AS-i Master Module CP 242-2 Interface to the User Program Overview From the point of view of the S7-200 CPU, the CP 242-2 occupies two consecutive expansion module slots (one 8DI/8DO digital module followed by an 8AI/8AO analog module). In addition to this, the system registers required for an S7-200 expansion module for the digital and analog module are available. The S7-200 CPU and CP 242-2 AS-i master module are coordinated via the digital module.
AS-i Master Module CP 242-2 3.2 B8976105/01 Meaning of the Data in the Digital Module The digital module of the CP 242-2 consists of four registers: ± 8-bit identification register ± 8-bit error register ± 8-bit input register 8DI (status byte of the CP 242-2) ± 8-bit output register 8DO (control byte of the CP 242-2) 3.2.1 Identification Register The identification register can be read via the special memory area of the S7-200 CPU and produces the fixed value 05 hex.
B8976105/01 AS-i Master Module CP 242-2 Example : Access to the error register in the digital module of the CP 242-2 Situation: The CP 242-2 is inserted directly beside the S7-200 CPU Evaluate bits SM9.0 and SM9.2 in the SM area (Special Memory of the S7-200 CPU). If an error has occurred, bit SM 9.0 and/or bit SM9.2 is set. 3.2.3 Bit 7 0 Status Byte Bit 6 RESPONSE Bit 5 0 Bit 4 0 Bit 3 0 Bit 2 0 Bit 1 CP_READY Bit 0 MODE This register indicates the status of the CP 242-2.
AS-i Master Module CP 242-2 B8976105/01 COMMAND Job bit for the command interface (see Chapter 5. Extended Operation) BS3_BS0 Page select bits for page changeover in the analog module (see Section 3.
B8976105/01 3.3 AS-i Master Module CP 242-2 Meaning of the Data in the Analog Module The analog module of the CP 242-2 consists of the following: ± 8-bit identification register ± 8-bit error register ± 8 analog input words 8AI ± 8 analog output words 8AO 3.3.1 Identification Register The identification register can be read via the special memory area of the S7-200 CPU and produces the fixed value 1F hex. This signals the existence of an 8AI/8AO analog module. 3.3.
AS-i Master Module CP 242-2 B8976105/01 The four page select bits are coded in binary as follow: BS3 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 BS2 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 BS1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 BS0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Page No.
B8976105/01 AS-i Master Module CP 242-2 Page 0 Slave Inputs Using these analog input words, you can access the input bits of the AS-i slaves. The structure is described in Section 4.1 “How the PLC Addresses the Slaves on the AS-i Cable”. Page 1 Diagnostics This page indicates the delta list of the AS-i slaves. The delta list contains any differences between the actual configuration and the desired configuration.
AS-i Master Module CP 242-2 3.3.5 B8976105/01 Analog Output Area The following diagram shows the assignment of the analog output words to the 16 pages of the CP 242-2 from the point of view of the PLC. S7-200 CPU CP 242-2 Page-select bits PLC view Memory assignment BS3...
B8976105/01 4 AS-i Master Module CP 242-2 Standard Operation Standard operation represents the most common and at the same time simplest use of the CP 242-2. It allows access to the inputs and outputs of the slaves. 4.1 How the PLC Addresses the Slaves on the AS-i Cable Before you can access the I/O data of the AS-i slaves, the following requirements must be met: ± Set the “PLC_RUN” bit (bit 7) in the digital control byte to ‘1’ at the beginning of the cyclic program.
AS-i Master Module CP 242-2 B8976105/01 Assignment of the output data of the slaves Byte Number Bit 7-4 Bit 3-0 n+0 reserved slave 1 bit 4 n+1 n+2 n+3 n+4 n+5 n+6 n+7 n+8 n+9 n+10 n+11 n+12 n+13 n+14 n+15 slave 2 slave 4 slave 6 slave 8 slave 10 slave 12 slave 14 slave 16 slave 18 slave 20 slave 22 slave 24 slave 26 slave 28 slave 30 bit 4 | bit 3 | bit 2 | bit 1 slave 3 slave 5 slave 7 slave 9 slave 11 slave 13 slave 15 slave 17 slave 19 slave 21 slave 23 slave 25 slave 27 slave 29 slave 31 |
B8976105/01 4.2 AS-i Master Module CP 242-2 Access to the AS-i User Data You access the I/O data of the AS-i slaves using the analog commands of the “STEP 7 Micro” programming language. If you want to access individual bits of the slave data, you can use the method shown in the following sample program (CPU 212 and CP 242-2).
AS-i Master Module CP 242-2 4.3 B8976105/01 Signaling Errors and Diagnostics If the CP 242-2 recognizes errors on the ASi-Interface (AS-i slave failure, AS-i Power Failure) during operation, it signals these errors by resetting the input data of the affected slave and by setting the corresponding bit in the error register in the SM area (Special Memory). The SM byte addresses depend on the slot of the CP 242-2. Example: The CP 242-2 is plugged in directly beside the S7-200 CPU.
B8976105/01 5 AS-i Master Module CP 242-2 Extended Operation This section explains the range of functions available for the CP 242-2 over and above those provided by standard operation. Extended operation allows the complete control of a CP 242-2 master from within the user program. Access to the inputs and outputs is the same as when the CP 242-2 is in standard operation. 5.1 How the Command Interface Functions Command calls are made to the CP 242-2 from within the user program.
AS-i Master Module CP 242-2 B8976105/01 Requirements ± The PLC_RUN bit is set to '1' in the control byte of the CP 242-2. ± By setting the CP_READY bit in the status byte to '1’, the CP 242-2 signals that it is ready to execute commands. If CP_READY is set to ‘0’, no AS-i program execution is possible. Sequence A command is only accepted when the COMMAND and RESPONSE bit are reset.
B8976105/01 MEND NETWORK SBR AS-i Master Module CP 242-2 //Begin SBR “AS-i command execution” 3 NETWORK //Transfer of the command data LD EU UN UN SI Q1.1, 1 BMW VW932, AQW0, 8 SI Q1.0, 1 BMW VW948, AQW0, 8 SI Q1.2, 1 RI Q1.0, 2 BMW VW964, AQW0, 8 SI Q1.0, 1 BMW VW980, AQW0, 8 RI Q1.0, 4 SI Q1.6, 1 //If {trigger bit //pos.
AS-i Master Module CP 242-2 5.2 B8976105/01 Description of the AS-i Commands The following sections describe the AS-i command calls that can be sent by the S7-200 system to the CP 242-2. With these command calls, the CP 242-2 provides the complete functionality of the M1 master profile of the AS-i master specification. In addition to this, the CP 242-2 can be configured completely using command calls by the S7-200 system. 5.2.
B8976105/01 Section 5.2.1.1 Name Set_Permanent_Parameter 5.2.1.2 5.2.1.3 Get_Permanent_Parameter Write_Parameter 5.2.1.4 5.2.1.5 5.2.1.6 Read_Parameter Store_Actual_Parameters Set_Permanent_Configuration 5.2.1.7 Get_Permanent_Configuration 5.2.1.8 Store_Actual_Configuration 5.2.1.9 Read Actual Configuration Data 5.2.1.10 Set_LPS 5.2.1.11 Set_Offline_Mode 5.2.1.12 Select Autoprogramming 5.2.1.13 Set_Operation_Mode 5.2.1.14 Change_Slave_Address 5.2.1.15 Read Slave Status 5.2.1.
AS-i Master Module CP 242-2 B8976105/01 General structure of the command buffer Page 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 4 4 4 5 5 5 Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 : 15 0 : 15 0 : 15 Meaning / Content Command number Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Parameter for job Pa
B8976105/01 AS-i Master Module CP 242-2 General structure of the response buffer: Page 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 4 4 4 5 5 5 Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 : 15 0 : 15 0 : 15 Meaning / Content Command number (echo) Command status Response data Response data Response data Response data Response data Response data Response data Response data Response data Response data Response data Response data Response data Response data Response data Response data Response data Response d
AS-i Master Module CP 242-2 B8976105/01 Meaning of the command status in the response buffer: Value Meaning 00H Job completed without error 81H Slave address incorrect 82H Slave is not activated (not in LAS ) 83H Error on the AS-Interface 84H Command not permitted in the current state of the CP 242-2 85H Slave 0 exists A1H Slave with address to be modified not found on AS-Interface A2H Slave 0 exists A3H Slave with new address already exists on AS-Interface A4H Slave address cannot b
B8976105/01 AS-i Master Module CP 242-2 5.2.1.1 Set_Permanent_Parameter Meaning With this call, a parameter value for the specified slave is transferred to the CP 242-2. The value is saved permanently as a configured value. The parameter is not transferred immediately to the slave by the CP 242-2. The parameter value is only transferred after the power supply of the PLC is turned on and the slave is activated.
AS-i Master Module CP 242-2 B8976105/01 5.2.1.3 Write_Parameter Meaning With this call, a parameter value is transferred and sent directly via the AS-i bus to the addressed slave. The parameter is saved only temporarily on the CP 242-2. The slave transfers the current parameter value in the response. This can deviate from the values that have just been written according to the AS-i master specification (/2/). The slave response is entered in the parameter echo field.
B8976105/01 AS-i Master Module CP 242-2 5.2.1.5 Store_Actual_Parameters Meaning This call overwrites the permanently stored configured parameters with the actual parameters, in other words the parameters are reconfigured. Structure of the Command Buffer Page Byte Meaning 2 0 04H Structure of the Response Buffer Page Byte Meaning 2 0 04H 2 1 Command status 5.2.1.
AS-i Master Module CP 242-2 B8976105/01 5.2.1.7 Get_Permanent_Configuration Meaning This call returns the desired configuration data of an addressed slave stored permanently in the EEPROM (I/O configuration data and the ID codes).
B8976105/01 AS-i Master Module CP 242-2 5.2.1.8 Store_Actual_Configuration Meaning This call stores the actual I/O configuration data and actual ID codes of all AS-i slaves permanently on the EEPROM as desired configuration data. The list of activated slaves (LAS) is also entered in the list of configured slave (LPS). When executing this command, the CP 242-2 changes to the offline phase and then switches to the normal mode (cold restart on the CP 242-2).
AS-i Master Module CP 242-2 B8976105/01 5.2.1.10 Set_LPS Meaning With this call, the list of configured slaves is transferred for permanent storage in the EEPROM. When executing this command, the CP 242-2 changes to the offline phase and then switches to the normal mode (cold restart on the CP 242-2 and reset on all slaves). This call is not executed in the protected mode.
B8976105/01 AS-i Master Module CP 242-2 5.2.1.11 Set_Offline_Mode Meaning This call switches between the online and offline mode. The OFFLINE bit is not permanently stored, in other words, during the startup/restart the bit is set to ONLINE again. In the offline mode, the CP 242-2 only processes jobs from the user. There is no cyclic data exchange. The online mode is the normal situation with the AS-i master.
AS-i Master Module CP 242-2 B8976105/01 5.2.1.12 Select Autoprogramming Meaning With this call, the automatic address programming function can be enabled or disabled. The AUTOADDRESS_ENABLE bit is stored permanently.
B8976105/01 AS-i Master Module CP 242-2 5.2.1.13 Set_Operation_Mode With this call, you can select between the configuration mode and the protected mode. In the protected mode, only slaves marked in the LPS and whose desired and actual configuration match are activated, in other words if the I/O configuration and the identification codes of the slaves in the LDS are identical to those of the configured values. In the configuration mode, all detected slaves (except slave address “0”) are activated.
AS-i Master Module CP 242-2 B8976105/01 5.2.1.14 Change_Slave_Address Meaning With this call, the slave address can be changed. This call is mainly used to add a new AS-i slave with the default address 0 to the AS-Interface. In this case, the address is changed from the old slave address (0) to the new slave address. This change can only be made when the following conditions are fulfilled: ± A slave with the old slave address exists.
B8976105/01 AS-i Master Module CP 242-2 5.2.1.15 Read Slave Status Meaning With this call, the status register of the addressed slave can be read out. The flags of the status register have the following significance: S0 “Address volatile” This flag is set - when the internal slave routine for permanent storage of the slave address is active. This can take up to 15 ms and must not be interrupted by a further addressing call.
AS-i Master Module CP 242-2 B8976105/01 5.2.1.
B8976105/01 AS-i Master Module CP 242-2 Flag 2 Flag 1 Bit Number 0 1 2 3 4 5 6 7 Meaning OFFLINE_READY APF NORMAL_MODE CONFIG_MODE AUTO_ADDR_AVAIL AUTO_ADDR_ASSIGN LDS_0 CONFIG_OK Bit Number 0 1 2 3 4 5 6 7 Meaning OFFLINE reserved EEPROM_OK AUTO_ADDR_ENABLE reserved reserved reserved reserved Meaning of the Flags OFFLINE_READY The flag is set when the offline phase is active. APF This flag is set when the voltage on the AS-i cable is too low.
AS-i Master Module CP 242-2 B8976105/01 5.2.1.17 Read Total Configuration Meaning With this command, the following data are read from the CP 242-2: ± The list of active slaves (LAS). This indicates which of the connected slaves are activated. ± The current configuration data of the connected slaves (I/O configuration and ID code). ± The current parameters of the slaves (actual parameters). ± The current flags.
B8976105/01 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 AS-i Master Module CP 242-2 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 ID_CODE slave 16 I/O configuration slave 16 ID_CODE slave 17 I/O configuration slave 17 ID_CODE slave 18 I/O configuration slave 18 ID_CODE slave 19 I/O configuration slave 19 ID_CODE slave 20 I/O configuration slave 20 ID_CODE slave 21 I/O configuration slave 21 ID_CODE slave 22 I/O configuration slave 22
AS-i Master Module CP 242-2 B8976105/01 5.2.1.18 Configure Total System Meaning With this call, the desired total configuration is transferred to the CP 242-2 and saved on the CP 242-2 as the desired configuration. This configures the CP 242-2. The following data are transferred: ± The list of configured slaves specifying the slaves that can be activated by the CP 242-2 in the protected mode. ± The list of configuration data specifying the ID codes and I/O configurations the slaves must have.
B8976105/01 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 AS-i Master Module CP 242-2 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 ID_CODE slave 19 I/O configuration slave 19 ID_CODE slave 20 I/O configuration slave 20 ID_CODE slave 21 I/O configuration slave 21 ID_CODE slave 22 I/O configuration slave 22 ID_CODE slave 23 I/O configuration slave 23 ID_CODE slave 24 I/O configuration slave 24 ID_CODE slave 25 I/O configuration slave 25 ID_CODE sl
AS-i Master Module CP 242-2 B8976105/01 Flag 1 Flag 2 Name RESERVED Bit Number 0 Name RESERVED Bit Number 0 RESERVED 1 RESERVED 1 RESERVED 2 RESERVED 2 CONFIG_MODE 3 AUTO_ADDR_EN 3 RESERVED 4 RESERVED 4 RESERVED 5 RESERVED 5 RESERVED 6 RESERVED 6 RESERVED 7 RESERVED 7 Only the gray shaded flags can be modified: CONFIG_MODE The entry ‘0’ means that the CP 242-2 starts up in the protected mode after synchronization.
B8976105/01 AS-i Master Module CP 242-2 5.2.1.19 Write Parameter List Meaning With this command, the parameters for all slaves are transferred to the CP 242-2. The CP 242-2 transfers only the parameters that have changed to the slaves, in other words that deviate from the current actual parameters.
AS-i Master Module CP 242-2 B8976105/01 5.2.1.20 Read Parameter Echo List Meaning When the parameters are transferred to the slave, they return “echo values” as the response. The read parameter echo list call reads out the echo values of all slaves.
B8976105/01 AS-i Master Module CP 242-2 5.2.1.21 Read Version ID Meaning With this call, the version ID of the AS-i master software is read out.
AS-i Master Module CP 242-2 B8976105/01 5.2.1.22 Read and Delete Slave Status Meaning With this call, the status of a slave is read out and at the same time the status register of the slave is deleted. The flags of the status register have the following meaning: S0 “Address volatile” This flag is set - when the internal slave routine for permanent storage of the slave address is active. This can take up to 15 ms and must not be interrupted by a further addressing call.
B8976105/01 AS-i Master Module CP 242-2 5.2.1.23 Read Slave ID Meaning With this call, the ID code of a slave can be read out directly over the AS-i cable. The call is intended for diagnostic purposes and is not required in the normal master mode.
AS-i Master Module CP 242-2 B8976105/01 5.2.1.24 Read Slave I/O Meaning With this call, the I/O configuration of a slave can be read out directly over the AS-i cable. The call is intended for diagnostic purposes and is not required in the normal master mode.
B8976105/01 AS-i Master Module CP 242-2 5.2.1.25 Read Data and Delta List Meaning With this call, the error bits, the input data of the AS-i slaves and the delta list can be read out consistently.
AS-i Master Module CP 242-2 B8976105/01 5-34
B8976105/01 6 AS-i Master Module CP 242-2 Replacing a Defective Slave / Automatic Address Programming If the indicator AUP is lit in the protected mode, it indicates the following: ² Exactly one slave has failed. ² Automatic address programming by the CP 242-2 is possible. You can now replace the defective slave as follows: Remove the failed slave from the AS-i cable. You can identify the failed slave simply by the flashing LED assigned to the slave in the front panel display.
AS-i Master Module CP 242-2 B8976105/01 6-2
B8976105/01 7 AS-i Master Module CP 242-2 Error Indicators of the CP 242-2 / Dealing with Errors The following table lists the possible causes of errors that can occur when operating the CP 242-2 and how to remedy the problem. Error Possible Cause Remedy APF indicator lit. The AS-i power supply unit is not connected or is defective. Check the connection of the AS-i power supply unit; if necessary replace the power supply unit. Check the power requirements of the AS-i slaves.
AS-i Master Module CP 242-2 B8976105/01 Error Possible Cause Remedy The “AUP” display remains unlit after the failure of a slave. The CP 242-2 is in the configuration mode. “Automatic programming” is not possible in the configuration mode. Program the address of the new slave with the address programming device. Check the AS-i cable. If “APF” is displayed at the same time, check the power supply on the AS-i cable.
B8976105/01 A AS-i Master Module CP 242-2 AS-Interface Protocol Implementation Conformance Statement (PICS) A.1 PICS for CP 242-2 Vendor Siemens AG Product Name CP 242-2 - AS-i master module CP 242-2 for SIMATIC S7-200 Order Number 6GK7242-2AX00-0XA0 Version 1 Master Profile M1 Date 29.2.1997 List of Master Functions Available No.
AS-i Master Module CP 242-2 No. Function or Call on the (symbolic representation) 15 Status, List32 = Get_LDS() B8976105/01 Host Interface M1 Comment / Function implemented by / Section X Read Lists and Flags (Get_LPS, Get_LAS, Get_LDS, Get_Flags) / 5.2.1.16 16.0 Status = Get_Flags() X Read Lists and Flags (Get_LPS, Get_LAS, Get_LDS, Get_Flags) / 5.2.1.16 16.1 Status, Flag = Get_Flag_Config_OK() X Read Lists and Flags (Get_LPS, Get_LAS, Get_LDS, Get_Flags) / 5.2.1.16 16.
B8976105/01 AS-i Master Module CP 242-2 How the AS-i Cycle Depends on the Number of Connected Slaves The following table shows how the AS-i cycle time depends on the number of connected slaves.
AS-i Master Module CP 242-2 B8976105/01 A-4
B8976105/01 AS-i Master Module CP 242-2 B References /1/ AS-Interface Das Aktuator-Sensor-Interface für die Automation Werner Kriesel, O.W. Madelung, Carl Hanser Verlag München Wien 1994 /2/ AS-Interface Complete Specification can be ordered from the ASI Association e.V. Address AS-International Association e.V. Manager: Dr. Otto W. Madelung Auf den Broich 4A D - 51519 Odenthal Germany Tel.: +49 - 2174 - 40756 Fax.: +49 - 2174 - 41571 (The AS-i technology is promoted by the ASI Association e. V.
AS-i Master Module CP 242-2 B8976105/01 B-2
B8976105/01 C AS-i Master Module CP 242-2 Abbreviations and Glossary AS-i Actuator-Sensor-Interface APF ASI Power Fail. Flag or LED display indicating that the power supply on the AS-i cable is too low or has failed (e.g. AS-i power unit defective) CP Communications Processor: communications module for installation in computers and programmable controllers.
AS-i Master Module CP 242-2 B8976105/01 C-2
B8976105/01 D AS-i Master Module CP 242-2 Notes on the CE Label Product name: EU directive EEC 89/336/EEC CP 242-2 6GK7242-2AX00-0XA0 The product listed above meets the requirements of the EU directive 89/336/EEC “Electromagnetic Compatibility”.
AS-i Master Module CP 242-2 B8976105/01 D-2
Vorschläge Suggestions SIEMENS AG AUT 933 Siemensallee 84 Korrekturen Corrections Für Druckschrift bzw. Handbuch For pamphlet or manual 76187 Karlsruhe Federal Republic of Germany Titel/title SIMATIC NET AS-Interface Masterbaugruppe CP 242-2 Absender/From - Name Bestell-Nr./Order No.
Corrections Correcciones SIEMENS AG AUT 933 Siemensallee 84 Pour l’imprimé ou le manuel Para folleta o manual 76187 Karlsruhe Federal Republic of Germany Titre/titulo SIMATIC NET AS-Interface Masterbaugruppe CP 242-2 Expediteu/Expeditor - Nom/Nombre y apelido No de ref./No de ped.