Siemens SIMATIC NET CP 142-2 User Manual

SIMATIC NET
CP 142-2
Manual
1 Introduction 2 Technical Description and Installation Instructions 3 Standard Operation 4 Extended Operation 5 Replacing a Defective Slave / Automatic Address Programming 6 Error Indicators / Dealing with Errors 7 PROFIBUS DP Configuration When Using the
BM141/BM142
A AS-Interface Protocol Implementation
Conformance Statement (PICS) B References C Abbreviations
C79000-G8976-C111 Release 02
SIMATIC NET is a trademark of Siemens Siemens Aktiengesellschaft
Wir haben den Inhalt der Druckschrift auf Übereinstimmung mit der beschriebenen Hard- und Software geprüft. Dennoch können Abweichungen nicht ausgeschlossen werden, so daß wir für die vollständige Übereinstimmung keine Gewähr übernehmen. The 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. Technische Änderungen vorbehalten.
Weitergabe sowie Vervielfältigung dieser Unterlage, Verwertung und Mitteilung ihres Inhalts nicht gestattet, soweit nicht ausdrücklich zugestanden. Zuwiderhandlungen verpflichten zu Schadenersatz. Alle Rechte vorbehalten, insbesondere für den Fall der Patenterteilung oder GM-Eintragung. C79000-G8900-C111
Copyright © Siemens AG 1997 All Rights Reserved
We have checked the contents of this manual for agreement with the hardware described. Since deviations cannot be precluded entirely, we cannot guarantee full agreement. However, the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions. Suggestions for improvement are welcome. Technical data subject to change.
Nous avons vérifié la conformité du contenu du présent manuel avec le matériel et le logiciel qui y sont décrits. Or, des divergences n'étant pas exclues, nous ne pouvons pas nous porter garants pour la conformité intégrale. Si l'usage du manuel devait révéler des erreurs, nous en tiendrons compte et apporterons les corrections nécessaires dès la prochaine édition. Veuillez nous faire part de vos suggestions.
Nous nous réservons le droit de modifier les caractéristiques techniques.
The reproduction, transmission or use of this document or its contents is not permitted without express written authority. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility or design, are reserved. C79000-G8976-C111
Copyright © Siemens AG 1997 All Rights Reserved
Toute communication ou reproduction de ce support d'informations, toute exploitation ou communication de son contenu sont interdites, sauf autorisation expresse. Tout manquement à cette règle est illicite et expose son auteur au versement de dommages et intérêts. Tous nos droits sont réservés, notamment pour le cas de la délivrance d'un brevet ou celui de l'enregistrement d'un modèle d'utilité.
C79000-G8972-C111
Copyright © Siemens AG 1997 All Rights Reserved
Siemens Aktiengesellschaft Elektronikwerk Karlsruhe
Printed in the Federal Republic of Germany
SIMATIC NET
CP 142-2
Manual
C79000-B8976-C111/02
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.
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. Should you require further information or if any special problems arise which are not sufficiently dealt with in the operating instructions, please contact your local Siemens representative.
General
WARNING!
This device is electrically operated. In operation, certain parts of this device carry a dangerously high voltage.
Failure to heed warnings may result in serious physical injury and/or material damage.
!
Only appropriately qualified personnel may operate this equipment or work in its vicinity. Personnel must be familiar with all warnings and maintenance measures in accordance with these operating instructions.
Correct and safe operation of this equipment requires proper transport, storage and assembly as well as careful operator control and maintenance.
Personnel qualification requirements
Qualified personnel as referred to in the operating instructions or in the warning notes are defined as persons who are familiar with the installation, assembly, startup and operation of this product and who possess the relevant qualifications for their work, e.g.:
Training in or authorization for connecting up, grounding or labeling circuits and devices or systems in accordance with current standards in safety technology;
Training in or authorization for the maintenance and use of suitable safety equipment in accordance with current standards in safety technology;
First Aid qualification.
B8976111/02 Contents
Contents
1 Introduction 1-1
1.1 General 1-2
1.1.1 Overview of the Chapters 1-2
1.1.2 General Information for the Reader 1-3
1.1.3 Requirements for Understanding the Manual 1-4
1.1.4 Sample Programs 1-5
1.1.5 Further Support and Hotline 1-5
2 Technical Description and Installation Guidelines 2-1
2.1 Overview of the Module 2-2
2.1.1 Introduction 2-2
2.1.2 Technical Specifications of the Module 2-3
2.1.3 Installing and Connecting the CP 142-2 2-4
2.1.4 Indicators and Operator Controls on the CP 142-2 2-6
2.1.4.1 Meaning of the Indicators and Operator Controls: 2-6
2.1.4.2 Status Display of the CP 142-2 (all group LEDs off) 2-7
2.1.4.3 Slave Display of the CP 142-2 (at least on group LED lit) 2-8
2.1.4.4 Meaning of theSET/DISPLAY Button 2-9
2.1.4.5 Slots Permitted for the CP 142-2 in the ET 200X Distributed I/O Station 2-9
2.1.4.6 Configuring the AS-Interface with the SET/DISPLAY Button 2-9
2.1.4.7 Types of Operation with the CP 142-2 2-11
3 Standard Operation of the CP 142-2 3-1
3.1 Addressing the CP 142-2 3-1
3.1.1 Addressing using the BM141/BM142 3-1
3.1.2 Addressing when using the BM147 3-1
3.2 How the User Program Addresses the AS-i Slaves 3-2
3.2.1 Addressing AS-i User Data 3-2
3.2.2 Accessing the AS-i User Data (BM141, BM142) 3-4
3.2.3 Access to the AS-i User Data (BM147) 3-5
3.3 Diagnostics and Reaction to Interrupts on the CP 142-2 3-6
3.3.1 Diagnostics and Reaction to Interrupts with the BM141/BM142 3-6
3.3.1.1 Interrupt Events 3-6
3.3.1.2 Structure of PROFIBUS DP Slave Diagnostics 3-7
3.3.2 Diagnostics and Reaction to Interrupts with the BM147 3-10
3.3.2.1 Overview 3-10
3.3.2.2 Interrupt Events 3-10
3.3.2.3 Sequence of Diagnostic Interrupt Servicing 3-11
3.3.2.4 Response to Interrupts in Various CP States 3-11
3.3.2.5 Local Data of the Diagnostic Organization Block (OB82) 3-12
3.3.2.6 Reading the Diagnostic Data Record DS1 3-13
3.3.2.7 Programming Example 3-14
4 CP 142-2 Extended Operation with FC “ASI_3422” 4-1
4.1 Overview of the Functions 4-1
4.1.1 Calling the Function 4-1
4.2 Interface for AS-i commands 4-7
4.2.1 The Commands Supported by the CP 142-2 4-7
4.2.1.1 Set_Permanent_Parameter 4-8
4.2.1.2 Get_Permanent_Parameter 4-8
4.2.1.3 Write_Parameter 4-9
4.2.1.4 Read_Parameter 4-9
I-1
B8976111/02 Contents
4.2.1.5 Store_Actual_Parameters 4-10
4.2.1.6 Set_Permanent_Configuration 4-10
4.2.1.7 Get_Permanent_Configuration 4-11
4.2.1.8 Store_Actual_Parameters 4-11
4.2.1.9 Read_Actual_Configuration 4-12
4.2.1.10 Set_LPS 4-12
4.2.1.11 Set_Offline_Mode 4-13
4.2.1.12 Set_Auto_Address 4-14
4.2.1.13 Set_Operation_Mode 4-14
4.2.1.14 Change_Slave_Address 4-15
4.2.1.15 Read Slave Status 4-16
4.2.1.16 Read Lists and Flags (Get_LPS, Get_LAS, Get_LDS, Get_Flags) 4-17
4.2.1.17 Read Total Configuration 4-19
4.2.1.18 Configure Total System 4-21
4.2.1.19 Write Parameter List 4-24
4.2.1.20 Read Parameter Echo List 4-25
4.2.1.21 Read Version ID 4-26
4.2.1.22 Read and Reset Slave Status 4-27
4.2.1.23 Read Slave ID 4-28
4.2.1.24 Read Slave I/O 4-28
5 Replacing a Defective Slave / Automatic Address Programming 5-1
6 Error Indicators on the CP 142-2 / Dealing with Errors 6-1
7 Configuring PROFIBUS DP When Using the BM141/BM142 7-1
A AS-Interface Protocol Implementation Conformance Statement (PICS)
B References
C Abbreviations
I-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 AS-Interface.
Read the manual ‘AS-Interface Introduction and Basic Information'. This manual contains general information about the generally referred to as manual.
AS-Interface
AS-i
in this
,
...You want to install and start up the CP 142-2.
...You want to know how to program the CP 142-2.
...you want to create a PLC program for standard applications.
...you require additional information about extended operation.
´
Chapter 2 Section 2.1 ‘Overview of the Module’ and Chapter 3 ‘Standard Operation of the CP 142-2’ contain the information you require.
´
Read Chapters 3 and 4.
´
Chapter 3 contains all the information you require about standard operation.
´
You will find the required information in Chapter 4.
1-1
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.
Chapter 3 Standard Operation of the CP 142-2
Chapter 3 describes how to operate the CP 142-2 in the ET 200X distributed I/O system in standard operation.
Chapter 4 CP 142-2 Extended Operation with FC “ASI_3422”
Chapter 4 describes the extended operation of the CP 142-2, that requires the FC “ASI_3422” in the control program. In this type of operation, the AS-i slaves can be assigned parameters or the slave addresses can be modified by the S7 program.
This mode is only possible with the BM147.
Chapter 5 Replacing a Defective Slave / Automatic Address Programming
Chapter 5 explains how to replace a failed AS-i slave quickly and simply.
Chapter 6 Error Indicators on the CP 142-2 / Dealing with Errors
This chapter explains the possible error indications on the CP 142-2 and explains how to deal with them.
Chapter 7 PROFIBUS DP Configuration When Using the BM141/BM142
Chapter 7 contains additional information about DP configuration of the BM141/BM142.
1-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.
1-3
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’
1-4
B8976111/02 AS-i Master Module CP 142-2
1.1.4 Sample Programs
The diskette shipped with this manual contains sample programs which will help you to program the CP 142-2 when this is installed in a distributed ET 200X I/O system with preprocessing (for example BM147).
1.1.5 Further Support and Hotline
Who to Contact
Frequently Asked Questions
Hotline
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)
Our customer support on the Internet provides useful information and answers to frequently asked questions (FAQ). Under FAQ, you will find information about our entire range of products.
The address of the A&D home page in the World Wide Web of the Internet is as follows:
http://www.ad.siemens.de/net
Our hotline is also available to deal with problems:
Telephone:0911 - 895 - 7000
(outside Germany +49 - 911 - 895 - 7000)
Telefax: 0911 - 895 - 7001
(outside Germany +49 - 911 - 895 - 7001)
E-Mail: simatic.support@nbgm.siemens.de
Mailbox (BBS, analog/ISDN, 8N1):
0911 - 895 - 7100 (outside Germany +49 - 911 - 895 - 7100)
1-5
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.
When handling and installing the module, please keep to the general guidelines for


