Sổ tay module truyền thông CP 243-2 AS-Interface Master
Trang 1Technical Description and
AS-Interface Protocol
Structure of the PROFIBUS Parameter Assignment and
Trang 2! Danger indicates that death, severe personal injury or substantial property damage will result if
proper precautions are not taken
!
Warning
indicates that death, severe personal injury or substantial property damage can, result if
proper precautions are not taken
draws your attention to particularly important information on the product, handling the
product, or to a particular part of the documentation
Qualified Personnel
Only qualified personnel should be allowed to install and work on this equipment Qualified persons are defined
as persons who are authorized to commission, to ground, and to tag circuits, equipment, and systems in dance with established safety practices and standards.
accor-Correct Usage
Note the following:
! WarningThis device and its components may only be used for the applications described in the
catalog or the technical description, and only in connection with devices or componentsfrom other manufacturers which have been approved or recommended by Siemens
This product can only function correctly and safely if it is transported, stored, set up, andinstalled correctly, and operated and maintained as recommended
Trademarks
SIMATIC R and SIMATIC NET R are registered trademarks of SIEMENS AG.
Third parties using for their own purposes any other names in this document which refer to trademarks might fringe upon the rights of the trademark owners.
in-We have checked the contents of this manual for agreement with the ware and software described Since deviations cannot be precluded entirely,
hard-we cannot guarantee full agreement Hohard-wever, the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions Suggestions for improvement are welcomed.
Disclaimer of Liability Copyright Siemens AG 1997 All rights reserved
The reproduction, transmission or use of this document or its contents is not
permitted without express written authority Offenders will be liable for
damages All rights, including rights created by patent grant or registration of
a utility model or design, are reserved.
Siemens AG
Automation Group
Industrial Automation Systems
Subject to change.
Trang 3Purpose of the Manual
This manual supports you when using the CP 242-8 module It explains how an
S7-200 CPU can address AS-i actuators and AS-i sensors via this module Themanual also explains how to access an S7-200 station as a PROFIBUS DP slavevia the CP 242-8
We recommend the following procedure when
you want an overall picture of the AS-Interface:
– First read the ‘AS-Interface Introduction and Basic Information’ manual (part
of this documentation package) This contains general information about the
AS-Interface abbreviated to AS-i in the following chapters.
You want to set up an AS-i system and include the CP 242-8 module in it:– You will find the information you require about connecting and operating the
To understand this manual, you require the following:
A working knowledge of PROFIBUS DPYou should be familiar with the ‘AS-Interface Introduction and Basic Information’manual (supplied with this documentation package)
Diskette with Sample Program and Type/GSD File
The diskette accompanying this manual (S7-200 PROGR) contains sample
programs that will support and help you when programming the CP 242-8 Thesesample programs were written with STEP 7 Micro/WIN and can be run on anS7-200 CPU
The diskette also contains the type and DDB file you require for configuring the CP242-8 with your DP master.(See Section 4.4, Configuring the CP 242-8 on the DPMaster / Content of the Type File and the DDB file.)
Trang 4iv AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
The address of the AUT homepage in the World Wide Web of the Internet is asfollows:
http://www.ad.siemens.de/net
Further Support – Hotline
S Our hotline is also available to deal with problems:
Trang 5
-1 Technical Description and Installation Instructions 1-1
1.1 General 1-21.2 Application of the Module 1-41.3 Technical Specifications of the Module 1-61.4 Installing the Module 1-71.5 Front Panel – Access to all Functions 1-81.6 Connection Elements 1-91.7 Display and Control Elements 1-111.7.1 Status Display 1-121.7.2 Slave Display for AS-i Slaves 1-141.7.3 Displaying and Setting the PROFIBUS Address 1-161.8 Configuring the AS-Interface with the SET Button 1-18
2 Interface to the User Program in the S7-200 CPU 2-1
2.1 CP 242-8 Connects the S7-200 CPU with PROFIBUS DP
and AS-Interface 2-22.2 Addressing the CP 242-8 in the S7-200 CPU 2-42.3 Meaning of the Data in the Digital Module 2-72.3.1 Identification Register in the Digital Module 2-82.3.2 Error Register in the Digital Module 2-92.3.3 Status Byte (Input Register 8DI) 2-112.3.4 Control Byte (Output Register 8DO) 2-132.4 Meaning of the Data in the Analog Module 2-142.4.1 Identification Register in the Analog Module 2-152.4.2 Error Register in the Analog Module 2-162.5 Access to the Analog Input and Output Words 2-172.5.1 Analog Input Area 2-182.5.2 Analog Output Area 2-20
3 CP 242-8 as AS-Interface Master 3-1
3.1 About this Chapter 3-23.2 Addressing the AS-i Slaves with the User Program 3-33.3 Access to the AS-i User Data 3-63.4 Signaling Errors and Diagnostic Information 3-73.5 Command interface of the CP 242-8 3-93.6 Description of the AS-i Commands 3-13
Trang 6vi AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
3.6.6 Set_Permanent_Configuration 3-233.6.7 Get_Permanent_Configuration 3-243.6.8 Store_Actual_Configuration 3-253.6.9 Read_Actual_Configuration 3-263.6.10 Set_LPS 3-273.6.11 Set_Offline_Mode 3-283.6.12 Select Autoprogramming 3-293.6.13 Set_Operation_Mode 3-303.6.14 Change_Slave_Address 3-313.6.15 Read Slave Status 3-323.6.16 Read Lists and Flags
(Get_LPS, Get_LAS, Get_LDS, Get_Flags) 3-333.6.17 Read Total Configuration 3-353.6.18 Configure Total System 3-373.6.19 Write Parameter List 3-403.6.20 Read Parameter Echo List 3-413.6.21 Read Version ID 3-423.6.22 Read and Delete Slave Status 3-433.6.23 Read Slave ID 3-443.6.24 Read Slave I/O 3-453.6.25 Read Data and Delta List 3-46
4 The CP 242-8 as PROFIBUS DP Slave 4-1
4.1 Transferring User Data Between the DP Master and CP 242-8 4-24.2 Controlling Access with the DP Data Area 4-44.2.1 Byte-Consistent Data Transfer 4-54.2.2 Block-Consistent Data Transfer 4-74.3 DP Status Information 4-114.4 Configuring the CP 242-8 in the DP Master/Content of the Type File and the
DDB File 4-134.5 Transmission Rate on PROFIBUS 4-164.6 PROFIBUS DP Control Commands 4-174.7 DP Slave Diagnostics 4-184.7.1 Station Status 1 to 3 4-194.7.2 PROFIBUS Address of the DP Master and Vendor ID 4-214.7.3 Structure of the Device-RelatedDiagnostic Information 4-21
5 Dealing with Problems / Error Displays 5-1
5.1 Replacing a Defective AS-i Slave/Automatic Address Programming 5-25.2 Error Indicators on the CP 242-8/ Dealing with Errors 5-3
Trang 7B Structure of the PROFIBUS DP Parameter Assignment and
Trang 91.1 General 1-21.2 Application of the Module 1-41.3 Technical Specifications of the Module 1-61.4 Installing the Module 1-71.5 Front Panel – Access to all Functions 1-81.6 Connection Elements 1-91.7 Display and Control Elements 1-111.7.1 Status Display 1-121.7.2 Slave Display for AS-i Slaves 1-141.7.3 Displaying and Setting the PROFIBUS Address 1-161.8 Configuring the AS-Interface with the SET Button 1-18
Trang 101-2 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
This chapter explains the performance, installation and basic functions of themaster module CP 242-8
You will learn the following:
Which PLC systems can be operated with the CP 242-8 on PROFIBUS DP andAS-Interface
Which modes are supported by the CP 242-8How to install the CP 242-8
The display and control elements of the CP 242-8How to configure the CP 242-8 by pushbuttonHow to set the PROFIBUS address on the CP 242-8
! CautionWhen handling and installing the CP 242-8 module, make sure that you adhere to
the ESD guidelines
The CP 242-8 must only be connected when the AS-i power supply unit is turnedoff
! CautionNoise immunity/grounding
To ensure the noise immunity of the CP 242-8, both the CP 242-8 and the AS-ipower supply unit must be grounded correctly
! CautionThe 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 followingrequirements:
VDE 0100 Part 410 = HD 38444 = IEC 364441(as functional extra-low voltage with safe isolation) orVDE 0805 = EN60950 = IEC 950
(as safety extra-low voltage SELV) orVDE 0106 Part 101
Trang 11! CautionThe external 24 V power supply must be safely isolated.
Note
The CP 242-8 can be configured, installed and started up separate from thePROFIBUS installation
Trang 121-4 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
DP Slave and AS-Interface Master
The CP 242-8 module can be operated in the S7*200 programmable logic
controller It allows the simultaneous attachment of an S7*200 to PROFIBUS DP(as a DP slave) and to the AS-Interface (as AS-Interface master) Both networkattachments can be used independently of each other
AS*i adapter
AS*i power supply unit
Active module(with slave ASIC)
Passive module(without slave ASIC)
AS-icable
Actuator/sensorwith slave ASIC
S7*200 CPU
Q0.0 Q0.2 Q0.4
SIMATIC S7*200
SIEMENS
CP 242-8
Wider networking via PROFIBUS DP
SF APF
CM
AS-Interface Master
CP 242 * 2
6GK7 242 * 2AX00 * 0XA0 1
4
5 7 0 9
10 12 14
15 17 19
20 22 24
25 28
30
X 2
DP slave / AS-i master
Figure 1-1 Example of a System Setup with the CP 242-8
Trang 13System Integration and Structure
Refer to the accompanying product information bulletin to find out the CPUs withwhich the CP 242-8 can be operated
From the point of view of the S7*200 CPU, the CP 242-8 is considered as twoexpansion modules (one 8DI/8DO digital module and one 8AI/8AO analog
module)
In terms of installation, the CP 242-8 has the same technology as a standardexpansion module for an S7*200 station
Power Supply
The CP 242-8 requires an external 24 V power supply for operation
Components of the Product
The product CP 242-8 includes the following components:
CP 242-8Bus connectorProduct Information for the CP 242-8
Trang 141-6 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
The CP 242-8 module has the following technical specifications:
Table 1-1
AS-i cycle time 5 ms with 31 slaves
Configuration of the AS-Interface By a button on the front panel
Supported AS-i master profiles M1
Connection of the AS-i cable Via a 7-pin terminal block
Permitted current loading from pin 1 to pin 3 or pin
2 to pin 4, maximum 3 A Connection to PROFIBUS Via 9-pin sub D female connector
PROFIBUS address setting – Address range 1 to 126
– Set with SET and DISPLAY buttons Permitted loading 5V DC at PROFIBUS connector max 90 mA
Data rates supported (transmission rate) on
PROFIBUS
9.6 Kbps; 19.2 Kbps; 45.45 Kbps; 93.75 Kbps; 187.5 Kbps; 500 Kbps; 1.5 Mbps; 3 Mbps;
6 Mbps; 12 Mbps Connection to an external 24 V power supply Via terminal block (7-pin)
Address range One digital module with 8DI/8DO and one analog
module with 8AI/8AO Power supply from SIMATIC backplane bus
Current consumption from 5V DC
5 V DC
ma × 340 mA External power supply
Current consumption from 24 V
24 V DC (permitted range 20.4 to 28.8V DC)
ma × 60 mA Power supply from the AS-i cable
Current consumption from the AS-i cable
According to the AS-I specification
ma × 100 mA Power consumption 3.7 W
Ambient conditions
Operating temperature Horizontal installation: 0 to 55 ° C
Vertical installation: 0 to 45 ° C Transportation and storage temperature – 40 ° C to +70 ° C
Relative humidity max 95% at +25 ° C
Trang 151.4 Installing the Module
Trang 161-8 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
Connection, Display and Control Elements
On the front panel, you have access to all the connection, display and controlelements of the CP 242-8
During operation, connection and control elements are protected by a front cover
SF APF CER AUP CM
CP 242-8
AS-Interface Master PROFIBUS DP Slave
1 2 3 4
5 6 7 8
0
9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
25 26 27 28 29
– For AS-i configuration
– For setting the
wall installation
+ 24 V –
6GK7 242-8DP00-0XA0
Figure 1-2 Front Panel
Connections, Operator Controls and Interpreting the Displays
For more detailed information, refer to the following sections
Trang 171.6 Connection Elements
Connections
The CP 242-8 has the following connectors:
Two connectors to the AS-i cable (bridged internally)One connector for the external 24 V supply
One connection for functional earthOne connector to PROFIBUS (9-pin sub D female connector)The connectors are located below the upper cover of the front panel of the CP242-8
Figure 1-3 Connection of the AS-i Cable
Connections to the AS-i cable
The CP 242-8 has two connectors for AS-i cables that are bridged internally in the
CP 242-8
This allows the CP 242-8 to be looped into the AS-i cable
! CautionThe permitted current loading of the AS-i connection contacts is 3 A If this value
is exceeded on the AS-i cable, the CP 242-8 must not be looped into the AS-icable but must be connected with a tap line (only one pair of connectors of the CP242-8 is used)
Trang 181-10 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
External Power Supply
The CP 242-8 requires an external 24 V power supply (the permitted voltage range
is 20.4 to 28.8V DC) The current required from the 24 V supply is 60 mA
With the AC and relay variants of the S7-200 CPUs, the sensor/transmitter supplyprovided by the CPU can be used (see /4/)
Connection to PROFIBUS DP is via a 9-pin sub D female connector
! WarningWhen laying and installing the PROFIBUS DP cable and the bus connector, follow
the instructions in /5/
To attach to PROFIBUS DP, it is advisable to use bus connector 6ES7
972-0BA40-0XA0
Trang 191.7 Display and Control Elements
Meaning of the ADR, BF and DIA LEDs
The front panel of the CP 242-8 has a row with 8 LEDs (see Figure 1-2) All theLEDs are 2-color (red/green or yellow/green) The upper three LEDs (ADR, BF andDIA) make up the group display They indicate the display status
Changing the Display Status – DISPLAY Button
The following figure shows the possible display statuses of the group display.You can change between the status display, slave display and PROFIBUS address
display with the DISPLAY button Each time you press the button, you change to
the next display status finally returning to the initial status
ÍÍ
ÍÍ
ÈÈ ÈÈ
red red/yellow or off green green or off off
Change to the next display status with the DISPLAY button
Status display
(initial status)
Display of the AS-i slaves
Key:
Trang 201-12 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
Interpreting the Status Display
The status display is easily recognized because no groupLED is lit green The ”ADR” LED must also not be lit red.The status display is the default standard display in theinitial state of the CP 242-8
The lower 7 LEDs indicate the status of the CP 242-8;the label to the right of the LEDs then applies
The bottom 5 LEDs indicate errors/states on theAS-Interface The BF and DIA LEDs indicate errors ordiagnostic messages on PROFIBUS DP
Meaning of the 7 Lower LEDs
When the status display is active, the LEDs have the following significance:
Table 1-2
BF (red) Bus Failure Indicates errors on PROFIBUS DP.
The LED is lit when:
The connection between the DP master and the CP 242-8 has broken down or the DP master is not active.
The CP 242-8 was not or was incorrectly configured/assigned parameters by the DP master.
DIA (yellow) Diagnostics The LED is lit when the CP 242-8 indicates diagnostic information to
the DP master.
Diagnostic information is reported by the CP 242-8 when the bit PLC_RUN=0 (see Section 2.3.4 ); this is always the situation when the S7-200 CPU is in the STOP mode.
SF (red) System error The LED is lit when:
The CP 242-8 has detected an internal error (for example EEPROM defective).
The CP 242-8 cannot currently make the mode change requested with the SET button (for example an AS-i slave with address 0 exists).
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.
yellow or off
Trang 21Table 1-2 , (continued)
CER (yellow) Configuration
Error
This LED indicates whether the slave configuration detected on the AS-i cable matches the expected configuration on the CP 242-8 If they do not match, the CER LED is lit.
The CER LED is lit in the following situations:
When a configured AS-i slave does not exist on the AS-i cable (for example failure of the slave).
When an AS-i slave exists on the AS-i cable but it was not previously configured.
When an attached AS-i slave has different configuration data (I/O configuration, ID code) from the slave configured on the CP 242-8 When the CP 242-8 is in the offline phase.
AUP (green) Autoprog
available
In the protected mode of the CP 242-8, this indicates that automatic address programming of an AS-i slave is possible The automatic address programming makes it much easier to exchange a defective AS-i slave on the AS-i cable (for more detailed information refer to Chapter 5.1).
CM (yellow) Configuration
Mode
This LED displays the mode of the CP 242-8.
LED lit: Configuration Mode LED unlit: Protected Mode The configuration mode is only required for installing and starting up the CP 242-8 In the configuration mode, the CP 242-8 activates all connected AS-i slaves and exchanges data with them For more information about the configuration mode, refer to Section 1.8.
Note
If there are no errors detected in the protected mode of the CP 242-8, all LEDs
are off
Trang 221-14 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
Interpreting the slave display status
The slave display can be recognized by the fact that at leastone group LED is lit green and that the ADR LED is not red.The lower 5 LEDs then indicate the slaves on the
AS-Interface In this case, the label to the left of the LEDsapplies The display always represents 5 slaves
Display Statuses and Operation in Detail
The AS-i slaves are displayed in groups of five The upper three group LEDsindicate (in green) which of the groups of 5 is displayed The lower five LEDs are litgreen to indicate the detected or active AS-i slaves within the group
You can move from group to group by pressing the DISPLAY button again.The module returns to the status display in the following situations:
– After displaying the last group (AS-i slaves 30, 31) and pressing theDISPLAY button twice (In other words changing to the PROFIBUS addressdisplay and then to the status display.)
– If you do not press the DISPLAY button for approximately 8 minutes
Characteristics of the Slave Display
If the CP 242-8 is in the configuration mode, all detected AS-i slaves are
displayed
If the CP 242-8 is in the protected mode, all active AS-i slaves are displayed.
In the protected mode, failed or existing but unconfigured AS-i slaves areindicated by the corresponding LED flashing
Trang 23Example of a Slave Display
SF APF CER AUP CM 1
2 3 4
5 6 7 8
0
9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
25 26 27 28 29
30
3 4
BF DIA
Figure 1-4 Example of a Slave Display
From the display you can obtain the following information:
The group LEDs indicate the second group of five
Within this group, the active AS-i slaves 6 and 8 are displayed by the lower fiveLEDs
Trang 241-16 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
Interpreting the PROFIBUS Address Display
If the top LED (”ADR”) of the group display is lit up red, the 7lower LEDs indicate the PROFIBUS address of the CP
242-8 in binary format.
Setting the PROFIBUS Address
To set the PROFIBUS address of the CP 242-8, follow the steps outlined below:
1 Switch the S7-200 CPU to STOP This ensures that bit PLC_RUN = 0
4 If you press the SET button, this bit is set (LED on), if you press the DISPLAYbutton, the bit is reset (LED off) The display then jumps to the ”DIA” LED (nextaddress bit of the PROFIBUS address)
5 By following the steps outlined above, you can now set or reset each of theindividual bits of the PROFIBUS address
6 Once you have entered all the bits, the display of the set address bits flasheschanging quickly between red/green or yellow/green If you press the SETbutton again, the set PROFIBUS address is adopted by the CP 242-8 If, on theother hand, you press the DISPLAY button, the new address is discarded Theentry of the new address must then be repeated (as in steps 4 and 5)
Trang 25The value of the address bits represented by the LEDs of the PROFIBUS address
is illustrated in the following example:
SF APF CER AUP CM
BF DIA ADR
Labeling field
status display
LED row Value of the address bit
red green
green
green
6432168421
In the example, the LEDs indicate the PROFIBUS address:
64 + 4 + 1 = 69
Figure 1-5
In the example above, the PROFIBUS address 69 was set with the SET/DISPLAYbuttons
The highest address that can be set is address 126 Remember that address 126
is reserved on PROFIBUS for special functions (address assignment) For dataexchange with a DP master, you can use addresses 1 to 125
Trang 261-18 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
Interpreting the Display Status
The CP 242-8 can adopt two modes on the AS-Interface:
Configuration ModeProtected ModeWhen you press the SET button, the mode is changed
Note
The SET button is only effective when the bit PLC_RUN = 0 is set in the controlbyte of the CP 242-8 This is always the case, when the S7*200 CPU is in theSTOP mode
Configuration Mode
The configuration mode is used during AS-i installation and startup
In the configuration mode, the CP 242-8 can exchange data with every AS-i slaveconnected to the AS-i cable (except for the AS-i slave with address ‘0’) Any AS-islaves that are added later are detected immediately by the master and activatedand included in the cyclic data exchange
When installation and startup is completed, the CP 242-8 can be switched to theprotected mode using the SET button Any AS-i slaves active at this point aretherefore configured The following data are stored on the CP 242-8 in non-volatilememory:
The addresses of the AS-i slavesthe ID codes
the I/O configurationThe current slave parameters
Trang 27Preparing to Configure
Make sure that the following situation applies:
The S7-200 CPU must be set to STOP (PLC_RUN=0)
The CP 242-8 and all AS-i slaves must be connected to the AS interface andsupplied with power by the AS-i power supply unit
Note
It is only possible to configure the AS interface with the status display and slavedisplay status The CP 242-8 must not be in the PROFIBUS address displaymode, in other words when the SET button is pressed, the ”ADR” LED displaymust not be lit red
4 Press the SET button This configures the CP 242-8
At the same time, the CP 242-8 is switched to the protected mode, the ”CM”LED goes off
The ”CER” LED also goes off since the ”expected configuration” stored on the
CP 242-8 after configuration matches the existing ”actual configuration” on theAS-Interface
Trang 281-20 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
Note
Changing from the configuration mode to the protected mode is only possiblewhen there is no AS-i slave with address 0 connected to the AS-Interface If aslave 0 is connected, the ”SF” LED is lit when the SET button is pressed
Trang 292.1 CP 242-8 Connects the S7-200 CPU to PROFIBUS DP
and AS-Interface 2-22.2 Addressing the CP 242-8 in the S7-200 CPU 2-42.3 Meaning of the Data in the Digital Module 2-72.3.1 Identification Register in the Digital Module 2-82.3.2 Error Register in the Digital Module 2-92.3.3 Status Byte (Input Register 8DI) 2-112.3.4 Control Byte (Output Register 8DO) 2-132.4 Meaning of the Data in the Analog Module 2-142.4.1 Identification Register in the Analog Module 2-152.4.2 Error Register in the Analog Module 2-162.5 Access to the Analog Input and Output Words 2-172.5.1 Analog Input Area 2-182.5.2 Analog Output Area 2-20
Trang 302-2 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
AS-Interface
CP 242-8 as Expansion Module in the S7-200
The CP 242-8 occupies 2 consecutive expansion module slots in the S7-200:Digital module 8DI/8DO
Analog module 8AI/8AO
CP 242-8 PROFIBUS DP
SF APF
CM
AS-Interface Master
CP 242-2
6GK7 242-2AX00-0XA0 1
4
5 8
0 9
10 12 15 18
20 22 25 27 30
User program Digital module (8DI/8DO)
Analog module (8AI/8AO)
DP input/output data Status and diagnostic messages (DP) Input/output data of the AS-i slaves AS-i diagnostic information (delta list) AS-i commands and response data
Status/error information
DP coordination Bank selection
The data to be addressed in the analog module by the user program is selectedusing bank select bits
Trang 31Analog Module
The analog module occupies 16 input and 16 output bytes in the address area ofthe analog inputs and outputs The data exchange both with the PROFIBUS DPmaster and the AS-i slaves is handled via the analog module (see Figure 2-1).The bank select mechanism means that a larger data area in total can be
addressed in the analog module than the addressable data area in the S7-200CPU for the expansion module
Trang 322-4 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
Address Areas
The start addresses of the address areas are determined by the following:
The type of S7-200 CPU being usedThe slot of the CP 242-8 in the S7-200
Examples
The following table contains examples of the addresses of the digital and analoginput/output areas with the possible configurations with a CPU 212 and CPU 214.Example of a CPU 212 and a CP 242-8
I0.0 Q0.0 I1.0 Q1.0 AIW0 AQW0 I0.1 Q0.1 I1.1 Q1.1 AIW2 AQW2 I0.2 Q0.2 I1.2 Q1.2 AIW4 AQW4 I0.3 Q0.3 I1.3 Q1.3 AIW6 AQW6 I0.4 Q0.4 I1.4 Q1.4 AIW8 AQW8 I0.5 Q0.5 I1.5 Q1.5 AIW10 AQW10 I0.6 Q0.6 I1.6 Q1.6 AIW12 AQW12 I0.7 Q0.7 I1.7 Q1.7 AIW14 AQW14
Trang 33Example of a CPU 214 and a CP 242-8 inserted directly beside the CPU
I0.0 Q0.0 I2.0 Q2.0 AIW0 AQW0 I0.1 Q0.1 I2.1 Q2.1 AIW2 AQW2 I0.2 Q0.2 I2.2 Q2.2 AIW4 AQW4 I0.3 Q0.3 I2.3 Q2.3 AIW6 AQW6 I0.4 Q0.4 I2.4 Q2.4 AIW8 AQW8 I0.5 Q0.5 I2.5 Q2.5 AIW10 AQW10 I0.6 Q0.6 I2.6 Q2.6 AIW12 AQW12 I0.7 Q0.7 I2.7 Q2.7 AIW14 AQW14 I1.0 Q1.0
I1.1 Q1.1 I1.2
I1.3 I1.4 I1.5
Example of a CPU 214, a CP 242-2 and a CP 242-8
I0.0 Q0.0 I2.0 Q2.0 AIW0 AQW0 I3.0 Q3.0 AIW16 AQW16 I0.1 Q0.1 I2.1 Q2.1 AIW2 AQW2 I3.1 Q3.1 AIW18 AQW18 I0.2 Q0.2 I2.2 Q2.2 AIW4 AQW4 I3.2 Q3.2 AIW20 AQW20 I0.3 Q0.3 I2.3 Q2.3 AIW6 AQW6 I3.3 Q3.3 AIW22 AQW22 I0.4 Q0.4 I2.4 Q2.4 AIW8 AQW8 I3.4 Q3.4 AIW24 AQW24 I0.5 Q0.5 I2.5 Q2.5 AIW10 AQW10 I3.5 Q3.5 AIW26 AQW26 I0.6 Q0.6 I2.6 Q2.6 AIW12 AQW12 I3.6 Q3.6 AIW28 AQW28 I0.7 Q0.7 I2.7 Q2.7 AIW14 AQW14 I3.7 Q3.7 AIW30 AQW30 I1.0 Q1.0
I1.1 Q1.1 I1.2
I1.3 I1.4 I1.5
Trang 342-6 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
Example of a CPU 214, one 8DI module, one 3AI/1AO module and a CP 242-8
I0.0 Q0.0 I2.0 AIW0 AQW0 I3.0 Q2.0 AIW16 AQW16 I0.1 Q0.1 I2.1 AIW2 I3.1 Q2.1 AIW18 AQW18 I0.2 Q0.2 I2.2 AIW4 I3.2 Q2.2 AIW20 AQW20 I0.3 Q0.3 I2.3 I3.3 Q2.3 AIW22 AQW22 I0.4 Q0.4 I2.4 I3.4 Q2.4 AIW24 AQW24 I0.5 Q0.5 I2.5 I3.5 Q2.5 AIW26 AQW26 I0.6 Q0.6 I2.6 I3.6 Q2.6 AIW28 AQW28 I0.7 Q0.7 I2.7 I3.7 Q2.7 AIW30 AQW30 I1.0 Q1.0
I1.1 Q1.1 I1.2
I1.3 I1.4 I1.5
Example of a CPU 216, one CP 242-8
I0.0 Q0.0 I3.0 Q2.0 AIW0 AQW0 I0.1 Q0.1 I3.1 Q2.1 AIW2 AQW2 I0.2 Q0.2 I3.2 Q2.2 AIW4 AQW4 I0.3 Q0.3 I3.3 Q2.3 AIW6 AQW6 I0.4 Q0.4 I3.4 Q2.4 AIW8 AQW8 I0.5 Q0.5 I3.5 Q2.5 AIW10 AQW10 I0.6 Q0.6 I3.6 Q2.6 AIW12 AQW12 I0.7 Q0.7 I3.7 Q2.7 AIW14 AQW14 I1.0 Q1.0
I1.1 Q1.1 I1.2 Q1.2 I1.3 Q1.3 I1.4 Q1.4 I1.5 Q1.5 I1.6 Q1.6 I1.7 Q1.7 I2.0
I2.1 I2.2 I2.3 I2.4 I2.5 I2.6 I2.7
Trang 352.3 Meaning of the Data in the Digital Module
Overview
The digital module of the CP 242-8 consists of four registers:
Identification register, 8 bits (I/O module identifier)Error register, 8 bits
Input register, 8DI (status byte of the CP 242-8)Output register, 8DO (control byte of the CP 242-8)Essentially, the functions shown in the following diagram are handled via thisregister:
CP 242-8 PROFIBUS DP
SF APF
CM
AS-Interface Master
CP 242-2
6GK7 242-2AX00-0XA0 1
3
5 7 0 9
10 12 15 17 20 22 25 27 30
User program Digital module (8DI/8DO)
Analog module (8AI/8AO)
Figure 2-2
Trang 362-8 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
2.3.1 Identification Register in the Digital Module
Meaning
The identification register signals the I/O module identifier to indicate the existence
of an 8DI/8DO digital module with the value specified below
The address at which the program can access the identification register depends
on the slot in which the CP 242-8 is inserted
For further information about the special bit memory and its structure for I/Omodules refer to/5/
Range of Values
The identification register can be read via the special bit memory of the S7-200
CPU It provides the fixed value 05H.
Example
Situation: The CP 242-8 is inserted directly beside the S7-200 CPU
The content of the identification register can be read from SMB8
Trang 372.3.2 Error Register in the Digital Module
Meaning for the User Program
With this register, the CP 242-8 signals errors to the user program
Structure of the Error Register
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bit Description/Range of Values
Table 2-1
CER 0 AS-i configuration correct (only in the protected mode)
The ”CER” LED is off
1 AS-i configuration error (only in the protected mode) This indicates a difference between the slave configuration detected on the AS-i cable and the desired configuration configured on the CP 242-8.
The ”CER” LED is lit ( see Section 1.7.1 Status Display of the
CP 242-8).
BF 0 The CP 242-8 has correct parameters and is correctly
configured Cyclic data exchange with the PROFIBUS DP master is active.
1 Can have the following meaning:
The connection between the DP master and the CP 242-8 has broken down or the DP master is not active.
The CP 242-8 was not or was incorrectly configured/assigned parameters by the DP master.
APF 0 AS-i voltage correct
The ”APF” LED is off.
1 AS-i Power Fail;
This indicates that the voltage supplied on the AS-i cable by the AS-i power supply unit is too low or there is a complete power outage.
The ”APF” LED is lit ( see Section 1.7.1 Status Display of the
CP 242-8).
Trang 382-10 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
Table 2-1 , (continued)
DIA 0 The CP 242-8 is not indicating diagnostic information.
1 The CP 242-8 is indicating diagnostic information.
Diagnostic information is signaled by the CP 242-8 when bit PLC_RUN=0 is set (see Section 2.3.4 ) This is the case when the S7-200 CPU is in the STOP mode.
Example of Access to the Error Register
Situation: The CP 242-8 is inserted directly beside the S7-200 CPU
Evaluate the special memory bits SM9.0 to SM9.4 in the SM area (for more
information about the special bit memory area of the S7-200 CPU, refer to /5/)
If an error has occurred one or more of these bits is set
Trang 392.3.3 Status Byte (Input Register 8DI)
Meaning for the User Program
This register indicates the status of the CP 242-8 in terms of the AS-i master
interface and the DP slave interface
Structure of the Status Byte
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Description of the Bits
Table 2-2
ASI_MODE 0 The CP 242-8 is in the protected mode.
1 The CP 242-8 is in the configuration mode.
CP_READY 0 The CP 242-8 is not yet operational after turning on
the power supply Evaluation of the I/O data or other information from the CP is not permitted.
1 The CP 242-8 is ready for operation
DP_STATE
1 / 0
Status of the PROFIBUS DP interface
1 / 0
0 0 After turning on the CP 242-8, no communication
between the DP master and the CP 242-8 has yet taken place (for example parameter assignment, configuration).
0 1 Parameter assignment or configuration error Check
the correct configuration of the PROFIBUS DP master.
1 0 Cyclic data exchange between the DP master and CP
242-8 is active.
1 1 Cyclic data exchange between the DP master and CP
242-8 is interrupted.
DP_CONS 0 The PROFIBUS DP master is exchanging
byte-consistent data with the CP 242-8.
1 The PROFIBUS DP master is exchanging
block-consistent data with the CP 242-8.
Trang 402-12 AS-Interface Master / PROFIBUS DP Slave – Release 01CP 242-8
C79000–G8976–C109/01
Table 2-2 , (continued)
DP_RESP 0/1 Response bit for consistent data transfer (see Section
3.5 ).
ASI_RESP 0/1 Response bit for the AS-i command interface (see
Section 3.5).