Summary of Contents for Siemens SIMATIC NET CP 142-2
Page 1
Replacing a Defective Slave / Automatic Address Programming Error Indicators / Dealing with Errors PROFIBUS DP Configuration When Using the BM141/BM142 AS-Interface Protocol Implementation Conformance Statement (PICS) References Abbreviations C79000-G8976-C111 Release 02 SIMATIC NET is a trademark of Siemens Siemens Aktiengesellschaft...
Page 3
SIMATIC NET CP 142-2 Manual C79000-B8976-C111/02...
Page 4
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. We would further point out that, for reasons of clarity, these operating instructions cannot deal with every possible problem arising from the use of this device.
B8976111/02 Contents Contents 1 Introduction 1.1 General 1.1.1 Overview of the Chapters 1.1.2 General Information for the Reader 1.1.3 Requirements for Understanding the Manual 1.1.4 Sample Programs 1.1.5 Further Support and Hotline 2 Technical Description and Installation Guidelines 2.1 Overview of the Module 2.1.1 Introduction 2.1.2 Technical Specifications of the Module 2.1.3 Installing and Connecting the CP 142-2...
B8976111/02 AS-i Master Module CP 142-2 1 Introduction This manual describes the functions and the programming of the CP 142-2. To fully understand this manual, you should be familiar with the manual ‘AS-Interface Introduction and Basic Information’. We recommend the following procedure when..You want a general overview of the Read the manual ‘AS-Interface ´...
B8976111/02 AS-i Master Module CP 142-2 1.1 General 1.1.1 Overview of the Chapters Chapter 1 Introduction This chapter explains how to make the best use of the manual. Chapter 2 Technical Description and Installation Guidelinesn Chapter 2 provides you with an overview of the modes, installation and startup and the indicators and operator controls of the CP 142-2.
B8976111/02 AS-i Master Module CP 142-2 1.1.2 General Information for the Reader General symbols in the text: This symbol indicates an action for you to perform. This symbol highlights special features and dangers.
B8976111/02 AS-i Master Module CP 142-2 1.1.3 Requirements for Understanding the Manual To fully understand the manual, you should already be familiar with the following: The manual ‘AS-Interface Introduction and Basic Information’. ± The manual 'ET 200X Distributed I/O System’ ±...
BM147). 1.1.5 Further Support and Hotline Who to Contact If you have technical questions about using the product described here, please contact your local Siemens representative. The addresses are listed: in our catalog IK 10 on the Internet (http://www.ad.siemens.de) Frequently Asked...
B8976111/02 AS-i Master Module CP 142-2 2 Technical Description and Installation Guidelines This chapter outlines the performance of the CP 142-2, explains how to install the module and introduces you to its basic functions. You will learn the following: How to install the CP 142-2. ± Which modes are supported by the CP 142-2.
B8976111/02 AS-i Master Module CP 142-2 2.1 Overview of the Module 2.1.1 Introduction The CP 142-2 module can be operated in the ET 200X distributed I/O system. It allows the connection of an AS-i chain to the I/O device. The special feature of the ET 200X distributed I/O system is its rugged construction complying with safety classes IP 65, IP 66 and IP 67.
B8976111/02 AS-i Master Module CP 142-2 2.1.2 Technical Specifications of the Module The CP 142-2 module has the following characteristics: Bus cycle time 5 ms with 31 slaves Configuration of the AS-Interface with buttons on the front panel Supported AS-i master profiles M0 for operation with the bus modules BM141/BM142 M0/M1 when using the bus module BM147...
B8976111/02 AS-i Master Module CP 142-2 2.1.3 Installing and Connecting the CP 142-2 The assembly of the module and connection to the ET 200X distributed I/O system is the same as for other expansion modules. For more detailed information, please refer to the “ET 200X Distributed I/O System”...
Page 16
B8976111/02 AS-i Master Module CP 142-2 Attaching to the AS-i cable at a distance from the AS-Interface adapter ± The AS-Interface adapter M12 is first connected to the AS-i shaped cable. A round (sensor) cable with an M12 male and female connector is used to attach the CP 142-2. When laying the AS-i cable, make sure that there is adequate strain relief particularly at the end connected to the CP 142-2.
B8976111/02 AS-i Master Module CP 142-2 2.1.4 Indicators and Operator Controls on the CP 142-2 Figure 2.5 shows the front panel of the CP 142-2 with its indicators and operator controls.The front connector for attaching the AS-i cable is at the lower right of the front panel. To the left of the connector is the SET/DISPLAY button under a screw-on cover.
B8976111/02 AS-i Master Module CP 142-2 2.1.4.2 Status Display of the CP 142-2 (all group LEDs off) (red) System error. The LED is lit when: the CP 142-2 is in the protected mode and an AS-i configuration error ± has occurred (for example slave failed) the CP 142-2 detects an internal fault (for example EEPROM defective) ± The CP 142-2 cannot change to the mode requested with a control...
B8976111/02 AS-i Master Module CP 142-2 2.1.4.3 Slave Display of the CP 142-2 (at least on group LED lit) The display of the detected or active slaves is in groups of five. The upper three group LEDs indicate which group of five is displayed. The lower five LEDs indicate the slaves within the group. You change to the slave display mode by pressing the SET/DISPLAY button.
B8976111/02 AS-i Master Module CP 142-2 2.1.4.4 Meaning of theSET/DISPLAY Button The SET/DISPLAY button is used to change to the next display and to switch between the configuration mode and the protected mode. Pressing the SET/DISPLAY button briefly (less than 5 seconds) changes the display. ± Pressing the SET/DISPLAY button for longer than 5 seconds changes the module from the ±...
Page 21
B8976111/02 AS-i Master Module CP 142-2 Configuration mode The configuration mode is used to install and start up an AS-i installation. In the configuration mode, the CP 142-2 can exchange data with every slave attached to the AS-i cable (with the exception of a slave with address “0”). Any AS-i slaves that are added later are activated immediately and included in the cyclic data exchange.
B8976111/02 AS-i Master Module CP 142-2 Configuring the CP 142-2 during an AS-i Power Fail (for example when the AS-i power supply unit is turned off or when the CP 142-2 is not connected to the AS-Interface) resets the configuration of the CP 142-2. This means the following: •...
B8976111/02 AS-i Master Module CP 142-2 3 Standard Operation of the CP 142-2 Standard operation with the CP 142-2 in the ET 200X distributed I/O station is the most common and simplest application of the CP 142-2. It allows access to the input and output data of the AS-i slaves. This type of operation corresponds to the M0 profile of the AS-i master specification and is available immediately after plugging in the module.
B8976111/02 AS-i Master Module CP 142-2 How the User Program Addresses the AS-i Slaves 3.2.1 Addressing AS-i User Data Each slave on the AS-i cable is assigned four bits (a nibble) of input data and four bits of output data by the CP 142-2.
Page 25
B8976111/02 AS-i Master Module CP 142-2 Assignment of the output data of the slaves Byte Number Bit 7-4 Bit 3-0 reserved Slave 1 Bit 3 | Bit 2 | Bit 1 | Bit 0 Slave 2 Slave 3 Slave 4 Slave 5 Slave 6 Slave 7...
B8976111/02 AS-i Master Module CP 142-2 Figure 3-1 shows an example of how a slave is addressed by a user program with start addresses m = 256 for the input data and n = 256 for the output data. The bits relevant for the user program are shown on a gray background.
B8976111/02 AS-i Master Module CP 142-2 3.2.3 Access to the AS-i User Data (BM147) The bits of the AS-i slaves are accessed using the following S7 load and transfer commands: L PIW X L PID X T PQW X T PQD X X stands for the byte address in the CP 142-2.
B8976111/02 AS-i Master Module CP 142-2 3.3 Diagnostics and Reaction to Interrupts on the CP 142-2 If the CP 142-2 detects an error during operation (AS-i slave failed, EEPROM fault on the CP, ...), it indicates this by triggering a diagnostic interrupt. The reaction to this diagnostic interrupt depends on the basic module being used.
B8976111/02 AS-i Master Module CP 142-2 3.3.1.2 Structure of PROFIBUS DP Slave Diagnostics When a diagnostic interrupt is triggered on the CP 142-2, the BM 141/BM 142 reports PROFIBUS DP slave diagnostic information with the following structure (for more detailed information, refer to /4/): Byte 0 Byte 1 Station status 1 to 3...
Page 30
B8976111/02 AS-i Master Module CP 142-2 Content of Data Record 1 The diagnostic information of the CP 142-2 is contained in data record 1. The data record is updated by the CP 142-2 whenever an interrupt event occurs and is made available to the ET 200X distributed I/O system.
Page 31
B8976111/02 AS-i Master Module CP 142-2 Bit no. Byte 17 Byte 18 Fixed value Byte 19 Byte 20 Slave 7 Slave 0 Byte 21 Slave 15 Slave 8 Delta list Byte 22 Slave 23 Slave 16 Byte 23 Slave 31 Slave 24 Figure 3-3b: Content of Data Record Bytes 17 to 23...
B8976111/02 AS-i Master Module CP 142-2 3.3.2 Diagnostics and Reaction to Interrupts with the BM147 3.3.2.1 Overview If the CP 142-2 detects an error during operation (AS-i slave failed, EEPROM fault on the CP, ...), it indicates this by triggering a diagnostic interrupt. The BM147 then interrupts the cyclic user program (OB1) enters the event as “module fault”...
B8976111/02 AS-i Master Module CP 142-2 3.3.2.3 Sequence of Diagnostic Interrupt Servicing If the CP 142-2 detects an interrupt event, it triggers a diagnostic interrupt. The BM147 checks the source of the interrupt and reads data record 0 from the CP. Following this, it interrupts the cyclic user program and behaves as follows: If OB82 is not programmed, the BM147/CPU changes to STOP (default setting).
B8976111/02 AS-i Master Module CP 142-2 3.3.2.5 Local Data of the Diagnostic Organization Block (OB82) The following table lists data record 0 as it is available in the local data of OB82 (local byte 8 to local byte 11). For the meaning of the other OB82 local data, please refer to the STEP 7 descriptions. Byte Bit Variable Name Data type...
B8976111/02 AS-i Master Module CP 142-2 Byte Bit Variable Name Data type Meaning OB82_HW_INTR_FLT BOOL always 0 for the CP 142-2 OB82_RESERVED_3 BOOL always 0 for the CP 142-2 3.3.2.6 Reading the Diagnostic Data Record DS1 The CP 142-2 continuously updates a delta list containing all the slaves that deviate from the configuration, in other words, missing, incorrect or not configured (but existing) slaves (each slave is assigned one bit in the delta list: 0 = no error;...
B8976111/02 AS-i Master Module CP 142-2 3.3.2.7 Programming Example The example below illustrates how you can react to a diagnostic interrupt from the CP 142-2 in OB82 by reading the data record (DS1). #OB82_MDL_ADDR //module address supplied by OB82 //store temporarily CALL „RD_REC”...
Page 37
B8976111/02 AS-i Master Module CP 142-2 If the unconfigured slave 15 is then attached to the AS-Interface, the CP 142-2 once again generates a diagnostic interrupt. The message “module fault” appears in the diagnostic buffer. The delta list changes to the values below: MB 107 MB 108 MB 109...
B8976111/02 AS-i Master Module CP 142-2 4 CP 142-2 Extended Operation with FC “ASI_3422” For extended operation, FC “ASI_3422” is required on the S7 programmable controller. This section explains the range of functions available over and above those of standard operation when using the CP 142-2 with the FC “ASI_3422”.
Page 40
B8976111/02 AS-i Master Module CP 142-2 Formal parameters The following table explains the formal parameters of the function: Name Type Memory Remarks Area BOOL I,Q,M,D,L, Execution of the command by the function is level constant triggered, in other words as long as ACT = 1, command execution is started if no call is already being processed.
Page 41
B8976111/02 AS-i Master Module CP 142-2 If an error occurs when executing the function, a “0” is entered in the BIE bit in addition to the information above in ERROR and STATUS. The BIE bit is scanned differently in LAD and STL user programs: LAD: Query using the ENO output parameter ±...
Page 42
B8976111/02 AS-i Master Module CP 142-2 DONE ERROR STATUS Meaning 83A5 Slave address cannot be set 83A6 Slave address cannot be permanently stored 83F8 Job number unknown 83F9 EEPROM error 8F22 Area length error reading a parameter 8F23 Area length error writing a parameter This error code indicates that a parameter is completely or partly outside the address range or the length of a bit field of an ANY parameter cannot be divided by 8.
Page 43
B8976111/02 AS-i Master Module CP 142-2 Signal changes of the formal operands A command call is started by ACT = 1. While a job is being processed, the first word of STATUS has the value 8181 . This indicates that a job is being processed. Once the job is completed, the user is informed of the result in the DONE or ERROR parameters.
B8976111/02 AS-i Master Module CP 142-2 4.2 Interface for AS-i commands The following sections describe the AS-i command calls that can be sent by the BM 147 to the CP 142-2. With these command calls, the CP 142-2 provides the complete functionality of the M1 master profile of the AS-i master specification.
Page 45
B8976111/02 AS-i Master Module CP 142-2 4.2.1.1 Set_Permanent_Parameter Meaning With this call, a parameter value for the specified AS-i slave is transferred to the CP 142-2. The value is saved permanently as a configured value. The parameter is not transferred immediately to the slave by the CP 142-2. The parameter value is only transferred after the power supply of the BM147 is turned on and the slave is activated.
Page 46
B8976111/02 AS-i Master Module CP 142-2 4.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 AS- 1 slave. The parameter is saved only temporarily on the CP 142-2. The AS-i slave transfers the current parameter value in the response.
Page 47
B8976111/02 AS-i Master Module CP 142-2 4.2.1.5 Store_Actual_Parameters Meaning This call overwrites the permanently stored configured parameters with the actual parameters, in other words the parameters of all slaves are reconfigured. Structure of the job data in the send buffer Bit 7 Bit 0 Byte 0...
Page 48
B8976111/02 AS-i Master Module CP 142-2 4.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). Structure of the job data in the send buffer Bit 7 Bit 0 Byte 0...
Page 49
B8976111/02 AS-i Master Module CP 142-2 4.2.1.9 Read_Actual_Configuration This call returns the actual I/O configuration data and actual ID codes of an addressed slave detected on the AS-i. Structure of the job data in the send buffer Bit 7 Bit 0 Byte 0 Byte 1 Slave address...
Page 50
B8976111/02 AS-i Master Module CP 142-2 4.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 only processes jobs from the user. There is no cyclic data exchange. The online mode is the normal situation with the AS-i master.
Page 51
B8976111/02 AS-i Master Module CP 142-2 4.2.1.12 Set_Auto_Address Meaning With this call, the automatic address programming function can be enabled or disabled. The AUTO_ADDR_ENABLE bit is stored permanently on the master. Structure of the job data in the send buffer Bit 7 Bit 0 Byte 0...
Page 52
B8976111/02 AS-i Master Module CP 142-2 4.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-i system. In this case, the address is changed from the old slave address (0) to the new slave address.
B8976111/02 AS-i Master Module CP 142-2 4.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: “Address volatile” This flag is set - when the internal slave routine for permanent storage of the slave address is active.
B8976111/02 AS-i Master Module CP 142-2 4.2.1.16 Read Lists and Flags (Get_LPS, Get_LAS, Get_LDS, Get_Flags) Meaning With this call, the following entries are read out of the AS-i master CP: • The list of permanent slave LPS, • the list of active slaves LAS, •...
Page 55
B8976111/02 AS-i Master Module CP 142-2 Flag 1 Flag 2 Name Bit Number Name Bit Number OFFLINE_READY OFFLINE RESERVED NORMAL_MODE EEPROM_OK CONFIG_MODE AUTO_ADDR_ENABLE AUTO_ADDR_AVAIL RESERVED AUTO_ADDR_ASSIGN 13 RESERVED LDS_0 RESERVED CONFIG_OK RESERVED Meaning of the flags OFFLINE_READY The flag is set when the offline phase is active. This flag is set when the voltage on the AS-i cable is too low.
B8976111/02 AS-i Master Module CP 142-2 4.2.1.17 Read Total Configuration Meaning With this command, the following data are read from the CP: 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).
Page 57
B8976111/02 AS-i Master Module CP 142-2 Bit 7 Bit 4 Bit 3 Bit 0 Byte 25 ID code slave 19 I/O conf. slave 19 Byte 26 ID code slave 20 I/O conf. slave 20 Byte 27 ID code slave 21 I/O conf.
B8976111/02 AS-i Master Module CP 142-2 4.2.1.18 Configure Total System Meaning With this call, the desired total configuration is transferred to the CP 142-2 and saved on the CP 142-2 as the desired configuration. This configures the CP 142-2. The following data are transferred: The list of configured slaves specifying the slaves that can be activated ± by the CP 142-2 in the protected mode.
Page 59
B8976111/02 AS-i Master Module CP 142-2 Bit 7 Bit 4 Bit 3 Bit 0 Byte 25 ID code slave 19 I/O conf. slave 19 Byte 26 ID code slave 20 I/O conf. slave 20 Byte 27 ID code slave 21 I/O conf.
Page 60
B8976111/02 AS-i Master Module CP 142-2 The values of the other flags have no significance for the 'configure entire system' command and cannot be modified. 4-23...
B8976111/02 AS-i Master Module CP 142-2 4.2.1.19 Write Parameter List Meaning With this command, the parameters for all slaves are transferred to the CP 142-2. The CP 142-2• transfers only the parameters that have changed to the slaves, that deviate from the current actual parameters.
B8976111/02 AS-i Master Module CP 142-2 4.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 outputs the echo values of all slaves. The echo values of a slave originate from the last parameter call output to this slave.
B8976111/02 AS-i Master Module CP 142-2 4.2.1.21 Read Version ID Meaning With this call, the version ID of the AS-i master software is read out. Structure of the job data in the send buffer Bit 7 Bit 4 Bit 3 Bit 0 Byte 0 The reply of the CP contains the name and the firmware version number of the CP in the form shown...
B8976111/02 AS-i Master Module CP 142-2 4.2.1.22 Read and Reset 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 significance: “Address volatile”...
B8976111/02 AS-i Master Module CP 142-2 4.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. Structure of the job data in the send buffer Byte 0 Slave address...
B8976111/02 AS-i Master Module CP 142-2 5 Replacing a Defective Slave / Automatic Address Programming If the indicator AUP is lit in the protected mode, it indicates the following: Exactly one AS-i slave has failed. ² Automatic address programming by the CP 142-2 is possible. ² You can now replace the defective AS-i slave as follows: Remove the failed AS-i slave from the AS-i cable.
B8976111/02 AS-i Master Module CP 142-2 6 Error Indicators on the CP 142-2 / Dealing with Errors The following table lists the possible causes of errors that can occur when operating the CP 142-2 and how to remedy the problem. Error Possible Cause Remedy...
Page 68
B8976111/02 AS-i Master Module CP 142-2 Error Possible Cause Remedy CP does not switch from the Button not pressed long enough Press the button for at least 5 seconds. protected mode to the configuration mode. The “AUP” display remains unlit CP is in the configuration mode.
ID (hexadecimal) Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 General ID Format: ID (hexadecimal) If you use a SIEMENS configuration tool for your DP master (for example STEP 7 or COM PROFIBUS), these settings are generated automatically.
B8976111/02 AS-i Master Module CP 142-2 AS-Interface Protocol Implementation Conformance Statement (PICS) PICS for CP 142-2 Vendor Siemens AG Product Name CP 142-2 - AS-i master module CP 142-2 for ET 200X Order Number 6GK7142-2AH00-0XA0 Version Master Profile M0 with BM 141/142<...
Page 72
AS-i Master Module CP 142-2 B8976111/02 List of available master functions without FC "ASI_3422" Function or Call on the Host Interface M0 Comment / Function implemented by / (symbolic representation) Section Image, Status = Read_IDI() By access to the I/O data of the CP 142-2 Status = Write_ODI(Image) By access to the I/O data of the CP 142-2 Status = Set_Permanent_Parameter(Addr, Param)
Page 73
B8976111/02 AS-i Master Module CP 142-2 Function or Call on the Host Interface M0 Comment / Function implemented by / (symbolic representation) Section 23.1 Status, Resp = Cmd_Reset_ASI_Slave(Addr, not implemented RESET) 23.2 Status, Resp = Cmd_Read_IO_Configuration(Addr, not implemented CONF) 23.3 Status, Resp = not implemented Cmd_Read_Identification_Code(Addr, IDCOD) 23.4 Status, Resp = Cmd_Read_Status(Addr, STAT)
Page 74
AS-i Master Module CP 142-2 B8976111/02 List of available master functions with FC "ASI_3422" Function or call on the host interface (symbolic M1 Comment / Function implemented by / representation) Section Image, Status = Read_IDI() By the controller accessing the I/O interface of the CP 142-2 Status = Write_ODI(Image) By the controller accessing the I/O interface...
Page 75
B8976111/02 AS-i Master Module CP 142-2 Function or call on the host interface (symbolic M1 Comment / Function implemented by / representation) Section Status = Change_Slave_Address(Addr1, Addr2) Change_slave_address / 4.2.1.14 Status = Set_Auto_Address_Enable Set_auto_address / 4.2.1.12 Status = Get_Auto_Address_Enable Read lists and flags / 4.2.1.16 23.1 Status, Resp = Cmd_Reset_ASI_Slave(Addr, not implemented RESET)
Page 77
SIMATIC NET Industrial Communications Networks Catalog IK 10 The catalog can be ordered from your local SIEMENS branch office or distributor. SIMATIC Manual for the ET 200X distributed I/O system The manual can be ordered from your local SIEMENS branch office or distributor.
Page 79
CP 142-2 to the AS-Interface Firmware, here software running on the CP 1422 List of activated slaves List of detected slaves List of (permanent) configured slaves Programming device SIMATIC NET Previously SINEC , product range for industrial communication from Siemens.
Page 81
The product listed above meets the requirements of the EU directive 89/336/EEC 89/336/EEC “Electromagnetic Compatibility”. The EU conformity certificates are available for the relevant authorities according to the EU directive and are kept at the following address: Siemens Aktiengesellschaft Automation and Drives Industrielle Kommunikation (A&D PT2) Postfach 4848 D-90327 Nuremberg...
Page 83
Vorschläge Korrekturen Siemens Aktiengesellschaft Suggestions Corrections Automation and Drives Für Druckschrift bzw. Handbuch Industrielle Kommunikation (A&D PT2) For pamphlet or manual Postfach 4848 D-90327 Nuremberg Titel/title SIMATIC NET CP 142-2 Absender/From - Name Bestell-Nr./Order No. C79000-G8976-C111 Firma/Dienststelle - Company/Department Anschrift/Address...
Page 84
Siemens Aktiengesellschaft Corrections Correcciones Automation and Drives Industrielle Kommunikation (A&D PT2) Pour l’imprimé ou le manuel Para folleta o manual Postfach 4848 D-90327 Nuremberg Titre/titulo SIMATIC NET CP 142-2 Expediteu/Expeditor - Nom/Nombre y apelido de ref./N de ped. C79000-G8976-C111 Société/Service - Empresa/Seccion Adresse/Direction Téléphone/Téléphono...
Need help?
Do you have a question about the SIMATIC NET CP 142-2 and is the answer not in the manual?
Questions and answers