handling electrostatically sensitive devices and follow the instructions in the ‘ET 200X Distributed I/O System’ manual /4/.
Insert or remove modules only when the power is turned off.


Noise immunity/grounding


To ensure the noise immunity of the CP 142-2, the ET 200X distributed I/O system and the AS-i power supply unit must be correctly grounded.
The CP 142-2 cannot be operated with all variants of the basic modules of the ET 200X


distributed I/O system. Please read the accompanying Product Information.
The AS-i power supply unit used must provide a low voltage, safely isolated from the


network. This safe isolation can be implemented according to the following requirements:
±
VDE 0100 Part 410 = HD 384-4-4 = IEC 364-4-41 (as functional extra-low voltage with safe isolation) or
±
VDE 0805 = EN 60950 = IEC 950 (as safety extra-low voltage - SELV) or
±
VDE 0106 Part 101
2-1
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.
PROFIBUS
AS-i power supply unit
Passive AS-i application module
(without slave ASIC)
AS-i cable
(4 x slaves)
Binary sensors and actuators w ith slave ASIC
A ctive or pass i v e AS -Interface application modu le
PROFIBUS-DP master
PROFIBUS
CP 142-2
ET 200X
Round cable
Active AS-i appl. mod ule (with slave ASIC)
Binary sensors and actuators without slave ASIC
Actuator or sensor
= Slave ASIC
Figure 2-1 Use of the Master Module CP 142-2 in the ET 200X
AS-i cable adapter
with direct connection
Components Supplied
The product CP 142-2 consists of the following:
1. CP 142-2 module
2. Product Information bulletin
The STEP 7 block FC “ASI_3422” required for extended operation of the CP 142-2 is shipped with this manual.
2-2
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
and FC “ASI_3422”
Connection of the AS-i cable M12 male connector (integrated on the CP
142-2) Address range 16 input bytes and 16 output bytes Power supply for the CP 142-2 (via
electronics/ sensor power supply of the ET 200X)
Current consumption from electronics/ sensor power supply
Load voltage of the ET 200X not required for the CP 142-2 Power supply from the AS-i cable Current consumption from the AS-i cable Type of protection IP65, IP66, IP67
Ambient conditions
DC 24 V
max. 60 mA
according to the AS-i specification
max. 100 mA
(with the cover of the button in place)
Operating temperature
Transportation and storage temperature
Relative humidity
Construction
Module format
Dimensions (W x H x D) in mm
Weight
Table 2-1 Technical Specifications
0 to 55°C
-40°C to +70°C max. 95% at +25°C
ET 200X-compatible 87 x 110 x 63 approx. 310 g
2-3
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” manual /4/.
There are several ways of attaching to the AS-i bus and two possible methods are described here.
Direct attachment to the AS-i cable using the AS-Interface adapter M12
±
±
You attach an AS-Interface adapter M12 to the AS-i cable to change from the flat cable to the M12 connection and screw this directly to the connector on the CP 142-2 . Follow the instructions in the installation guide shipped with the adapter. Remember the following point:
The AS-Interface adapter M12 is often the end of an AS-i chain. In this case, insert the rubber stopper in the open end of the adapter as explained in the installation guide.
Before you screw the AS-Interface adapter M12 in place, make sure that after it is screwed to the connector of the CP 142-2, the AS-i cable exits downwards and not towards the neighboring module. If the cable does exit towards the neighboring module, rotate the connection in the adapter through 90° as explained in the installation guide.
Figure 2-2 Direct Attachment of the AS-i Cable to the CP 142-2
2-4
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.
The product information bulletin contains ordering data for the AS-Interface adapter M12.
e 2-3 Connecting the CP 142-2 to the AS-i Cable via a Round Cable
Make sure that you do not cross-thread the socket when you screw it on to the module,


