SIMATIC SIMATIC SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
SIMATIC
Preface
_____________
Requirements
_____________
Introduction
_____________
1
2
3
SM331; AI 8x12 Bit Getting Started
part 1: 4 -20mA
Getting Started
Mechanical setup of the
example station
_____________
Electrical connection
_____________
Configuration of the
SIMATIC Manager
_____________
Testing the user program
_____________
Diagnostic interrupt
_____________
Hardware interrupt
_____________
Appendix
_____________
4
5
6
7
8
9
A
11/2006
A5E00253410-02
Safety Guidelines
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 device/system may only be set up and used in conjunction with this documentation. Commissioning and
operation of a device/system may only be performed by qualified personnel. Within the context of the safety notes
in this documentation qualified persons are defined as persons who are authorized to commission, ground and
label devices, systems and circuits in accordance with established safety practices and standards.
Prescribed Usage
Note the following:
Warning
This device 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. Correct, reliable operation of the product requires proper transport, storage, positioning and assembly
as well as careful operation and maintenance.
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.
Siemens AG
Automation and Drives
Postfach 48 48
90437 NÜRNBERG
GERMANY
3.1 Example of an application.......................................................................................................... 3-1
4 Mechanical setup of the example station................................................................................................ 4-1
4.1 Mounting the example station.................................................................................................... 4-1
4.2 Mounting of analog module components................................................................................... 4-3
4.2.1 General ...................................................................................................................................... 4-3
4.2.2 Components of the SM331 ........................................................................................................ 4-4
4.2.3 Features of the analog modules ................................................................................................ 4-5
4.2.4 Measuring range modules ......................................................................................................... 4-6
4.2.5 Mounting the SM331 module..................................................................................................... 4-8
5.3.2 Current transducer wiring - principle.......................................................................................... 5-4
5.3.3 Wiring of the analog module ...................................................................................................... 5-5
5.3.4 Test ............................................................................................................................................ 5-8
6 Configuration of the SIMATIC Manager.................................................................................................. 6-1
6.1 Creating a new STEP7 project................................................................................................... 6-1
6.1.1 Creating a new project ............................................................................................................... 6-1
6.1.2 CPU selection ............................................................................................................................ 6-3
6.1.3 Defining the basic user program................................................................................................ 6-4
6.1.4 Assigning the project name........................................................................................................ 6-5
6.1.5 Result S7 project is created ....................................................................................................... 6-6
6.2.3 Configuring the analog module................................................................................................ 6-10
6.2.4 Test .......................................................................................................................................... 6-13
6.3 STEP 7 user program .............................................................................................................. 6-17
6.3.1 Tasks of the user program ....................................................................................................... 6-17
6.3.2 Creating a user program.......................................................................................................... 6-18
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
iii
Table of contents
7 Testing the user program........................................................................................................................ 7-1
7.1 Downloading system data and user program ............................................................................ 7-1
7.2 Visualization of the sensor values.............................................................................................. 7-3
7.3 Analog value representation ...................................................................................................... 7-8
A Appendix.................................................................................................................................................A-1
A.1 Source of the user program .......................................................................................................A-1
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
ivGetting Started, 11/2006, A5E00253410-02
Preface
1.1 General
Purpose of the Getting Started
The Getting Started gives you a complete overview of the commissioning of the analog
module SM331. It assists you in the installation and configuration of the hardware of a 420mA sensor and the configuration with SIMATIC S7 Manager.
The intended readership of Getting Started is a novice with only basic experience in
configuration, commissioning and servicing of automation systems.
What to expect
The procedures, from mounting the module to storing analog values in the STEP7 user
program, are explained step-by-step and in detail based on an example. In the following
sections you will be introduced to:
● Problem analysis
● Mechanical setup of the example station
1
● Electrical connection of the example station
● Configure hardware with SIMATIC Manager
● Creating a small user program with STEP7 which stores the read analog values in a data
block
● Triggering and interpreting diagnostic and hardware interrupts
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
1-1
Preface
1.1 General
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
1-2Getting Started, 11/2006, A5E00253410-02
Requirements
2.1 Basics
Basic Knowledge Required
No special knowledge of the field of automation technology is required in order to understand
the Getting Started guide. As the configuration of the analog module is done with the
software STEP7, proficiency in STEP7 would be advantageous.
Further information on STEP7 can be found in the electronic manuals that are supplied with
STEP7.
You will also need to know how to use computers or PC-like equipment (such as
programming devices) under Windows 95/98/2000/NT or XP.
Required hardware and software
The scope of delivery of the analog module consists of 2 parts:
● The module itself
● A front connector, which enables you to conveniently connect the power supply and the
data cables.
2
Analog module components
Quantity Article Order number
1 SM 331, Electrically ISOLATED 8 AI, ALARM DIAGNOSTICS 6ES7331-7KF02-0AB0
1 20-pin FRONT CONNECTOR with spring contacts 6ES7392-1BJ00-0AA0
The general SIMATIC components required for the example are as follows:
SIMATIC components of the example station
Quantity Article Order number
1 PS 307 Power Supply AC 120/230V, DC 24V, 5A 6ES7307-1EA00-0AA0
1 CPU 315-2 DP 6ES7315-2AG10-0AB0
1 MICRO MEMORY CARD, NFLASH, 4 MB 6ES7953-8LM00-0AA0
1 SIMATIC S7-300, RAIL L=530MM 6ES7390-1AF30-0AA0
1 Programming device (PD) with MPI interface and MPI cable
PC with corresponding interface card
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
depending on the
configuration
2-1
Requirements
2.1 Basics
Software STEP7
Quantity Article Order number
1 STEP7 Software version 5.2 or later, installed on the
programming device.
6ES7810-4CC06-0YX0
The following current transducers can be used for the acquisition of analog signals:
Current transducers
Quantity Article Order number
1 2-Wire current transducer depending on the
manufacturer
1 4-Wire current transducer depending on the
manufacturer
Note
This "Getting Started" describes only the application of 4 – 20 mA current transducers in the
2-Wire or 4-Wire model. If you wish to use other transducers, you will need to wire and
configure the SM331 differently.
General tools and materials:
Quantity Article Order number
various M6-bolts and nuts (Length depending on the mounting position) commonly available
1 Screwdriver with 3,5 mm blade commonly available
1 Screwdriver with 4.5 mm blade commonly available
1 Side cutters and wire stripping tools commonly available
1 Tool for crimping wire-end ferrules commonly available
X m Cable for grounding the mounting rail with 10 mm2 cross-
section, ring terminal with 6.5 mm hole, length appropriate for
local requirements.
X m Flexible wire with 1mm2 diameter with fitting wire end sleeves,
form A in 3 different colors – blue, red and green
X m 3-wire power cord (AC 230/120V) with protective contact
socket, length according to local conditions.
1 Calibration device (measuring instrument for commissioning,
that can measure and supply current)
commonly available
commonly available
commonly available
depends on the
manufacturer
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
2-2Getting Started, 11/2006, A5E00253410-02
Introduction
3.1 Example of an application
Overview
You want to connect three analog inputs to your station. One of them should have a 2-wire
current transducer and the other two should share a 4-wire current transducer.
You need failure diagnostic capabilities and want two sensors to be able to trigger hardware
interrupts.
You have the analog input module SM331, AI8x12 Bit (order number 6ES7 331-7KF020AB0) available. The module is diagnostic and hardware interrupt capable and can process
up to 8 analog inputs. The module is diagnostic and hardware interrupt capable and can
process up to 8 analog inputs (e.g. 4- 20 mA; PT 100; thermocouple).
6\VWHPH[DPSOH
36
&38 60
7ZR ZL U H
&XUUHQWWUDQVGXFHUV
3
(QFRGHU
9$&+]
RU
9$&+]
03,FDEOH
3URJUDPPLQJGHYLFH
Figure 3-1 Sample station components
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
9'&
)RXUZLUH
&XUUHQWWUDQVGXFHUV
(QFRGHU
(QFRGHU
&DOLEUDWLRQ
GHYLFH
3-1
Introduction
3.1 Example of an application
In the following sections you will be introduced to:
● Mechanical setup of the example station
– General mounting instructions for S7-300 modules
– Configuration of the SM331 for the two selected measurement transducer types
● Electrical connection of the example station
– Wiring the power supply module and the CPU
– Wiring of the analog module
– Standard pin assignment of two measurement transducer types
– Wiring of unused inputs
● Configuring the SIMATIC Manager
– Using the project wizard
– Completing the automatically generated hardware configuration
– Integrating the supplied user program source
● User program testing
– Interpreting the read values
– Converting the measured values into readable analog values
● Utilizing the diagnostic capabilities of the SM331 module
– Triggering a diagnostic interrupt
– Evaluating the diagnostics:
● Application of hardware interrupts
– Configuration of hardware interrupts
– Configuration and analysis of hardware interrupts
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
3-2Getting Started, 11/2006, A5E00253410-02
Mechanical setup of the example station
4.1 Mounting the example station
Overview
The setup of the example station is divided into two steps. First, the setup of the power
supply and the CPU is explained. After becoming acquainted with the analog module
SM331, the mounting of it is described.
Requirements
Before you can use the analog input module SM331, you need a basic setup of general
SIMATIC S7-300 components.
The order of the mounting takes place from left to right:
● Power supply PS307
● CPU 315-2DP
● SM331
4
Instructions (without SM331)
step Graphic controller Description
1 Screw on the mounting rail (screw size: M6) so that at
2
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
least 40 mm space remains above and below the rail.
When mounting it on a grounded steel panel or on a
grounded device mounting panel made of steel sheet,
make sure you have a low impedance connection
between the mounting rail and the mounting surface.
Connect the mounting rail with the protective conductor.
An M6 protective conductor screw is provided on the
mounting rail for this purpose.
4-1
Mechanical setup of the example station
4.1 Mounting the example station
step Graphic controller Description
3
4
Mounting the power supply:
• Hang the power supply on to the top end of the rail
• Screw it tight to the rail underneath
Connect the bus connector (delivered with the SM331) to
the left connector on the back of the CPU
5
Mounting the CPU:
• Hang the CPU on to the top end of the rail
• Push it all the way left to the power supply
• Push it down
• Screw it tight to the rail underneath
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
4-2Getting Started, 11/2006, A5E00253410-02
Mechanical setup of the example station
4.2 Mounting of analog module components
4.2 Mounting of analog module components
4.2.1 General
Overview
Before the actual mounting of the SM331 the module has to be completed with a front
connector and the desired measurement mode of the inputs is set.
In this section, you will learn about:
● The components you need
● The properties of the analog input module
● What a measuring range module is and how it is configured
● Mounting a configured module
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
4-3
Mechanical setup of the example station
4.2 Mounting of analog module components
4.2.2 Components of the SM331
Overview
A functional analog module consists of the following components:
● Module SM331 (in our example 6ES7331-7KF02-0AB0)
● 20-pin front connector There are two different types of front connectors:
– With spring contacts (order number 6ES7392-1BJ00-0AA0)
– With screw contacts (order number 6ES7392-1AJ00-0AA0)
Figure 4-1 Components of the SM331
The scope of delivery of SM331
Components
Module
Labeling strips
Bus connectors
2 cable ties (not in the picture) to tie the external wiring
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
4-4Getting Started, 11/2006, A5E00253410-02
Mechanical setup of the example station
4.2 Mounting of analog module components
4.2.3 Features of the analog modules
Characteristics
● 8 inputs in 4 channel groups (each group with two inputs of same type)
● Measurement resolution adjustable for each channel group
● User defined measuring mode per channel group:
– Voltage
– Current
– Resistance
– Temperature
● Programmable diagnostic interrupt
● Two channels with limit alarms (only channel 0 and channel 2 are configurable)
● Electrically isolated against backplane bus
● Electrically isolated against load voltage (exception: at least one module is set to position
D)
The module is a universal analog module designed for the most commonly used
applications.
The desired measuring mode should be set up directly on the module with the measuring
range modules.
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
4-5
Mechanical setup of the example station
4.2 Mounting of analog module components
4.2.4 Measuring range modules
Terminal
The module SM331 has 4 measuring range modules (one per channel group). The
measuring range modules can be set to 4 different positions (A, B, C or D).
Figure 4-2 4 measuring range modules with default setting B (Voltage)
&KDQQHOJURXS
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
4-6Getting Started, 11/2006, A5E00253410-02
Mechanical setup of the example station
4.2 Mounting of analog module components
Positions of the measuring range modules
The position enables you to specify the transducer to be connected to the respective channel
group.
Position Type of measurement
A Thermocouple / resistance measurement
B Voltage (factory setting)
C Current (4-wire transducer)
D Current (2-wire transducer)
In our example, a sensor with a 4 to 20mA 2-wire transducer is connected to channel group
1 at input 0.
A 4-wire transducer is connected to channel group 2 at inputs 2 and 3.
Therefore, the first measuring range module should have position D and the second should
have position C.
Positioning of the measuring range modules
step Graphic controller Description
1
With a screwdriver, pull out the
two measuring range modules
2
3
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
Turn the measuring range module
to the desired position:
Plug the measuring range module
back into the module
In our example, the module
should have the following
positions:
CH0,1: D
CH2,3: C
4-7
Mechanical setup of the example station
4.2 Mounting of analog module components
Note
When you use a 2-wire transducer, the electrical isolation against the load voltage is lost for
all the channels in the module (at least one measuring range module is set to position D)
4.2.5 Mounting the SM331 module
Proceed as follows
After you have prepared the analog module accordingly, mount it to the rail as well.
step Graphic controller Description
1
Mounting the SM331:
• Hang the SM311 to the top end of
the rail
• Push it all the way to the left up to
the CPU
• Push it down
• Screw it tight to the rail underneath
2
The example station is now mechanically mounted.
Mounting the front connector:
• Press the upper release button of
the front terminal block
• Insert the front connector into the
module until it snaps in
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
4-8Getting Started, 11/2006, A5E00253410-02
Electrical connection
5.1 Overview
Overview
This chapter shows you how the various parts of the example station are electrically wired
from the power supply to the analog module.
Warning
You might get an electrical shock if the power supply PS307 is turned on or the power cord
is connected to the line.
Always switch off power before you start wiring the S7-300.
5
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
5-1
Electrical connection
5.2 Wiring the power supply module and the CPU
5.2 Wiring the power supply module and the CPU
Overview
Figure 5-1 Wiring the power supply module and the CPU
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
5-2Getting Started, 11/2006, A5E00253410-02
Electrical connection
5.2 Wiring the power supply module and the CPU
The example station requires a power supply. The wiring is done as follows:
Step Graphic controller Description
1 Open the front panel covers of the power supply module
and CPU.
2 Unscrew the cable grip on the power supply
3 Remove the insulation from the power cord, attach the cable
end sleeves (for stranded conductors) and connect it to the
power supply
4 Screw down the clamp of the cable grip.
5 Insert two connecting cables between the power supply and
the CPU and tighten them
6 Verify that the setting of the selector switch matches your
mains voltage.
The default line voltage setting for the power supply module
is 230 VAC. To change this setting, proceed as follows:
Remove the protective cap with a screwdriver, set the
selector switch to match your line voltage, then insert the
protective cap again.
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
5-3
Electrical connection
5.3 Wiring of the analog module
5.3 Wiring of the analog module
5.3.1 Requirement
General
The wiring of an analog measurement transducer is depends on its type and not on the
SM331 module.
5.3.2 Current transducer wiring - principle
Options
Depending on the current transducer you use, you have to modify the wiring of the power
supply. We differentiate between the wiring of a 2-wire current transducer and a 4-wire
current transducer.
Wiring principles of a 2-wire current transducer
This transducer type is supplied with power from the analog input module.
6HQVRU
HJSUHVVXUHJDXJH
7ZR ZL U H
3
3
Figure 5-2 Wiring: 2-Wire current transducer
WUDQV
GXFHU
7ZR ZL U H
WUDQV
GXFHU
/
0
0
0
0
0
0DQD
$'&
/RJLF
%DFN
SDQH
EXV
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
5-4Getting Started, 11/2006, A5E00253410-02
Electrical connection
5.3 Wiring of the analog module
Wiring principles of a 4-wire current transducer
Unlike a 2-wire transducer, this transducer has its own power supply.
6HQVRU
HJSUHVVXUHJDXJH
/
0
)RXUZLUH
3
3
WUDQV
GXFHU
/0
Figure 5-3 Wiring: 4-Wire current transducer
5.3.3 Wiring of the analog module
Tasks
The wiring of the analog module consists of the following tasks:
● Connecting the power supply (red cable)
● Connecting the 2-wire current transducer (green cables)
0
0
0
0
0DQD
$'&
/RJLF
%DFN
SDQH
EXV
● Terminating unused channels with a resistor
● Connecting the 4-wire current transducer (green cables)
● Connecting the 4-wire current transducer (green cables)
● Connecting to ground and short-circuiting the other unused channels (blue wires)
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
5-5
Electrical connection
5.3 Wiring of the analog module
SM331 Front connector wiring
Figure 5-4 SM331 Front connector wiring
Notice
Possible destruction of the module!
If you connect a defective 4-wire current transducer to an input, which is configured for a 2-
wire transducer, the module may be destroyed!
The required wiring tasks are explained below step-by-step:
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
5-6Getting Started, 11/2006, A5E00253410-02
Loading...
+ 54 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.