1 2 3 4 5 6 7 CP 343 2 / CP 343 2 P AS Interface Master Simatic Net
1 2 3 4 5 6 7 CP 343 2 / CP 343 2 P AS Interface Master Simatic Net
1 2 3 4 5 6 7 CP 343 2 / CP 343 2 P AS Interface Master Simatic Net
1
Technical Description
Appendix
AS-Interface Protocol Implemen-
tation Conformance Statement
A
Glossary
D
Index
Edition 08/2010
1 Technical description
1.10 AS-Interface operation with 24 V voltage
(AS-i Power24V)
5 Using the command interface
5.1 Description of FC "ASI_3422" (supplements
5.2 Description of the AS-i-slave commands (supplements)
7 Dealing with problems / error displays
7.1 Replacing a defective AS-i slave/automatic address
programming
Release 08/2008 7.2 Error displays/remedying errors (incompatibilities)
_______________________________________________
C79000−G8976−C149−04
Edition 01/2023
8 Approvals
8.1 Ex Certificates
Classification of Safety-Related Notices
This manual contains notices which you should observe to ensure your own perso-
nal safety, as well as to protect the product and connected equipment. These noti-
ces are highlighted in the manual by a warning triangle and are marked as follows
according to the level of danger:
Danger
! indicates that death or severe personal injury will result if proper precautions are
not taken.
Warning
! indicates that death or severe personal injury can result if proper precautions are
not taken.
Caution
! with warning triangle indicates that minor personal injury can result if proper
precautions are not taken.
Caution
without warning triangle indicates that damage to property can result if proper
precautions are not taken.
Notice
indicates that an undesirable result or status can result if the relevant notice is
ignored.
Note
highlights important information on the product, using the product, or part of the
documentation that is of particular importance and that will be of benefit to the
user.
Warning
! This 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
components from 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, and installed correctly, and operated and maintained as recommended.
Before you use the supplied sample programs or programs you have written
yourself, make certain that no injury to persons nor damage to equipment can
result in your plant or process.
EU Directive: Do not start up until you have established that the machine on which
you intend to run this component complies with the directive 98/37/EG.
Warning
! This software may only be used for the applications described in the catalog or the
technical description, and only in connection with software products, devices, or
components from other manufacturers which have been approved or
recommended by Siemens.
Before you use the supplied sample programs or programs you have written
yourself, make certain that no injury to persons nor damage to equipment can
result in your plant or process.
Caution
Prior to startup, note the information and follow the instructions in the latest docu-
mentation. You will find the ordering data for this documentation in the relevant
catalogs or contact your local Siemens office.
Siemens AG
Industry Automation
Industrial Communication
Postfach 4848, D-90327 Nuernberg Technical data subject to change.
CP 343−2 / CP 343−2 P AS−Interface Master
Siemens4Aktiengesellschaft G79000−G8976−C149−03
Release 08/2008
C79000−G8976−C149−04
Preface
What’s new?
The CP 343-2 (6GK7 343-2AH01-0XA0) and the CP 343-2 P
(6GK7 343-2AH11-0XA0) as of firmware version V3.0 support all combined
transaction type slaves (CTT slaves) according to AS-i Specification V3.
For these CPs as of firmware version V3.0, configuration of the CTT slaves is
supported as of STEP 7 version 5.4 SP4. The command interface has been
expanded to allow the transfer of CTT2 strings.
The following AS-i CPs do not support CTT slaves complying with AS-i
specification V3:
S 6GK7 343-2AH00-0XA0
S 6GK7 343-2AH10-0XA0
As of STEP 7 version 5.3 SP3, the selection of Siemens slaves is supported in the
slave project engineering.
This issue of the manual also includes several corrections.
The notes on installation have been integrated in the manual. The product
information bulletin no longer ships with the product.
Requirements
To understand this manual, you require the following:
S Basic knowledge of SIMATIC S7, STEP 7
S Familiarity with the manual ‘AS-Interface − Introduction and Basic Information’
(on the accompanying product CD).
FAQs
You will find FAQs on Siemens AS-i products on the Internet on the Service and
Support pages of Industry Automation at the following address:
http://support.automation.siemens.com/WW/view/en/10805888
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1 Technical Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.1 General Notes on Operation − Safety Warnings . . . . . . . . . . . . . . . . . . 11
1.2 Overview of the Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.2.1 Uses of the Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.2.2 The Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3 Technical Specifications of the Module . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.4 Approvals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.5 Displays and Operator Controls of the CP 343-2 . . . . . . . . . . . . . . . . . . 17
1.6 Configuring using Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.7 Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.8 Permitted Slots for the CP 343-2 in the SIMATIC S7-300 and in
the ET 200M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.9 Addressing the CP 343-2 in the S7 Automation System . . . . . . . . . . . 24
2 Installation and Commissioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.1 Safety Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.2 Installing and Commissioning the CP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3 Configuration with STEP 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.1 General Information on Configuring the CP 343-2 with STEP 7 . . . . . 28
3.2 STEP 7 Basic Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.3 Extra Configuration of the CP 343-2 P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3.1 Configuring in STEP 7 − Operating Parameters . . . . . . . . . . . . . . . . . . 30
3.3.2 Configuring AS-i Slaves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.4 Uploading the Actual Configuration to the PG (CP 343-2 P only) . . . . 38
4 Data Exchange between User Program and AS−i Slaves . . . . . . . . . . . . . . . . . . 39
4.1 Exchanging AS−i Binary Values with Standard or A Slaves . . . . . . . . . 39
4.1.1 Addressing the Standard or A Slaves with the PLC . . . . . . . . . . . . . . . 40
4.1.2 Accessing Binary Data of Standard or A Slaves . . . . . . . . . . . . . . . . . . 42
4.2 Exchanging AS-i Binary Values with B Slaves . . . . . . . . . . . . . . . . . . . . 44
4.2.1 How the PLC Addresses the Slaves . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.2.2 Accessing Binary Data of B Slaves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.3 Points to Note about Binary Data of Analog Slaves . . . . . . . . . . . . . . . 47
Notice
The two device types CP 343-2 and CP 343-2 P are largely identical in terms of
functionality. The CP 343-2 P however has additional options for configuration and
parameter assignment during startup (see Section 2.1).
The CP 343-2 P module is not therefore intended as a replacement for the
CP 343-2 that can still be ordered!
Note
In the description below a distinction between the types CP 343-2 and CP 343-2 P
is made only where their performance characteristics differ.
Otherwise, unless specifically indicated, the name CP 343-2 (or CP) stands for
both device types CP 343-2 and CP 343-2 P
Using the CP
You can use the CP 343-2 in the following automation systems:
S S7-300 − central configuration
S S7-300 − distributed configuration via ET 200M (IM153)
You can also connect the CP to an S7-400H via a redundant ET 200M.
Caution
To ensure protection from electrostatic discharge, the module may only be
operated when the front panel is closed.
When operating the module, implement the measures for preventing build up of
electrostatic charges. For information on this topic, refer to the S7-300 device
manual /4/.
You will find further information on conditions for use in Chapter 2.
Warning
! WARNING − EXPLOSION HAZARD: DO NOT DISCONNECT EQUIPMENT
WHEN A FLAMMABLE OR COMBUSTIBLE A TMOSPHERE IS PRESENT.
Warning
! When used under hazardous conditions:
S If the cable or conduit entry point exceeds 70_C or the branching point of
conductors exceeds 80_C, special precautions must be taken: If the equipment
is operated in an air ambient of 50_C ... 60_C, only use cables with admitted
maximum operating temperature of at least 80_C.
S Provisions shall be made to prevent the rated voltage from being exceeded by
transient disturbances of more than 40%. This criterion is fulfilled, if supplies
are derived from SELV (Safety Extra Low Voltage) only.
Restrictions
Access to AS-i analog values using data records 140 to 147 and to the binary
values of the B slaves using data record 150 is not possible with the CPU 318 with
a firmware version V1.1.3 or earlier.
The CP 343-2 module can be operated in the automation systems (AS or PLC) of
the S7-300 series and in the ET 200M system. It allows the connection of an AS-i
chain to the programmable controllers listed above.
Using the CP 343-2, you can access the inputs and outputs on the AS-i slaves
from the PLC. Depending on the slave type, you can access binary values or
analog values.
All AS-i slaves complying with AS-i specification V3.0 can be operated except for
slaves complying with slave profile 7.1 and 7.2.
CP 343-2
S7−300
Active module
Passive module (with slave ASIC)
(without slave ASIC)
PROFIBUS
CP 343-2
ET 200M
(IM 153) *)
Active module
Passive module (with slave ASIC)
(without slave ASIC)
Note
The 20-pin front connector for attaching to the AS-i cable is not supplied with the
CP 343-2. You will find the order number of the front connector in the Catalog
IK PI.
Feature Explanation/Values
Bus cycle time 5 ms with 31 slaves
10 ms for 62 slaves with the extended
addressing mode
Depending on the slave profile, analog values
have longer update times.
Configuration Using buttons on the front panel or with
STEP 7
(download of the configuration with
FC “ASI_3422”, see section 5.1)
Supported AS-i master profiles M4
Connection of the AS-i cable Via S7-300 front connector with screw
contacts (20-pin)
Current load between contact 17 and 19 and
between 18 and 20 maximum 4 A
1.4 Approvals
Note
The current approvals are printed on the module.
SF
RUN
APF
CER
AUP
CM
B
20+
10+
SET
9
8
7
6
5
4
3
17 2
AS-i+ (brown) 18 1
AS-i− (blue) 19
0
20
Figure 1-3 Front Connector Pin Assignment and Labeling on the CP 343-2
The CP 343-2 has internal contacts for two AS-i cables that are jumpered internally
on the CP. This allows the CP 343-2 to be “looped” into the AS-i cable.
Notice
The load capacity of the contacts is a maximum of 4 A. If this value is exceeded
on the AS-i cable, the CP 343-2 must not be “looped into” the AS-i cable but must
be connected by a separate cable (only one pair of contacts used on the
CP 343-2).
For further information on connecting the AS-i cable, refer to Section 2.2.
LED Meaning
SF System fault.
The LED is lit when:
S The CP 343-2 is in the protected mode and an AS-i configuration error has
occurred (for example slave failed)
S The CP detects an internal fault (for example EEPROM defective)
S In response to a button command, the CP cannot execute the required mode
change at the present time (for example, because there is a slave with
address 0).
RUN Indicates that the CP has started up correctly.
APF 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 Configuration Error.
This LED indicates whether the slave configuration detected on the AS-i cable
matches the configuration configured on the CP (LPS). If they do not match, the
CER LED is lit.
The CER LED is lit in the following situations:
S When a configured AS-i slave does not exist on the AS-i cable
(for example failure of the slave).
S When a slave exists on the AS-i cable but it has not been configured
S When an attached slave has different configuration data (I/O configuration, ID code)
from the slave configured on the CP.
S When the CP is in the offline phase.
AUP Autoprog available.
In the protected mode of the CP, 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.2.12).
CM Configuration Mode.
This LED indicates the mode.
Indicator on: configuration mode
Indicator on: protected mode
LED Meaning
S Configuration Mode
S Protected Mode
In the protected mode, the CP 343-2 exchanges data only with the configured
AS-i slaves. In this sense, “configured” means that the slave addresses and
the configuration data stored on the CP 343-2 match the values of existing
AS-i slaves.
SET Button
The SET button is required for configuring the CP 343-2 in standard operation. The
button is only activated when the PLC is in the STOP mode.
If the CP 343-2 is in the configuration mode (CM LED lit), the CP 343-2 is
configured automatically when the button is pressed. Configuration involves the
following steps:
1. The CP 343-2 saves the existing slave configuration as indicated by the LEDs
of the active slaves as the expected configuration.
2. The CP 343-2 then changes to the protected mode.
If the CP 343-2 is in the protected mode (“CM” LED is not lit), pressing the button
on the CP switches to the configuration mode.
For information on the method, refer to Section 1.6.
Example 1
B B
Indicates that the slaves with
addresses 1, 2 and 5 are detected
and activated.
Example 2
Indicates that the slaves with
addresses 20, 21 and 22 are
detected and activated.
Figure 1-4 Examples of the Display of Detected and Activated AS-i Slaves on the Front Panel of the
CP 343-2
Example 3
B B
Indicates that the slave with
address 31B is detected and
activated.
Example 4
Indicates that the slaves with
addresses 10B and 17B are
detected and activated.
Figure 1-5 Examples of the Display of Detected and Activated AS-i Slaves on the Front Panel of the
CP 343-2
Note
Changing from the configuration mode to the protected mode is only possible
when there is no AS-i slave with address 0 connected to the AS-Interface. If a
slave 0 is connected, the “SF” LED lights up when the SET button is pressed.
If you run a button configuration when there is no AS-i power supply (APF state) or
when no AS-i slaves are connected, all the internal lists are set to their default
values. In particular, all the AS-i parameters are set to = F Hex and the
AutoAddress_Enable bit is set to = 1.
Notice
The following applies to the CP 343-2 P: A configuration of the AS-i slaves set by
STEP 7 and downloaded to the S7 station is transferred to the CP 343-2 P by the
CPU during startup. Any configuration set with the buttons is then overwritten.
1.7 Modes
The CP recognizes two modes:
S Configuration mode
S Protected mode
Configuration mode
The configuration mode is used during AS-i installation and startup.
You can change the CP module from protected mode (productive operation) to
configuration mode with the ”SET” button. (“CM” LED is lit, see Section 1.6).
In Configuration mode, the CP can exchange data with every AS-i slave connected
to the AS-i cable. Any AS-i slaves that are added later are detected immediately by
the master, activated and included in the cyclic data exchange.
Protected mode
In protected mode, the CP exchanges data only with the configured AS-i slaves.
After configuring with the “SET” button, activate protected mode by pressing the
”SET” button again, the “CM” LED goes off.
Rack 0
Module PS CPU IM CP CP CP CP CP CP CP CP
Slot number 1 2 3 4 5 6 7 8 9 10 11
Base address 1 2 3 256 272 288 304 320 336 352 368
Rack 1
Module IM CP CP CP CP CP CP CP CP
Slot number 3 4 5 6 7 8 9 10 11
Base address 384 400 416 432 448 464 480 496
Rack 2
Module IM CP CP CP CP CP CP CP CP
Slot number 3 4 5 6 7 8 9 10 11
Base address 512 528 544 560 576 592 608 624
Rack 3
Module IM CP CP CP CP CP CP CP CP
Slot number 3 4 5 6 7 8 9 10 11
Base address 640 656 672 688 704 720 736 752
Note
In most CPUs (for example, the CPU 315-2DP, 318), the slot-oriented addressing
can be modified with STEP 7 configuration (HW Config).
In particular, with the freely configurable CPUs, it is possible to address the
standard AS-i slaves or the A/B slaves with A addresses from the extended
address area via the process image of the inputs and outputs.
Warning
! When used under hazardous conditions (zone 2), the devices must be installed in an
enclosure.
To comply with Directive 2014/34/EU on Equipment and Protective Systems
Intended for Use in Potentially Explosive Atmospheres and UK-Regulations
2016 (S.I. 2016 No. 1107), and related amendments, this enclosure must meet the
requirements of at least IP54 in compliance with EN 60529.
Warning
! S ”WARNING” − Explosion Hazard − Do not disconnect while circuit is live unless
area is known to be non-hazardous.
S ”WARNING” − Explosion Hazard − Substitution of components may impair
suitability for Class I, Division 2 or Zone 2.
S ”This equipment is suitable for use in Class I, Division 2, Groups A, B, C, D;
Class I, Zone 2, Group IIC or non-hazardous locations.
Warning
! The device is designed for operation with safety extra-low voltage (SELV). This
means that only safety extra-low voltages (SELV) complying with
IEC950/EN60950/ VDE0805 may be connected to the power supply terminals.
The power unit for supplying the device must comply with NEC Class 2 as descri-
bed by the National Electrical Code(r) (ANSI/NFPA 70).
The power of all connected power units in total must correspond to a limited power
source (LPS).
If the cable to the external power unit is very long and liable to energy spikes, con-
nect a surge protection element.
Caution
! Please keep to the ESD guidelines when installing and operating the CP.
Connect the CP only when the power supply is turned off.
Notice
To achieve the noise immunity of the CP 343-2 / CP 343-2 P the AS and AS-i
power supply unit must be correctly grounded.
Please note the instructions regarding the grounding and chassis ground concept
in the SIMATIC S7 installation guidelines; see “SIMATIC S7 Automation System
S7-300 − Installation: installation manual” /4/.
Installation
The CP can be installed in a SIMATIC S7-300 or an ET 200M.
Notice
The CP 343-2 / CP 343-2 P is not released for operation in the IM 153-3.
Caution
! The load capacity of the AS-i contacts is a maximum of 4 A. If this value is
exceeded on the AS-i cable, the CP must not be “looped into” the AS-i cable but
must be connected by a separate cable( only one pair of CP terminals used).
Note
The information on the basic configuration in Section 3.2 applies both to the
CP 343-2 and to the CP 343-2 P.
The information in Section 3.3 relates only to the CP 343-2 P!
Start addresses:
must be identical for inputs and
outputs.
Reserved length:
S In the default setting, 16 bytes
are reserved;
Note
The information in Section 3.3 relates only to the CP 343-2 P!
The settings you have made up to now in the Properties dialog are adequate to be
able to access the AS-i slaves from the user program. If you want to set a more
detailed AS-i configuration with STEP 7, follow the steps below.
Notice
A configuration of the AS-i slaves set by STEP 7 and downloaded to the S7 station
is transferred from the CPU to the CP 343-2 P when the S7 station starts up. Any
configuration set with the buttons is then overwritten.
Take the AS-i slaves from the drop-down list. Three basic types of AS-i slave are
available:
S AS-i A/B Slave Universal
AS-i slave with extended addressing mode
S AS-i Standard Slave Universal or AS-i Analog Slave
AS-i slave for the standard address area; if you use this slave type, you cannot
place an AS-i A/B slave at the same address in the B address area.
S Siemens Slaves
As of STEP 7 version 5.3.3, you have the option of simple configuration of
slaves from Siemens AG, by selecting the relevant order number from the
drop-down list.
As an alternative, you can open the slave selection dialog with the “Selection”
button. Here, you will find the Siemens slaves with order numbers arranged
according to groups.
As an option, start-up
parameters can be permitted
here;
Whether this parameter can
be used depends on the
slave type.
Notice
In the corresponding digital values, STEP 7 does not indicate the correct number
of bits. Access to the user data by the user program is nevertheless always possi-
ble.
The following screenshot shows an example of the “Slave Configuration” tab in the
Properties dialog of a module with configured CTT slaves:
Table 3-1
Note
Slaves with IO code 6 and ID code 0 occupy several AS-i addresses. The IO and
ID code specified by the vendor must be configured for each occupied AS-i ad-
dress.
Aims
You can upload the current actual configuration over the CP 343–2 P to the open
STEP 7 project.
This allows you to
S read in a complex configuration and use it as a basis for a further configuration
in STEP 7
S check a current configuration.
Note
The uploaded configuration is always the current actual configuration. This can
deviate from the configuration set with the buttons and stored on the AS-i master ,
for example when an AS-i slave is added or removed using the button
configuration function.
When you download the configuration defined in the STEP 7 project to the
CP 343-2, the configuration detected by the button configuration function is
overwritten.
ÍÍÍ
I/O commands
ÍÍÍÍÍÍÍ
ÎÎÎ
(e.g. L PIW 288) AS-i
ÍÍÍÍÎÎÎ
slave 1
ÍÍÍÍÍÍÍ
ÎÎÎÎÍÍÍ
ÎÎÎ
AS-i
slave 2
I/O commands
ÎÎÎÎ
(e.g. T PQD 260)
ÎÎÎÎ .
.
.
ÍÍÍ
ÎÎÎ
AS-i
slave
Backplane bus
ÎÎÎ
AS-Interface
31
Figure 4-1
Each standard or A slave on the AS-i cable is assigned four bits (a nibble) by the
CP 343-2. The PLC can write (slave output data) and read (slave input data) this
nibble. This allows bi-directional slaves to be accessed.
The first four input bits (first nibble) are reserved for using FC “ASI_3422”. If you
do not use an FC, the first four input bits alternate between the values 8H and EH
approximately every 2.5 seconds. The first four output bits (first nibble) have no
significance for the CP 343-2.
Assignment:
n = base address
The table shows the assignment of the CP 343-2 interface for standard and A
slaves (where n is the base address of the I/O address area occupied by the
CP 343-2). The assignment of the slave I/O bits to the I/O byte of the PLC can
also be seen in the table.
Example of a Configuration
Figure 4−2 shows an example of the PLC CPU addressing 4 standard or A slaves.
The base addresses m = 256 for the I/O data are configured in STEP 7.
The bits relevant for the user program are shown on a gray background. The bits
shown on a white background are irrelevant for the user program since no AS-i
slave bits are assigned here.
DP master
16 16
Input bytes Output bytes
slave 1 slave 1
256
Bit 3 Bit 2 Bit 1 Bit 0 Bit 3 Bit 2 Bit 1 Bit 0 256 Bit 3 Bit 2 Bit 1 Bit 0 Bit 3 Bit 2 Bit 1 Bit 0
7 6 5 4 3 2 1 0 7 3 2 1 0 0
7 66 55 44
Figure 4-2
In the figure above, for example, the 2I/2O module (AS-i slave number 3 with two
inputs and two outputs) occupies bits 0 and 1 in input byte 1 and bits 2 and 3 in
output byte 1.
The assignment of the AS-i terminals of the AS-i bus modules to the data bits of
the input/output bytes is shown below based on the example of slave number 3:
1 0 Bit no.
Input byte 1
3 2 Bit no.
Output byte 1
The bits of the AS-i slaves are accessed using S7 load and transfer commands,
such as:
L PIW X
L PID X
T PQW X
T PQD X
X stands for the byte address on the CP 342-2.
Note
The internal system allows access only to even byte addresses in words or double
words. The byte transfer commands L PIB X and T PQB X are not permitted in
conjunction with the CP 342-2.
Example:
Correct: L PIW 260
Wrong: T PQB 260
Wrong: L PIW 257
If you require bit access to slave data, you can, for example, use the strategy
shown in the following program example of a CP with base address 256:
Table 4-1
STL Explanation
//Read in binary input data of standard/A slaves
L PID 256
T DB20.DBD 0
L PID 260
T DB20.DBD 4
L PID 264
T DB20.DBD 8
L PID 268
T DB20.DBD 12
Note
If you use a PLC CPU with configurable I/O addresses (for example, 315-2DP),
you can also access the 16 bytes of I/O data directly via the process image using
single commands.
ÍÍÍ
SFC 58 “WR_REC”
ÍÍÍÍÎÎÎ
ÍÍÍ
DSNR 150 AS-i slave
ÍÍÍÍÎÎÎ
Data areas for 1B
ÍÍÍÍÍÍÍ
binary outputs
ÎÎÎÎÍÍÍ
ÎÎÎ
AS-i
slave 2B
SFC 59 “RD_REC”
ÎÎÎÎ
Data areas for
binary inputs
DSNR 150
ÎÎÎÎ .
.
.
ÍÍÍ
ÎÎÎ
AS-i slave
ÎÎÎ
31B
The CP 343-2 manages the binary data of the B slaves in two 16-byte long areas
(one area for the input data and one area for the output data). The structure of
these areas corresponds to the structure of the binary data for the standard or A
slaves.
Assignment:
n = base address
The following sample program illustrates access to the binary data of B slaves.
Table 4-2
STL Explanation
//Read in binary input data of the B slaves:
CALL SFC 59 //RD_REC
REQ :=TRUE //Permanent trigger
IOID :=B#16#54 //Fixed value
LADDR :=W#16#100 //CP address (here 256 dec.)
RECNUM :=B#16#96 //DSNR=150 (binary data B slaves)
RET_VAL :=MW10
BUSY :=M9.0
RECORD :=P#DB20.DBX16.0 Byte 16 //Dest. area binary data
If you use slaves complying with CTT 1−5, all or some I/O bits may be used for
special transfer functions.
The following applies to these protocol bits:
S In the input direction, the CP sets the value “0”.
S In the output direction, the CP ignores the bits;
How to access AS-i analog slaves is described in Section 4.4.
Notice
The following descriptions apply only to AS−i slaves whose data is stored in the
analog area. Analog value transfer in compliance with AS-i slave profile 7.1/7.2 is
not supported by the CP 343-2. In this case, analog value transfer must be imple-
mented in your software.
ÍÍÍ
write_record
S DSNR 140−147
Data records
ÎÎÎ
ÍÍÍ AS-i
Data area for 140−147 for
ÍÍÍÍÎÎÎ slave 1
ÍÍÍÍÍÍÍ
analog analog
output values values
outputs
ÎÎÎ
ÍÍÍ AS-i
ÎÎÎÎÎÎÎ
slave 2
ÎÎÎÎ
read_record Data records
S DSNR 140−147
ÎÎÎÎ
140−147 for
analog
values inputs
Data area for
analog input
ÍÍÍ
ÎÎÎ
ÍÍÍ
values
AS-i
ÎÎÎ
slave n
AS-Interface
Figure 4-4
3 16−23
4 24−31
5 32−39 0−7
6 40−47 8−15
7 48−55 16−23
8 56−63 24−31
9 64−71 32−39 0−7
10 72−79 40−47 8−15
11 80−87 48−55 16−23
12 88−95 56−63 24−31
13 96−103 64−71 32−39 0−7
14 104−111 72−79 40−47 8−15
15 112−119 80−87 48−55 16−23
16 120−127 88−95 56−63 24−31
17 96−103 64−71 32−39 0−7
18 104−111 72−79 40−47 8−15
19 112−119 80−87 48−55 16−23
20 120−127 88−95 56−63 24−31
21 96−103 64−71 32−39 0−7
22 104−111 72−79 40−47 8−15
23 112−119 80−87 48−55 16−23
24 120−127 88−95 56−63 24−31
25 96−103 64−71 32−39 0−7
26 104−111 72−79 40−47 8−15
27 112−119 80−87 48−55 16−23
28 120−127 88−95 56−63 24−31
29 96−103 64−71 32−39 0−7
30 104−111 72−79 40−47 8−15
31 112−119 80−87 48−55 16−23
Table 4-4 Address Area for the Analog Values of an AS-i Slave
Analog A/B slaves with 2 channels occupy only half the address area. The A
slaves, in this case, occupy bytes 0−3 and the B slaves bytes 4−7.
Note
If the CP 343-2 is used in the ET 200M, only a limited number of
read_data_record and write_data_record jobs can be active at the same time on
the S7 CPU. The maximum number of jobs depends on the S7 CPU.
If more jobs are triggered, these are terminated with the error 80C3h (temporary
lack of resources). The rejected job must then be repeated.
Table 4-5
STL Explanation
//Read in analog input data for slave 5:
Call SFC 59 //RD_REC
REQ :=TRUE //Permanent trigger
IOID :=B#16#54 //Fixed value
LADDR :=W#16#100 //CP address (here 256 dec.)
RECNUM :=B#16#8D //DSNR=141 (analog data slave 5...)
RET_VAL :=MW14
BUSY :=M9.2
RECORD :=P#DB20.DBX64.0 BYTE 8 //Dest. area analog input data
Via the command interface, you can control the response of the AS-i master
completely from within your user program.
This chapter contains the information you require to access the command interface
of the CP 343-2.
Meaning
In SIMATIC S7, a convenient command interface is available with FC ASI_3422.
By calling FC ASI_3422, you can handle both the transfer of the command and the
acceptance of the response data. After it has been called, FC ASI_3422 instigates
and handles the “write_record” and “read_record” calls independently.
Points to Note
S You will find FC ASI_3422 at the following locations:
− In the STEP 7 block library “SIMATIC_NET_CP” (as of STEP 7 V5.4 SP4)
− On the accompanying product CD
S You must use version 2.0 or higher of the FC ASI_3422
S FC ASI_3422 must be interrupted during execution! FC calls must not be
programmed in priority classes that can interrupt each other (for example by a
call in OB1 and in OB35).
S If the CP 343-2 is used in the ET 200M, only a limited number of
read_data_record and write_data_record jobs can be active at the same time
on the S7 CPU. The maximum number of jobs depends on the S7 CPU.
If more than the maximum number of jobs are triggered, they are terminated
with the error 80C3h (temporary lack of resources). The rejected job must then
be repeated.
Call Interface
ASI_3422
BOOL ACT DONE BOOL
BOOL STARTUP ERROR BOOL
WORD LADDR
ANY SEND
ANY RECV
DWORD STATUS DWORD
Signal Sequence of the Formal Parameters ACT, DONE, ERROR and STATUS
A command call is started by ACT = 1. During the processing of the job, the first
word of STATUS has the value 8181H. This indicates that a job is being processed.
On completion of the job, the user is informed of the result in the DONE or ERROR
parameters.
If no error occurred, DONE is set. In jobs involving response data from the CP
343-2, these are available in the receive buffer specified for RECV. In this case,
0000H is entered in the first word of STATUS.
If an error occurred, ERROR is set. In this case, no receive data are available from
the CP 343-2 for jobs with response data. To identify the error in greater detail, an
error code is entered in the first word of STATUS.
The DONE, ERROR and STATUS parameters remain unchanged until the next job
is processed.
ACT
DONE
ERROR
Overview
This section describes the command calls that can be sent by the user program to
the CP 343-2. With these command calls, the CP 343-2 provides the complete
functionality of the master profile M4 of the AS-i master specification. How to use
the jobs is explained in the descriptions of the individual jobs, the PICS appendix
and the explanations in /1/ and /2/.
Byte Meaning
q+0 Command number
q+1 Job data
q+... Job data
q = base address of the send buffer on the DP master
Byte Meaning
n+0 Response data
n+1 Response data
n+... Response data
n = base address of the response buffer on the DP master
Where the S(elect) bit for selecting the slave type is specified as follows:
S S bit = 0
Standard AS-i slave or AS-i slave with extended addressing mode in address
area A
S S bit = 1
AS-i slave with extended addressing mode in address area B
5.2.1 Set_Permanent_Parameter
Meaning
With this call, a parameter value for the specified AS-i slave is configured on the
CP 343-2. The value is stored permanently in the EEPROM of the CP 343-2.
The configured parameter is not transferred immediately by the CP 343-2 to the
AS-i slave. The configured parameter value is only transferred when the AS-i slave
is activated after turning on the power supply on the CP 343-2.
This call is not permitted for AS-i slaves that comply with the AS-i slave standard
profile 7.4. For these AS-i slaves, the AS-i master handles the AS-i slave
parameter assignment itself. In this case, the configured parameters are always
set to F H.
Notice
If you configure the AS-i slaves with HW Config, using the call described here is
generally unnecessary
If you do use the call, you will overwrite the corresponding configuration data
originating from the button configuration or the configuration set with HW Config.
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 Command number: 00 H
1 Slave address
2 0 Parameter
5.2.2 Get_Permanent_Parameter
Meaning
With this call, a slave-specific parameter value stored on the EEPROM of the CP
343-2 is read.
Byte Meaning
0 Command number: 01 H
1 Slave address
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 0 configured parameters
5.2.3 Write_Parameter
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 Command number: 02 H
1 Slave address
2 0 Parameter
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 0 Parameter echo
5.2.4 Read_Parameter
Meaning
This call returns the current parameter value (actual parameter) of an AS-i slave
sent by the CP 343-2.
This value must not be confused with the parameter echo that is supplied by the
AS-i slave as a response to the write_parameter job.
Byte Meaning
0 Command number: 03 H
1 Slave address
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 0 Parameter
5.2.5 Store_Actual_Parameters
Meaning
With this call, the configured parameters stored on the EEPROM are overwritten
with the current, permanently stored (actual) parameters; in other words, the
parameters of all the AS-i slaves are configured.
For AS-i slaves that comply with the AS-i slave standard profile 7.4, the AS-i
master manages the AS-i slave parameter assignment itself. The configured
parameters for these AS-i slaves always have the value F H.
Byte Meaning
0 Command number: 04 H
5.2.6 Set_Extended_Permanent_Configuration
Meaning
This call sets the following configuration data for the addressed AS-i slave.
S I/O configuration
S ID code
S Extended ID1 code
S Extended ID2 code
The configuration data are stored permanently on the EEPROM of the CP 343-2
and are used as the expected configuration by the AS-i master in the protected
mode. The configuration data are specified by the manufacturer of the AS-i slave.
The meaning of the configuration data is described in /2/.
If the addressed AS-i slave does not support an extended ID code 1/2, the value
FH must be specified.
When this command is executed, the AS-i master changes to the of fline phase and
then changes back to the normal mode (warm restart on the AS-i master).
This call is not made in the protected mode.
Notice
If you configure the AS-i slaves with HW Config, using the call described here is
generally unnecessary
If you do use the call, you will overwrite the corresponding configuration data
originating from the button configuration or the configuration set with HW Config.
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 Command number 25 H
1 Slave address
2 ID code I/O configuration
3 Extended ID1 code Extended ID2 code
5.2.7 Get_Extended_Permanent_Configuration
Meaning
This call reads the following configuration data (configured data) of an addressed
AS-i slave stored on the EEPROM of the AS-i master .
S I/O configuration
S ID code
S Extended ID1 code
S Extended ID2 code
The configuration data are specified by the manufacturer of the AS-i slave. The
meaning of the configuration data is described in /2/.
Byte Meaning
0 Command number 26H
1 Slave address
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 ID code I/O configuration
1 Extended ID1 code Extended ID2 code
2 0
3 0
5.2.8 Store_Actual_Configuration
Notice
If you configure the AS-i slaves with HW Config, using the call described here is
generally unnecessary
If you do use the call, you will overwrite the corresponding configuration data
originating from the button configuration or the configuration set with HW Config.
Byte Meaning
0 Command number: 07 H
5.2.9 Read_Extended_Actual_Configuration
Byte Meaning
0 Command number 28 H
1 Slave address
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 ID code I/O configuration
1 Extended ID1 code Extended ID2 code
2 reserved
3 reserved
5.2.10 Set_LPS
Notice
If you configure the AS-i slaves with HW Config, using the call described here is
generally unnecessary
If you do use the call, you will overwrite the corresponding configuration data
originating from the button configuration or the configuration set with HW Config.
Byte Meaning
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 Command number 29 H
1 00H
2 0 Slave 1 Slave 2 Slave 3 Slave 4 Slave 5 Slave 6 Slave 7
3 Slave 8 Slave 9 Slave 10 Slave 11 Slave 12 Slave 13 Slave 14 Slave 15
4 Slave 16 Slave 17 Slave 18 Slave 19 Slave 20 Slave 21 Slave 22 Slave 23
5 Slave 24 Slave 25 Slave 26 Slave 27 Slave 28 Slave 29 Slave 30 Slave 31
6 0 Slave 1B Slave 2B Slave 3B Slave 4B Slave 5B Slave 6B Slave 7B
7 Slave 8B Slave 9B Slave Slave 11B Slave Slave Slave Slave
10B 12B 13B 14B 15B
8 Slave Slave Slave Slave Slave Slave Slave Slave
16B 17B 18B 19B 20B 21B 22B 23B
9 Slave Slave Slave Slave Slave Slave Slave Slave
2B4 25B 26B 27B 28B 29B 30B 31B
The bits in the LPS data have the following meaning: 0: AS-i slave not configured
1: AS-i slave configured.
5.2.11 Set_Offline_Mode
Meaning
Byte Meaning
Bit 7 Bit 1 Bit 0
0 Command number: 0AH
1 0 Mode
(0=online
1=offline)
Meaning
This call can enable or disable the “automatic address programming” function (see
also Section 7.1).
The AUTO_ADDR_ENABLE bit is stored permanently; in other words, it is
retained after a warm/hot restart on the AS-i master.
Byte Meaning
Bit 7 Bit 1 Bit 0
0 Command number: 0BH
1 0 Value for AUTO_ADDR_ENABLE
1= Automatic address program-
ming enabled
0= Automatic address program-
ming disabled
5.2.13 Set_Operation_Mode
Notice
If an AS-i slave with address 0 is entered in the LDS, the CP
343-2 module cannot change from the configuration mode to the protected mode.
Byte Meaning
Bit 7 Bit 1 Bit 0
0 Command number: 0CH
1 0 Operating mode
0= Protected mode
1=Configuration mode
5.2.14 Change_AS-I_Slave_Address
Byte Meaning
0 Command number: 0DH
1 Slave address old
2 Slave address new
5.2.15 Get_AS-i_Slave_Status
Meaning
With this call, the status register of the addressed AS-i slave can be read out.
Depending on the type of AS-i slave, the flags of the status register have the
following meaning:
Status AS-i slave complying with standard 2.0 AS-i slave complying with standard
Bit 2.1
S0 Address volatile Address/ID code volatile
This flag is set when
S the internal slave routine for permanent storage of the AS-i slave address is
active. This can take up to 15 ms and must not be interrupted by a further
addressing call.
S the AS-i internal slave address comparison recognizes that the stored
address is not the same as the entry in the address register.
S1 Parity error detected I/O error detected
This flag is set when the AS-i slave has An AS-i slave can set this flag
recognized a parity error in a received when it has detected and error (for
frame since the last “read and delete example wire break) in the attached
status” job. I/Os.
S2 End bit error detected reserved
This flag is set when the AS-i slave has
recognized an end bit error in a frame
since the last “read and delete status” job.
S3 Read error in non-volatile memory
This bit is set when the AS-i slave has detected a read error when reading the
non-volatile memory.
Byte Meaning
0 Command number: 0FH
1 Slave address
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 0 S3 S2 S1 S0
Meaning
With this call, the following entries are read out of the CP 343-2:
S The list of active AS-i slaves (LAS)
S The list of detected AS-i slaves (LDS)
S The list of permanent AS-i slaves (LPS)
S The flags according to the AS-i slave specification
Byte Meaning
0 Command number: 30H
Byte Meaning
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 reserved LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
1 2 3 4 5 6 7
1 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
8 9 10 11 12 13 14 15
2 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
16 17 18 19 20 21 22 23
3 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
24 25 26 27 28 29 30 31
4 reserved LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
1B 2B 3B 4B 5B 6B 7B
5 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
8B 9B 10B 11B 12B 13B 14B 15B
6 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
16B 17B 18B 19B 20B 21B 22B 23B
7 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
24B 25B 26B 27B 28B 29B 30B 31B
8 LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave
0 1 2 3 4 5 6 7
9 LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave
8 9 10 11 12 13 14 15
10 LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave
16 17 18 19 20 21 22 23
Byte Meaning
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
11 LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave
24 25 26 27 28 29 30 31
12 reserved LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave
1B 2B 3B 4B 5B 6B 7B
13 LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave
8B 9B 10B 11B 12B 13B 14B 15B
14 LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave
16B 17B 18B 19B 20B 21B 22B 23B
15 LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave LDS slave
24B 25B 26B 27B 28B 29B 30B 31B
16 reserved LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
1 2 3 4 5 6 7
17 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
8 9 10 11 12 13 14 15
18 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
16 17 18 19 20 21 22 23
19 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
24 25 26 27 28 29 30 31
20 reserved LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
1B 2B 3B 4B 5B 6B 7B
21 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
8B 9B 10B 11B 12B 13B 14B 15B
22 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
16B 17B 18B 19B 20B 21B 22B 23B
23 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
24B 25B 26B 27B 28B 29B 30B 31B
24 Flag 1
25 Flag 2
26 reserved
27 reserved
28 reserved
29 reserved
30 reserved
31 reserved
Flag 1 Flag 2
Bit Number Meaning Bit Number Meaning
0 OFFLINE_READY 0 OFFLINE
1 APF 1 INTERNAL
2 NORMAL_MODE 2 EEPROM_OK
3 CONFIG_MODE 3 AUTO_ADDR_ENABLE
4 AUTO_ADDR_AVAIL 4 PERIPHERY_FAULT
5 AUTO_ADDR_ASSIGN 5 reserved
6 LDS_0 6 reserved
7 CONFIG_OK 7 MPO startup
Flag Meaning
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.
NORMAL_MODE This flag is set when the CP 343-2 is in the normal mode.
(The flag is set when the CP is in the normal mode.)
CONFIG_MODE The flag is set in the configuration mode and reset in the protected mode.
AUTO_ADDR_AVAIL This flag is set when the automatic address programming can be executed
(in other words, exactly one AS-i slave is currently out of operation).
AUTO_ADDR_ASSIGN This flag is set when the automatic address programming is possible (in
other words, AUTO_ADDR_ENABLE = 1 and there is no “incorrect” slave
connected to the AS-i Interface).
LDS_0 This flag is set when an AS-i slave exists with address 0.
CONFIG_OK This flag is set when the desired (configured) and actual configuration
match.
OFFLINE This flag is set when the mode is to changed to OFFLINE or this mode has
already been adopted.
EEPROM_OK This flag is set when the test of the internal EEPROM did not detect any
errors.
AUTO_ADDR_ENABLE This flag indicates whether the automatic address programming is enabled
(BIT = 1) or disabled (BIT = 0) by the user.
INTERNAL This flag is always set.
PERIPHERY_FAULT This flag is set when at least one AS-i slave is signaling a peripheral fault.
MPO startup The “master_power_on_startup” flag is set after the power supply of the
AS-i slave master has been turned on. If the master is later
changed to OFFLINE, the bit is reset.
5.2.17 Get_Extended_Total_Configuration
Meaning
With this command, the following data are read from the CP 343-2:
S The list of active AS-i slaves (LAS) This indicates which of the connected AS-i
slaves are activated.
S The current configuration data of the connected AS-i slaves (I/O configuration
and ID code).
S The current parameters of the AS-i slaves (actual parameters)
S The current flags.
This command can, for example, be used to find out the configuration of the
stations connected to the AS-i cable after installation. The configuration data read
in can, if necessary, be modified and saved on the CP 343-2 as the expected
configuration using the command ‘Configure Total System’ (see Section 5.2.18).
Byte Meaning
0 Command number: 39H
Byte Meaning
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 00H
1 00H
2 reserved LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
1 2 3 4 5 6 7
3 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
8 9 10 11 12 13 14 15
4 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
16 17 18 19 20 21 22 23
5 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
24 25 26 27 28 29 30 31
6 reserved LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
1B 2B 3B 4B 5B 6B 7B
7 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
8B 9B 10B 11B 12B 13B 14B 15B
Byte Meaning
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
8 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
16B 17B 18B 19B 20B 21B 22B 23B
9 LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave LAS slave
24B 25B 26B 27B 28B 29B 30B 31B
10 ID_CODE slave 0 I/O configuration slave 0
11 Ext ID1 slave 0 Ext ID2 slave 0
12 ID_CODE slave 1 I/O configuration slave 1
13 Ext ID1 slave 1 Ext ID2 slave 1
14 ID_CODE slave 2 I/O configuration slave 2
15 Ext ID1 slave 2 Ext ID2 slave 2
16 ID_CODE slave 3 I/O configuration slave 3
17 Ext ID1 slave 3 Ext ID2 slave 3
18 ID_CODE slave 4 I/O configuration slave 4
19 Ext ID1 slave 4 Ext ID2 slave 4
20 ID_CODE slave 5 I/O configuration slave 5
21 Ext ID1 slave 5 Ext ID2 slave 5
22 ID_CODE slave 6 I/O configuration slave 6
23 Ext ID1 slave 6 Ext ID2 slave 6
24 ID_CODE slave 7 I/O configuration slave 7
25 Ext ID1 slave 7 Ext ID2 slave 7
26 ID_CODE slave 8 I/O configuration slave 8
27 Ext ID1 slave 8 Ext ID2 slave 8
28 ID_CODE slave 9 I/O configuration slave 9
29 Ext ID1 slave 9 Ext ID2 slave 9
30 ID_CODE slave 10 I/O configuration slave 10
31 Ext ID1 slave 10 Ext ID2 slave 10
32 ID_CODE slave 11 I/O configuration slave 11
33 Ext ID1 slave 11 Ext ID2 slave 11
34 ID_CODE slave 12 I/O configuration slave 12
35 Ext ID1 slave 12 Ext ID2 slave 12
36 ID_CODE slave 13 I/O configuration slave 13
37 Ext ID1 slave 13 Ext ID2 slave 13
38 ID_CODE slave 14 I/O configuration slave 14
39 Ext ID1 slave 14 Ext ID2 slave 14
40 ID_CODE slave 15 I/O configuration slave 15
41 Ext ID1 slave 15 Ext ID2 slave 15
42 ID_CODE slave 16 I/O configuration slave 16
43 Ext ID1 slave 16 Ext ID2 slave 16
44 ID_CODE slave 17 I/O configuration slave 17
45 Ext ID1 slave 17 Ext ID2 slave 17
46 ID_CODE slave 18 I/O configuration slave 18
47 Ext ID1 slave 18 Ext ID2 slave 18
48 ID_CODE slave 19 I/O configuration slave 19
49 Ext ID1 slave 19 Ext ID2 slave 19
50 ID_CODE slave 20 I/O configuration slave 20
51 Ext ID1 slave 20 Ext ID2 slave 20
52 ID_CODE slave 21 I/O configuration slave 21
53 Ext ID1 slave 21 Ext ID2 slave 21
Flag 1 Flag 2
Bit Number Meaning Bit Number Meaning
0 OFFLINE_READY 0 OFFLINE
1 APF 1 INTERNAL
2 NORMAL_MODE 2 EEPROM_OK
3 CONFIG_MODE 3 AUTO_ADDR_ENABLE
4 AUTO_ADDR_AVAIL 4 PERIPHERY_FAULT
5 AUTO_ADDR_ASSIGN 5 reserved
6 LDS_0 6 reserved
7 CONFIG_OK 7 MPO startup
The meaning of the flags is the same as for the Get_LPS, Get_LAS, Get_LDS,
Get_Flags job.
5.2.18 Store_Extended_Total_Configuration
Meaning
With this call, the required total configuration of the AS interface is transferred to
the AS-i master and stored permanently in the EEPROM as the expected
configuration. This configures the CP 343-2.
The following data are transferred:
S The list of configured AS-i slaves specifying the AS-i slaves that can be
activated by the AS-i master in the protected mode.
S The list of configuration data specifying the ID codes and I/O configurations the
AS-i slaves must have.
S The list of AS-i slave parameters configured on the AS-i master and stored in
non-volatile memory. These parameters are transferred to the AS-i slaves when
the AS-i master starts up.
S The flags that determine the operating status of the AS-i master following start
up.
Up to firmware version V2.x, this call is not executed in protected mode.
As of firmware version V3.0, the call is permitted both in protected and in
configuration mode.
For AS-i slaves that comply with the standard profile 7.4, the AS-i master manages
the parameter assignment itself. The parameter values for slaves complying with
standard profile 7.4 specified in the call are ignored by the AS-i master.
Byte Meaning
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 Command number: 3Ah
1 00h
2 reserved LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
1 2 3 4 5 6 7
3 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
8 9 10 11 12 13 14 15
4 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
16 17 18 19 20 21 22 23
5 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
24 25 26 27 28 29 30 31
6 reserved LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
1B 2B 3B 4B 5B 6B 7B
7 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
8B 9B 10B 11B 12B 13B 14B 15B
Byte Meaning
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
8 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
16B 17B 18B 19B 20B 21B 22B 23B
9 LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave LPS slave
24B 25B 26B 27B 28B 29B 30B 31B
10 ID_CODE slave 0 I/O configuration slave 0
11 Ext ID1 slave 0 Ext ID2 slave 0
12 ID_CODE slave 1 I/O configuration slave 1
13 Ext ID1 slave 1 Ext ID2 slave 1
14 ID_CODE slave 2 I/O configuration slave 2
15 Ext ID1 slave 2 Ext ID2 slave 2
16 ID_CODE slave 3 I/O configuration slave 3
17 Ext ID1 slave 3 Ext ID2 slave 3
18 ID_CODE slave 4 I/O configuration slave 4
19 Ext ID1 slave 4 Ext ID2 slave 4
20 ID_CODE slave 5 I/O configuration slave 5
21 Ext ID1 slave 5 Ext ID2 slave 5
22 ID_CODE slave 6 I/O configuration slave 6
23 Ext ID1 slave 6 Ext ID2 slave 6
24 ID_CODE slave 7 I/O configuration slave 7
25 Ext ID1 slave 7 Ext ID2 slave 7
26 ID_CODE slave 8 I/O configuration slave 8
27 Ext ID1 slave 8 Ext ID2 slave 8
28 ID_CODE slave 9 I/O configuration slave 9
29 Ext ID1 slave 9 Ext ID2 slave 9
30 ID_CODE slave 10 I/O configuration slave 10
31 Ext ID1 slave 10 Ext ID2 slave 10
32 ID_CODE slave 11 I/O configuration slave 11
33 Ext ID1 slave 11 Ext ID2 slave 11
34 ID_CODE slave 12 I/O configuration slave 12
35 Ext ID1 slave 12 Ext ID2 slave 12
36 ID_CODE slave 13 I/O configuration slave 13
37 Ext ID1 slave 13 Ext ID2 slave 13
38 ID_CODE slave 14 I/O configuration slave 14
39 Ext ID1 slave 14 Ext ID2 slave 14
40 ID_CODE slave 15 I/O configuration slave 15
41 Ext ID1 slave 15 Ext ID2 slave 15
42 ID_CODE slave 16 I/O configuration slave 16
43 Ext ID1 slave 16 Ext ID2 slave 16
44 ID_CODE slave 17 I/O configuration slave 17
45 Ext ID1 slave 17 Ext ID2 slave 17
46 ID_CODE slave 18 I/O configuration slave 18
47 Ext ID1 slave 18 Ext ID2 slave 18
48 ID_CODE slave 19 I/O configuration slave 19
49 Ext ID1 slave 19 Ext ID2 slave 19
50 ID_CODE slave 20 I/O configuration slave 20
51 Ext ID1 slave 20 Ext ID2 slave 20
52 ID_CODE slave 21 I/O configuration slave 21
53 Ext ID1 slave 21 Ext ID2 slave 21
Flag 1 Flag 2
Bit Number Meaning Bit Number Meaning
0 OFFLINE_READY 0 OFFLINE
1 APF 1 INTERNAL
2 NORMAL_MODE 2 EEPROM_OK
3 CONFIG_MODE 3 AUTO_ADDR_ENABLE
4 AUTO_ADDR_AVAIL 4 PERIPHERY_FAULT
5 AUTO_ADDR_ASSIGN 5 0
6 LDS_0 6 0
7 CONFIG_OK 7 MPO startup
Flags whose values modify the AS-i master mode are shown in gray. The values of
the other flags have no significance for the ‘store total configuration’ command and
cannot be modified on the AS-i master with this call.
CONFIG_MODE The entry ‘0’ means that the AS-i master changes to the protected mode
after executing the command. The entry ‘1’ means that the configuration
mode is retained.
0: On completion of the job, the AS-i master starts up in the protected mode.
1: On completion of the job, the AS-i master starts up in the configuration
mode..
AUTO_ADDR_ENABLE ’0’ means that the automatic address programming is disabled, ’1’ means
that the automatic address programming is enabled.
0: Automatic address programming disabled.
1: Address programming enabled
5.2.19 Write_Extended_Parameter_List
Meaning
With this command, the parameters for all slaves are transferred to the AS-i
master. The AS-i master transfers only the parameters that have changed; in
other words, that differ from the previously set (actual) parameters to the
AS-i slaves.
Byte Meaning
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 Command number: 3C H
1 00H
2 irrelevant Parameters slave 1
3 Parameters slave 2 Parameters slave 3
4 Parameters slave 4 Parameters slave 5
5 Parameters slave 6 Parameters slave 7
6 Parameters slave 8 Parameters slave 9
7 Parameters slave 10 Parameters slave 11
8 Parameters slave 12 Parameters slave 13
9 Parameters slave 14 Parameters slave 15
10 Parameters slave 16 Parameters slave 17
11 Parameters slave 18 Parameters slave 19
12 Parameters slave 20 Parameters slave 21
13 Parameters slave 22 Parameters slave 23
14 Parameters slave 24 Parameters slave 25
15 Parameters slave 26 Parameters slave 27
16 Parameters slave 28 Parameters slave 29
17 Parameters slave 30 Parameters slave 31
18 irrelevant Parameters slave 1B
19 Parameters slave 2B Parameters slave 3B
20 Parameters slave 4B Parameters slave 5B
21 Parameters slave 6B Parameters slave 7B
22 Parameters slave 8B Parameters slave 9B
23 Parameters slave 10B Parameters slave 11B
24 Parameters slave 12B Parameters slave 13B
25 Parameters slave 14B Parameters slave 15B
26 Parameters slave 16B Parameters slave 17B
27 Parameters slave 18B Parameters slave 19B
28 Parameters slave 20B Parameters slave 21B
29 Parameters slave 22B Parameters slave 23B
30 Parameters slave 24B Parameters slave 25B
31 Parameters slave 26B Parameters slave 27B
32 Parameters slave 28B Parameters slave 29B
33 Parameters slave 30B Parameters slave 31B
5.2.20 Read_Extended_Parameter_Echo_List
Meaning
The read parameter echo list call outputs the echo values of all AS-i slaves. The
echo values of an AS-i slave originate from the last parameter call sent to this AS-i
slave.
Byte Meaning
0 Command number: 33h
1 00h
Byte Meaning
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
1 irrelevant Par echo slave 1
2 Par echo slave 2 Par echo slave 3
3 Par echo slave 4 Par echo slave 5
4 Par echo slave 6 Parameters slave 7
6 Par echo slave 8 Par echo slave 9
5 Par echo slave 10 Par echo slave 11
6 Par echo slave 12 Par echo slave 13
7 Par echo slave 14 Par echo slave 15
8 Par echo slave 16 Par echo slave 17
9 Par echo slave 18 Par echo slave 19
10 Par echo slave 20 Par echo slave 21
11 Par echo slave 22 Par echo slave 23
12 Par echo slave 24 Par echo slave 25
13 Par echo slave 26 Par echo slave 27
14 Par echo slave 28 Par echo slave 29
15 Par echo slave 30 Par echo slave 31
16 irrelevant Par echo slave 1B
17 Par echo slave 2B Par echo slave 3B
18 Par echo slave 4B Par echo slave 5B
19 Par echo slave 6B Parameters slave 7B
20 Par echo slave 8B Par echo slave 9B
21 Par echo slave 10B Par echo slave 11B
22 Par echo slave 12B Par echo slave 13B
23 Par echo slave 14B Par echo slave 15B
24 Par echo slave 16B Par echo slave 17B
25 Par echo slave 18B Par echo slave 19B
26 Par echo slave 20B Par echo slave 21B
27 Par echo slave 22B Par echo slave 23B
28 Par echo slave 24B Par echo slave 25B
29 Par echo slave 26B Par echo slave 27B
30 Par echo slave 28B Par echo slave 29B
31 Par echo slave 30B Par echo slave 31B
5.2.21 Read_Write_CTT2_request
Meaning
Using this call, a CTT2 request according to AS-i slave profile
“CombinedTranslationType2” can be sent to the AS-i master as a byte string. This
forwards the string bytes to the AS-i slave address specified in the send buf fer.
With this call, a send buffer with a maximum of 223 bytes is transferred to the AS-i
master. The actual number of string bytes to be sent to the AS-i slave is calculated
by the AS-i master from byte 2 of the send buf fer (number of string bytes).
The CTT2 request is replied to by the addressed AS-i slave with a CTT2 response.
The AS-i master transfers this response as a byte string in the response buf fer.
The strings are transferred by the AS−i master with the response.
The structure of the CTT2 request or CTT2 response (code, index, ...) always
begins with string byte 1. For more detailed information, refer to the relevant AS-i
slave description.
As long as strings are being transferred on AS-i, there is no cyclic data transfer
with the addresses AS-i slave.
Due to the type of protocol, the transfer of approximately 200 bytes can take up to
half a minute.
Byte Meaning
0 Command number: 44 H
1 Slave address
2 Number of string bytes
3 String byte 1
4 String byte 2
... ...
... String byte (n−1)
... (String byte n)
Byte Meaning
0 Number of string bytes
1 String byte (1)
2 String byte (2)
... .....
String byte (n-1)
... String byte (n)
5.2.22 Read_Version_ID
Meaning
This call reads out the version ID of the firmware of the AS-i master .
Byte Meaning
0 Command number: 14H
The response of the AS-i master contains the name and the firmware version
number.
Byte Meaning
0...31 Version string
5.2.23 Read_AS-i_Slave_ID
Meaning
With this call, the ID code of an AS-i 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.
Byte Meaning
0 Command number: 17H
1 Slave address
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 reserved ID code
5.2.24 Read_AS-i_Slave_Extended_ID1
Meaning
With this call, the extended ID1 code of an AS-i 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.
Byte Meaning
0 Command number: 37H
1 Slave address
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 reserved Extended ID1 code
5.2.25 Write_AS-i_Slave_Extended_ID1
Meaning
With this call, the extended ID1 code of an AS-i slave with address “0” can be
written directly over the AS-i cable. The call is intended for diagnostic purposes
and is not required in the normal master mode.
The AS-i master passes on the extended ID1 code to the AS-i slave without any
plausibility check.
Byte Meaning
0 Command number: 3FH
1 irrelevant Extended ID1 code
5.2.26 Read_AS-i_Slave_Extended_ID2
Meaning
With this call, the extended ID2 code of an AS-i 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.
Byte Meaning
0 Command number: 38H
1 Slave address
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 reserved Extended ID2 code
5.2.27 Read_AS-i_Slave_I/O
Meaning
With this call, the I/O configuration of an AS-i 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.
Byte Meaning
0 Command number: 18
1 Slave address
Byte Meaning
Bit 7 Bit 4 Bit 3 Bit 0
0 reserved I/O configuration
5.2.28 Get_LPF
Meaning
With this call, the list of peripheral faults (LPF) signaled by the AS-i slaves is read
out from the AS-i master. The LPF is updated cyclically by the AS-i master.
Whether and when as AS-i slave signals faults of the attached peripherals (for
example wire break) can be found in the description of the AS-i slave.
Byte Meaning
0 Command number 3E H
Byte Meaning
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 Slave 0 Slave 1 Slave 2 Slave 3 Slave 4 Slave 5 Slave 6 Slave 7
1 Slave 8 Slave 9 Slave 10 Slave 11 Slave 12 Slave 13 Slave 14 Slave 15
2 Slave 16 Slave 17 Slave 18 Slave 19 Slave 20 Slave 21 Slave 22 Slave 23
3 Slave 24 Slave 25 Slave 26 Slave 27 Slave 28 Slave 29 Slave 30 Slave 31
4 Slave 0B Slave 1B Slave 2B Slave 3B Slave 4B Slave 5B Slave 6B Slave 7B
5 Slave 8B Slave 9B Slave 10B Slave 11B Slave 12B Slave 13B Slave 14B Slave 15B
6 Slave 16B Slave 17B Slave 18B Slave 19B Slave 20B Slave 21B Slave 22B Slave 23B
7 Slave 2B4 Slave 25B Slave 26B Slave 27B Slave 28B Slave 29B Slave 30B Slave 31B
8 reserved
... reserved
13 reserved
For the LPF data, the bit values have the following meaning:
Bit=0: Slave signals no peripheral fault
Bit=1: Slave signals peripheral fault.
5.2.29 Write_AS-i_Slave_Parameter_String
Meaning
With this call, a parameter string complying with AS-i slave profile 7.4 can be sent
to the AS-i master that passes on the string to the AS-i slave address specified in
the send buffer.
With this call, a send buffer with a maximum of 223 bytes is transferred to the AS-i
master. The actual number of parameter bytes to be sent to the AS-i slave is
calculated by the AS-i master from byte 2 of the send buf fer (number of parameter
bytes).
The remaining information in the string is not evaluated by the AS-i master and is
passed on to the AS-i slave transparently. As long as the string transfer is active,
there is no user/analog data exchange with the addressed AS-i slave.
Byte Meaning
0 Command number: 40 H
1 Slave address
2 Number of parameter bytes
3 String byte (1)
4 String byte (2)
... .....
String byte (n-1)
... String byte (n)
5.2.30 Read_AS-i_Slave_Parameter_String
Meaning
With this call, a parameter string complying with AS-i slave profile 7.4 can be read
from the AS-i slave with the AS-i slave address specified in the send buffer.
The AS-i master supplies up to 221 bytes of response data. The number of
parameter bytes actually sent by the AS-i slave is signaled by the AS-I master in
byte 0 of the receive buffer (number of parameter bytes).
If the AS-i slave sends a string longer than 220 bytes, the AS-i master aborts the
string transfer and terminates the job with an error. The received data are then not
made available to the user program.
As long as the string transfer is active, there is no user/analog data exchange with
the addressed AS-i slave.
Byte Meaning
0 Command number 41H
1 Slave address
Byte Meaning
0 Number of parameter bytes
1 String byte (1)
2 String byte (2)
... .....
String byte (n-1)
... String byte (n)
5.2.31 Read_AS-i_Slave_ID_String
Meaning
With this call, an identification string complying with the AS-i slave profile 7.4 can
be read from the AS-i slave with the AS-i slave address specified in the send
buffer. The AS-i master supplies up to 221 bytes of response data. The number of
ID bytes actually sent by the AS-i slave is signaled by the AS-i master in byte 0 of
the receive buffer (number of ID bytes).
If the AS-i slave sends a string longer than 220 bytes, the AS-i master aborts the
string transfer and terminates the job with an error. The received data are then not
made available to the user program.
As long as the string transfer is active, there is no user/analog data exchange with
the addressed AS-i slave.
Note
As an exception, with this call, the bytes contained in the bits “Follows” and “Valid”
are also transferred (see AS-i slave profile 7.4).
Byte Meaning
0 Command number 42H
1 Slave address
Byte Meaning
0 Number of ID bytes
1 String byte (1)
2 String byte (2)
... .....
... String byte (n-1)
... String byte (n)
5.2.32 Read_AS-i_Slave_Diagnostic_String
Meaning
With this call, a diagnostic string complying with AS-i slave profile 7.4 can be read
from the AS-i slave with the AS-i slave address specified in the send buffer. The
AS-i master supplies up to 221 bytes of response data. The number of diagnostic
bytes actually sent by the AS-i slave is signaled by the AS-i master in byte 0 of the
receive buffer (number of diagnostic bytes).
If the AS-i slave sends a string longer than 220 bytes, the AS-i master aborts the
string transfer and terminates the job with an error. The received data are then not
made available to the user program.
As long as the string transfer is active, there is no user/analog data exchange with
the addressed AS-i slave.
Byte Meaning
0 Command number 43H
1 Slave address
Byte Meaning
0 Number of diagnostic bytes
1 String byte (1)
2 String byte (2)
... .....
... String byte (n-1)
... String byte (n)
In the protected mode, the CP 343-2 signals a diagnostic interrupt whenever the
configuration on the AS-Interface is changed. Changes in the configuration might
be that voltage on the AS-Interface is too low (AS-i Power Fail) or that
configuration errors have been detected (missing, incorrect or existing but
unconfigured AS-i slaves).
6.1 Overview
If the CP 343-2 detects an external or internal fault/error (AS-i slave failures,
EEPROM error on the CP, ...) during operation, it signals this by triggering a
diagnostic interrupt on the S7 I/O bus.
The S7 CPU then interrupts the cyclic user program (OB1), enters the event as
“module fault” in the system diagnostic buffer and behaves as follows:
S If the user has not programmed a suitable interrupt OB (OB82), the PLC CPU
changes to the STOP mode!
S If the user has programmed OB 82, this is started by the PLC operating
system. The local data of OB 82 already provides the user with a certain
amount of diagnostic information. (Which module triggered the interrupt. What
type of error has occurred ...). The user program can obtain more detailed
information (which slave has failed? ...) by reading the diagnostic data record
DS 1 using the system functions SFC 51 (”RDSYSST”) or SFC 59 (”RD_REC”).
When OB82 has been executed, the PLC continues the cyclic program (OB1)
at the point at which it was interrupted.
Note
OB82 cannot be programmed on the CPU 312; in other words, if a diagnostic
interrupt occurs, the CPU changes to the STOP mode.
Note
CP-internal interrupt events are always events entering the state. After a
CP-internal interrupt event occurs, the group error bit remains = TRUE. This is
only reset again after a restart on the S7-300.
Byte Value/meaning
0−3 These four bytes contain DS 0 and correspond to the local data bytes 8
to 11 in OB82.
After the programming example, Section 6.7 contains an example of evaluating the
delta list.
Table 6-1
STL Explanation
OB82 local data:
OB82 Code:
This chapter contains information about special operating states of the CP 343-2. It
is intended to help you to deal with problems.
Note
Remember that “automatic address programming” is only possible when the CP
343-2 is in the protected mode and only one AS-i slave has failed.
Slaves with profile CTT5 (multiaddress slaves) do not support automatic address
programming.
The sections below explain how to replace failed AS-i slaves using the automatic
address programming function.
Table 7-1
Table A-1
Vendor SIEMENS AG
Product Name CP 343-2
Order Number 6GK7 343−2AH11−0XA0
Version V3.0
Master Profile M4
Date 03.03.2008
Symbol Meaning
X Function exists
How the AS-i cycle time depends on the number of connected slaves
The AS-i cycle time can be calculated using the following formula:
Note
If two 2 AS-i slaves with extended addressing mode occupy the same address (for
example, address 5A and address 5B), this slave pair is calculated as one 1 AS-i
slave in the above formula. The reason for this is that slave pairs with the same
address are addressed only in every second cycle. The cycle time in the formula
above is therefore doubled for such slaves.
/4/ SIMATIC S7
S7−300 Automation System
− CPU 31xC and 31x Installation: Operating Instructions (ID: 13008499)
− Module Data: Reference Manual (ID: 8859629)
Siemens AG
/5/ SIMATIC
− Distributed I/O Device ET 200M
Operating Instructions (ID: 1142798)
and
− ET 200M Signal Modules for Process Automation
Configuration Manual (ID: 7215812)
Siemens AG
Order numbers
The order numbers of the SIEMENS documentation listed above can be found in
the catalogs “SIMATIC NET Industrial Communication and Field Devices, Catalog
IK PI” and “SIMATIC Programmable Controllers SIMATIC S7 / M7 / C7 −
Components for Integrated Automation, Catalog ST70”.
You can order these catalogs and obtain additional information from your local
SIEMENS branch or distributor.
You will find many of the Siemens AG manuals on the Internet pages of Siemens
Customer Support for automation:
http://support.automation.siemens.com
Enter the ID of the manual in the search box. The ID is shown in parentheses in
the literature references.
You can locate manuals included in the online documentation of the STEP 7
installation on your PG/PC from the Start menu (Start > SIMA TIC >
Documentation).
You will find an overview of the SIMATIC documentation at:
http://www.automation.siemens.com/simatic/portal/html_76/techdoku.htm
Product name:
CP 343−2 Order no.: 6GK7 343−2AH01−0XA0
CP 343−2 P Order no.: 6GK7 343−2AH11−0XA0
Area of Application
The product meets the following requirements:
Emission Immunity
Industrial area EN 61000−6−4 : 2007 EN 61000−6−2 : 2005
If the product is used in a domestic area, it may interfere with other devices.
Installation Instructions
The product meets the requirements if you adhere to the installation instructions in
Chapter 2 and in /4/ and /5/ during installation and operation.
APF
AS-i Power Fail Flag or LED display that indicates that the power supply on the
AS-i cable is too low or has failed (for example failure of the AS-i power supply
unit).
AS
Automation system
AS-i (AS-Interface)
Actuator-sensor interface. A network system for the lowest field area of the
automation range. It is suitable for networking sensors and actuators with the
controllers (previously known as: SINEC S1).
AS-i master
The AS-i master is used to monitor and control the simplest binary actuators and
sensors via AS-i modules or AS-i slaves.
A distinction is made between a standard AS-i master and the extended AS-i
master.
AS-i module
For the AS-Interface, a module concept has been defined that allows the block-
like linking of AS-i slaves − sensors and actuators − via AS-i modules.
The following types of module exist:
The active AS-i module with an integrated AS-i chip; using this, up to four con-
ventional sensors and actuators can be connected.
The passive AS-i module; this functions as a distributor and provides a connec-
tion for up to four sensors and actuators with an integrated AS-i chip.
In keeping with the concept of the standard AS-i master and the extended AS-i
master, either AS-i chips with standard functions or with extended functions are
used in the AS-i slaves.
AS-i slave
All the nodes that can be addressed by an AS-i master are known as AS-i
slaves.
AS-i slaves are distinguished by their design (AS-i modules and sensors or
actuators with an integrated AS-i attachment) and their address range (AS-i
standard slaves and AS-i A/B slaves with the extended addressing mode).
APF
AS-i Power Fail Flag or LED display that indicates that the power supply on the
AS-i cable is too low or has failed (for example failure of the AS-i power supply
unit).
Protected mode
In protected mode, the AS−i master exchanges data only with the configured
AS−i slaves. ”Configured” means that the slave addresses stored on the AS−i
master and the configuration data match the values of the existing AS-i slaves.
LAS
List of activated slaves
LDS
List of detected slaves.
LPS
List of permanent slaves.
Nibble
A nibble is a unit of information consisting of four bits.
D S
Diagnostic data record, DS1, 108 Siemens slave, 32
Diagnostic interrupt processing, sequence, 105 Signal sequence of the formal parameters
Diagnostic OB, OB82, 106 ACT, DONE, ERROR and STATUS, 55
Download to project, 38 Slave address, general structure, 61
DP slave, configuring properties, 29 Slave addressing, example, 41
Slave configuration, 31
Slave Diagnostics, 104
E Slaves, detected/activated, display, 19
Slots, 24
Error coding, 56
permitted, 23, 26
Error displays, 112
Standard AS−i slave, 33
remedies, 112
U
Upload to PG, 38
User program, 55
Supplement to manual
AS-Interface Master
CP 343-2 / CP 343-2 P
for SIMATIC S7
Operating Manual
08/2010
A5E03006584020A-01
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.
CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.
NOTICE
indicates that an unintended result or situation can occur if the corresponding information is not taken into
account.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation for the specific task, in particular its warning notices and
safety instructions. Qualified personnel are those who, based on their training and experience, are capable of
identifying risks and avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be adhered to. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks of the Siemens AG. The remaining trademarks in this
publication may be trademarks whose use by third parties for their own purposes could violate the rights of the
owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.
Description
The AS-Interface cable transports communication signals as well as supply voltage for the
modules and sensors / actuators (depending on module type). The nominal supply voltage is
normally 30 V DC and is supplied by an AS-Interface power supply unit. This power supply
unit also contains the data decoupling circuit required to operate the system.
Following enhancement of the AS-Interface specification in 2010, it is now possible to use a
nominal supply voltage of 24 V DC, which means that standard power supply units can be
employed. In this case, the following requirements must be fulfilled:
● An external data decoupling module is connected between the power supply unit and
other bus components (master and slaves).
● All components are approved for a 24 V DC supply voltage.
In order to limit the voltage drop on the AS-Interface cable, the maximum permissible cable
length specified for a 24 V DC supply voltage is 50 m. The extension plug cannot be used to
extend the cable length.
The AS-Interface method of communication is identical for both 30 V and 24 V supply
voltages. The possible number of addresses and slaves on the AS-Interface network is
therefore unaffected by the supply voltage used. Communication signals must be decoupled
from the power supply. The data decoupling circuit required is integrated in standard AS-
Interface power supply units (30 V DC).
CAUTION
Using a standard 24 V DC or 30 V DC power supply unit
The AS-Interface system is designed to comply with protection class III (PELV) in
accordance with IEC 61140. For this reason, the standard 24 V DC or 30 V DC power
supply unit must also comply with these requirements!
When you use a standard 24 V DC or 30 V DC power supply unit, you must install a
data decoupling module between the power supply unit and AS-Interface network!
Modules
● CP 343−2 (6GK7 343-2AH01-0XA0) and
● CP 343−2 P (6GK7 343-2AH11-0XA0)
with product version 02 or higher have been approved for operation with 24 V DC and
30 V DC.
NOTICE
Voltage lower than 22.5 V on the AS-Interface
If the voltage on the AS-Interface is less than 22.5 V (+/-1 V),
the CP 343−2 / CP 343−2 P generates the message "AS-i POWER FAIL" (APF) when
voltage monitoring is activated (setting in delivery state) and
halts operation of the AS-Interface network.
The slaves connected to the AS-Interface network shut down automatically in response to
undervoltage.
In order to ensure fault-free operation under these conditions, voltage monitoring must be
deactivated!
Step Meaning
1: Install the CP as described in Section 2.2.
2: Switch the power supply to the SIMATIC station off and The CP performs a self-test when it powers up. All the LEDs
then on again. on the CP light up while it is powering up. Then the LEDs go
out.
3: Check the status of the voltage monitoring by reading the There are two different cases:
LED display. Voltage monitoring is activated (setting in delivery state):
The LEDs immediately indicate the operating state
described in Section 1.5
Voltage monitoring is deactivated (for AS-i Power24V
operation): The two LEDs "APF" and "0" flash for about
2 s, the LEDs then display the operating state described
in Section 1.5.
Deactivating the voltage monitoring (only on 6GK7 343-2AH01-0XA0 and 6GK7 343-2AH11-0XA0,
product version 02):
Step Meaning
1: Install the CP as described in Section 2.2.
2: Switch the power supply to the SIMATIC station off and The CP performs a self-test when it powers up. All the LEDs
then on again. on the CP light up while it is powering up. Then the LEDs go
out.
3: Check the status of the voltage monitoring by reading the There are two different cases:
LED display. Voltage monitoring is activated (setting in delivery state):
The LEDs immediately indicate the operating state
described in Section 1.5
Voltage monitoring is deactivated (for AS-i Power24V
operation): The two LEDs "APF" and "0" flash for about
2 s, the LEDs then display the operating state described
in Section 1.5.
4: Press and hold down the "SET" button (for at least 5 s) Pushbutton actuation detected. The device is in setting
until the LED "APF" flashes. mode.
Note:
This action is only possible within 30 s of switching on the
SIMATIC station.
5: Release the "SET" button. The LED "APF" flashes.
Voltage monitoring status display:
LED "1" lights up: Voltage monitoring is activated
(setting in delivery state)
LED "0" lights up: Voltage monitoring is deactivated
(AS-i Power24V operation).
6: Press the "SET" button briefly (several times if The LED "APF" flashes.
necessary). Voltage monitoring switchover:
LED "1" lights up: Voltage monitoring is activated
LED "0" lights up: Voltage monitoring is deactivated.
7: Press and hold down the "SET" button (for at least 5 s) The setting of the voltage monitoring has been stored in
until the LED "APF" goes out. non-volatile memory in the CP.
Observe the information in the safety notices underneath
this table.
8: Transition to normal operation Meaning of the displays and operator controls: Analogous to
Section 1.5.
Deactivating the voltage monitoring
NOTICE
Note on step 2: Termination of power-up by pressing the "SET" button:
While the CP is powering up, do not press the "SET" button, if you press the "SET" button
the CP will switch to a special internal state: An LED running light display is activated (LED
"SF" - "PWR" - "APF" - "CER" - "AUP" - "CM"). The CP cannot operate normally in this
special state.
To cancel this special state, the power supply to the SIMATIC station must be switched off.
NOTICE
Note on step 7 (storing the setting):
If you want to cancel the setting of the voltage monitoring without saving it, you must switch
off the power supply to the SIMATIC station instead of performing step 7.
The CP will be ready to run (normal operation) immediately after powering up.
NOTICE
Note on steps 4 to 8:
Perform steps 4 to 8 only if you want to change the current setting of the voltage
monitoring.
CAUTION
If the receive buffer of the FC ASI_3422 is too short, any bordering memory areas are
overwritten. The length specification in the ANY pointer of the parameter RECV when
calling the FC ASI_3422 is irrelevant. The required length of the receive buffer can be found
in the description of the command. The supplements listed below must be observed.
Supplement:
The receive buffer must have a length of 221 bytes (byte 0 to 220).
The highest bytes 172 to 220 are reserved and may be overwritten by the AS-i master with
zero values.
Supplement:
The receive buffer must have a length of 221 bytes (byte 0 to 220).
The number of bytes actually transferred by the AS-i slave depends on the CTT2 response.
The additional bytes contained in the receive buffer may be overwritten by the AS-i master
with zero values.
Supplement:
The receive buffer must have a length of 221 bytes (byte 0 to 220).
The number of bytes actually transferred by the AS-i slave depends on the slave. The
additional bytes contained in the receive buffer may be overwritten by the AS-i master with
zero values.
Supplement:
The receive buffer must have a length of 221 bytes (byte 0 to 220).
The number of bytes actually transferred by the AS-i slave depends on the slave. The
additional bytes contained in the receive buffer may be overwritten by the AS-i master with
zero values.
Supplement:
The receive buffer must have a length of 221 bytes (byte 0 to 220).
The number of bytes actually transferred by the AS-i slave depends on the slave. The
additional bytes contained in the receive buffer may be overwritten by the AS-i master with
zero values.
7.1.1 Automatic address programming after failure of one or more AS-i slaves (CP with
firmware version V3.1 or higher)
Note
Automatic address programming:
You can use the automatic address programming function only if the CP is operating in
"protected mode" and one or more AS-i slaves have failed.
If several AS-i slaves have failed, the defective slaves must be uniquely identified in the
configuration by their slave profile (I/O configuration, ID code, ID2 code) and ID1 code. The
automatic address programming function does not work if two identical slaves have failed.
The automatic address programming function also supports slaves with the "CTT5" profile
(multi-address slaves) and AS-i devices which contain multiple internal slave addresses. A
precondition for support is that each internal slave is uniquely identified (I/O configuration,
ID code, ID2 code, ID1 code).
Examples of devices with multiple internal slave addresses which support automatic address
programming:
● K60 module with 8DI/2DO (3RK2400-1HQ00-0AA3)
● M200D motor starter AS-i standard (3RK1325- ...).
If no address has yet been assigned to these devices (setting in delivery state), only one
zero address is visible on the bus. The device automatically suppresses the other internal
zero addresses.
Note
Exceptions
Automatic address programming does not work on the following devices as the internal
slaves all have identical identifiers (I/O configuration, ID code, ID2 code, ID1 code).
K60 module with 8 DI (3RK1200-0DQ00-0AA3, 3RK2200-0DQ00-0AA3,
3RK2200-1DQ00-1AA3)
K45 safety-oriented module with 4 F-DI (3RK1205-0CQ00-0AA3).
Note
Replacement of a defective AS-i slave:
Only one address "zero" may be configured on the bus at any one time. If you want to
replace several slaves or devices, you must replace them one after the other (with
AS-i master switched on).
For the new slave or device, the CP 343-2 programs the address or addresses of the original
node which has been replaced.
The LEDs "AUP" and "CER" go out once all slaves have been correctly replaced. The newly
added slave is signaled by illumination of the relevant LED.
7.1.2 Automatic address programming after failure of an AS-i slave (CP with firmware
version V3.0 or lower)
Replacement
The "Automatic address programming" function makes it particularly easy for you to
replace defective AS-i slaves.
Note
Automatic address programming:
You can use the automatic address programming function only if the CP 343-2 is operating
in "protected mode" and only one AS-i slave has failed.
Slaves with the "CTT5" profile (multi-address slaves) do not support automatic address
programming.
SIMATIC NET
CP 343-2 / CP 343-2 P
AS‑Interface Master
Manual (Supplement)
01/2023
C79000-G8976-C149-04
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
indicates that minor personal injury can result if proper precautions are not taken.
NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.
8 Approvals ............................................................................................................................................... 5
8.1 Ex certificates ...................................................................................................................... 5
8.1 Ex certificates
ATEX
DEKRA 20ATEX0042 X
II 3 G Ex ec IIC T4 Gc or
II 3 G Ex ec nC IIC T4 Gc
UKEX
DEKRA 21UKEX0213 X
II 3 G Ex ec IIC T4 Gc or
II 3 G Ex ec nC IIC T4 Gc
Importer UK
Siemens plc
Sir William Siemens House
Princess Road
Manchester
M20 2UR
United Kingdom
IECEx
IEC 60079-0 : 2017 (Ed.7) IEC 60079-7 : 2015 (Ed.5.1) IEC 60079-15 : 2017 (Ed. 5)
CCC-Ex
The product has been tested and certified according to CNCA-C23-01 : 2019
China Compulsory Certification
Implementation Rules - Explosion-proof Electrical Products
FM
For more information, see (https://support.industry.siemens.com/cs/us/en/view/109750842)