otherwise the thread of the connector on the module can be damaged.
Figure 2-4 AS-i Connector on the CP 142-2
Figur
2-5
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.
Figure 2-5 Front View of the CP 142-2
2.1.4.1 Meaning of the Indicators and Operator Controls:
On the front panel of the CP 142-2, there is a line of 8 LEDs. The upper three LEDs are the group display. The meaning of the lower five LEDs depends on the status of the group display, as follows:
±
If no LED is lit in the group display, the lower five 5 LEDs indicate the status of the CP 142-2 (status display of the CP 142-2). The label to left of the LEDs then applies. The default display is the status display.
±
If one or more of the LEDs in the group display are it, the lower five LEDs indicate the slaves detected or active on the AS-Interface (slave display of the CP 142-2); the label to right of the LEDs then applies.
You can toggle the display with the SET/DISPLAY button. The SET/DISPLAY button is also required to configure the CP 142-2. If the button is not pressed for approximately 10 minutes, the CP 142-2 automatically switches to the status display.
2-6
B8976111/02 AS-i Master Module CP 142-2
2.1.4.2 Status Display of the CP 142-2 (all group LEDs off)
SF (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
button (for example a slave exists with address 0).
±
Briefly when changing to the protected mode
±
When the CP is in the protected mode in the offline phase
APF (red) AS-i Power Fail. This indicates that the voltage supplied to the AS-i cable by
the AS-i power supply unit is too low or there is a complete power outage.
CER (yellow) Configuration Error. The LED is lit when the slave configuration detected on
the AS-i cable deviates from the desired configuration set on the CP 142-2 (LPS).
The CER indicator is lit in the following situations:
±
when a configured AS-i slave does not exist on the AS-i cable (for
example slave failed)
±
when a slave exists on the AS-i cable but it has not been configured
±
when a connected slave has configuration data (I/O configuration, ID code) that are different from those of the slave configured on the CP 142-2
±
briefly when changing to the protected mode
±
When the CP is in the offline phase.
AUP (green) Autoprog available. In the protected mode of the CP 142-2, this indicates
that automatic address programming of a slave is possible. Automatic address programming makes it easier to replace a defective slave on the AS-i cable (for more detailed information, see Chapter 5).
CM (yellow) Configuration Mode. This LED indicates the mode.
Indicator lit: configuration mode Indicator off: protected mode
The configuration mode is only required when installing and starting up the CP 142-2. In the configuration mode, the CP 142-2 activates all connected slaves and exchanges data with them. For more detailed information about the configuration mode / protected mode, refer to Section 2.1.4.6.
2-7
B8976111/02 AS-i Master Module CP 142-2
play
p
play
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. By pressing the SET/DISPLAY button again, you move from group to group.
±
If the CP 142-2 is in the configuration mode, it indicates all detected slaves.
±
If the CP 142-2 is in the protected mode, it indicates all active slaves. Failed or existing but unconfigured slaves are indicated by the corresponding LED flashing.
The module returns to the status display in the following situations:
±
After you have displayed the last group (slave 30, 31) and pressed the SET/DISPLAY button.
±
If the SET/DISPLAY button is not pressed for a longer period (approximately 10 minutes).
Example 1:
Dis
showing that slaves with
addresses 5, 6 and 9 are active.
SF APF CER AUP CM
Figure 2-6 Display of the Active AS-i Slaves on the CP Front Panel
4 9 14 19 24 29 3 8 13 18 23 28 2 7 12 17 22 27 1 6 11 16 21 26 31 0 5 10 15 20 25 30
Exam
Dis addresses 20, 21 and 22 are active.
SF APF CER AUP CM
le 2:
showing that slaves with
4 9 14 19 24 29 3 8 13 18 23 28 2 7 12 17 22 27 1 6 11 16 21 26 31 0 5 10 15 20 25 30
2-8
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 configuration mode to the protected mode and vice-versa (see 2.1.4.6).
The SET/DISPLAY button is to the left of the AS-i connector and is protected by a screw-on cover. Access to the button is only possible when the cover is removed. After using the button, make sure that you replace the cover again, otherwise the degree of protection is not guaranteed. The button is in a recess to prevent it being pressed accidentally. It can be pressed using a ball-point pen or a similar thin blunt instrument.
2.1.4.5 Slots Permitted for the CP 142-2 in the ET 200X Distributed I/O Station
The CP 142-2 can be operated in any slot in the ET 200X distributed I/O station. The number of CP 142-2 modules that can be operated at the same time in the ET 200X distributed
I/O station depends on the basic module being used:
±
With the BM141 and BM142 basic modules, you can operate a maximum of six CP 142-2 modules at the same time.
±
With the basic module BM147, you can operate a maximum of seven CP 142-2 modules at the same time.
2.1.4.6 Configuring the AS-Interface with the SET/DISPLAY Button
Recognizing the display state
The CP 142-2 distinguishes between two operating modes on the AS-Interface:
±
Configuration mode (“CM” LED lit)
±
Protected mode (“CM” LED not lit)
If you press the SET/DISPLAY button for more than 5 seconds, you trigger a mode change. After approximately 5 seconds, the three LEDs of the group display start to flash. The mode changes when you release the button.
2-9
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.
After the system has been installed and tested, the CP 142-2 can be switched to the protected mode by pressing the SET/DISPLAY button for longer than 5 seconds. At the same time, active AS-i slaves are configured. The following data are then stored permanently on the CP 142-2:
±
The addresses of the AS-i slaves
±
The ID codes
±
The I/O configuration
±
The current slave parameters
Protected mode
In the protected mode, the CP 142-2 exchanges data with the configured AS-i slaves. “Configured” means that the slave addresses stored on the CP 142-2 and the configuration data stored on the CP 142-2 match the values of the existing AS-i slaves.
Steps in configuration
1. Change the CP 142-2 to the “Status Display” mode with the SET/DISPLAY (press the SET/DISPLAY briefly, all group LEDs go off).
2. Check that the CP 142-2 is in the “Configuration Mode” state (“CM” LED lit). If the CP 142-2 is not in the configuration mode, press the SET/DISPLAY button for longer than 5 seconds until the LEDs of the group display flash.
3. Switch to the slave display by pressing the SET/DISPLAY button briefly to check whether all the slaves connected to the AS-Interface are indicated.
4. Configure the CP 142-2 by pressing the SET/DISPLAY button for more than 5 seconds (the LEDs of the group display flash). At the same time, the CP 142-2 is switched to the protected mode. The “CM” LED goes off.
The “CER” LED also goes off since following configuration, the “expected configuration” stored on the CP 142-2 matches the stored “actual configuration” on the AS-Interface.
2-10
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:
No AS-i slaves are configured
All AS-i slave parameters are set
Automatic address programming is activated
Changing from the configuration mode to the protected mode is only possible when


there is no slave with address “0” connected to the AS-Interface. If a slave “0” is connected, the “SF” LED lights up when you press the SET/DISPLAY button.
2.1.4.7 Types of Operation with the CP 142-2
With the CP 142-2 module, two types of operation are possible:
Standard operation
Extended operation (with FC “ASI_3422”)
The difference between the two types of operation is as follows:
Standard operation
In this type of operation, the CP 142-2 behaves like a conventional analog input/output module. Four input and four output bits are reserved in the controller for each slave on the AS-i cable.
In standard operation, no commands or special parameters can be transferred to the slaves on the AS-i cable. This type of operation corresponds to the profile M0 of the AS-i master specification.
Extended operation (with FC “ASI_3422”)
With this type of operation, the entire range of functions in the AS-i system are available to the PLC programmer. In particular, the AS-i master calls (for example to assign parameters to slaves) are available. This type of operation corresponds to profile M1 of the AS-i master specification.
For extended operation, the “ASI_3422” FC is also required in addition to the CP 142-2. This FC is shipped with this manual.
Please note that extended operation is currently only possible with the BM147.
2-11
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. No extra FC is required.
3.1 Addressing the CP 142-2
From the point of view of the user program, how the CP 142-2 is addressed depends mainly on the basic module you are using.
3.1.1 Addressing using the BM141/BM142
From the point of view of the PROFIBUS DP master, the CP 142-2 occupies 16 input bytes and 16 output bytes. How these bytes are addressed depends on the PROFIBUS-DP master you are using and the configuration tool.
For more detailed information, refer to /4/ and the manuals for your PROFIBUS-DP master.
3.1.2 Addressing when using the BM147
The CP 142-2 occupies 16 input bytes and 16 output bytes in the area of the analog I/Os of the BM147.
The start address of this address area is decided by the slot of the CP 142-2.
Module Basic module CP CP CP CP CP CP CP Slot number 1 2 3 4 5 6 7 8 9 10 Start addresses - 256 272 288 304 320 336 352
3-1
B8976111/02 AS-i Master Module CP 142-2
3.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. This nibble can be written (slave output data) and read (slave input data). This allows bi-directional slaves to be accessed.
In total, the maximum of 31 AS-i slaves occupy 16 bytes of input data and 16 bytes of output data (see table below).
±
When using the CP with the BM141/BM142, the start addresses m and n of the input or output data depend on the configuration of the PROFIBUS DP master.
±
When using the CP with the BM147, the start addresses depend on the slot of the CP (see Section 3.1.2). The values m and n are then always the same.
Assignment of the input data of the slaves
Byte Number Bits 7-4 Bits 3-0
m+0 Reserved for FC “ASI_3422” Slave 1
m+1 Slave 2 Slave 3 m+2 Slave 4 Slave 5 m+3 Slave 6 Slave 7 m+4 Slave 8 Slave 9 m+5 Slave 10 Slave 11 m+6 Slave 12 Slave 13 m+7 Slave 14 Slave 15 m+8 Slave 16 Slave 17 m+9 Slave 18 Slave 19 m+10 Slave 20 Slave 21 m+11 Slave 22 Slave 23 m+12 Slave 24 Slave 25 m+13 Slave 26 Slave 27 m+14 Slave 28 Slave 29 m+15 Slave 30
Bit 3 | Bit 2 | Bit 1 | Bit 0
Bit 3 | Bit 2 | Bit 1 | Bit 0
Slave 31
Bit 3 | Bit 2 | Bit 1 | Bit 0
m = start address of the input data
3-2
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
n+0 reserved Slave 1
Bit 3 | Bit 2 | Bit 1 | Bit 0
n+1 Slave 2 Slave 3 n+2 Slave 4 Slave 5 n+3 Slave 6 Slave 7 n+4 Slave 8 Slave 9 n+5 Slave 10 Slave 11 n+6 Slave 12 Slave 13 n+7 Slave 14 Slave 15 n+8 Slave 16 Slave 17 n+9 Slave 18 Slave 19 n+10 Slave 20 Slave 21 n+11 Slave 22 Slave 23 n+12 Slave 24 Slave 25 n+13 Slave 26 Slave 27 n+14 Slave 28 Slave 29 n+15 Slave 30
Bit 3 | Bit 2 | Bit 1 | Bit 0
Slave 31
Bit 3 | Bit 2 | Bit 1 | Bit 0
n = start address of the output data


The first four input bits (first ni bble) are reserved for using FC “ASI_3422”. If no FC is used, these bits change approximately every 2.5 seconds between the values 8 The first four output bits (first nibble) have no effect on the CP 142-2.
and EH.
H
3-3
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. The bits on a white background are irrelevant for the user program.
Input b yte
reserved
256
257
Bit 3
258 . . .
Bit 3
271
765
Slave 2
Slave 4
Slave 30
Slave 1
Slave 3
Bit 0Bit 1Bit 2
Slave 5
Bit 0Bit 1Bit 2Bit 3
Slave 31
Slave 31
Bit 0Bit 1Bit 2
4
3210
Bit 0Bit 1Bit 2Bit 3
Bit 0Bit 1Bit 2Bit 3
Bit 0Bit 1Bit 2Bit 3
Bit 0Bit 1Bit 2Bit 3
Bit 0Bit 1Bit 2Bit 3
Output byte
256
257
258 . . .
271
reserved
Slave 2
Bit 2Bit 3
Slave 30
Bit 2Bit 3
7
Bit 1
Slave 4
Bit 1
6
Bit 0
Bit 0Bit 1Bit 2Bit 3
Bit 0
5
43
Slave 1
Slave 5
Slave
Slave 31
31
2
Slave 3
10
Bit 0Bit 1Bit 2Bit 3
Bit 0Bit 1Bit 2Bit 3
Bit 0Bit 1Bit 2Bit 3
Bit 0Bit 1Bit 2Bit 3
Bit 0Bit 1Bit 2Bit 3
AS-i slaves
Slave No. 2 Slave No. 3 Slave No. 4
4I module
2I/2O module
4O module
Slave No.31
4I/4O module
Figure 3-1 Mapping the Slave Addresses on the I/O Addresses
In the diagram above, the 2I/2O module (two inputs and two outputs) occupies bits 0 and 1 in input byte 257 and bits 2 and 3 in output byte 257. The assignment of the AS-i connections of the bus modules to the data bits of the input/output bytes is shown below taking slave no. 3 as an example:
1 0 Bit no.
Input byte 257
Connector 1 on the AS-i bus
module
Connector 2 on the AS-i bus module
3 2 Bit no.
Output byte 257
Connector 3 on the AS-i bus module
Connector 4 on the AS-i bus module
3.2.2 Accessing the AS-i User Data (BM141, BM142)
Access to the AS-i user data depends on the PROFIBUS master you are using. For further information, refer to /4/.
3-4
Loading...
+ 58 hidden pages