You are on page 1of 22

 First Steps in Commissioning CPU Introduction 1

___________________
31xC: Positioning with analog output ___________________
Preparation 2

___________________
Learning units 3
SIMATIC
___________________
Further Information 4
S7-300
First Steps in Commissioning CPU 31xC:
Positioning with analog output

Getting Started

08/2011
A5E00105537-03
Legal information
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 relevant 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, 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.

Siemens AG A5E00105537-03 Copyright © Siemens AG 2011.


Industry Sector Ⓟ 09/2011 Technical data subject to change
Postfach 48 48
90026 NÜRNBERG
GERMANY
Table of contents

1 Introduction................................................................................................................................................ 5
2 Preparation ................................................................................................................................................ 7
3 Learning units .......................................................................................................................................... 11
3.1 1. Step: Wire the CPU..................................................................................................................11
3.2 2. Step: Installing the sample project...........................................................................................14
3.3 3. Step: Parameter assignment ...................................................................................................15
3.4 4. Step: Linking blocks to the user program ................................................................................17
3.5 5. Step: Trial run ..........................................................................................................................18
4 Further Information .................................................................................................................................. 21

First Steps in Commissioning CPU 31xC: Positioning with analog output


Getting Started, 08/2011, A5E00105537-03 3
Table of contents

First Steps in Commissioning CPU 31xC: Positioning with analog output


4 Getting Started, 08/2011, A5E00105537-03
Introduction 1
Contents of this Getting Started Manual
Based on a concrete example, this Getting Started manual takes you through five
commissioning steps to the point where you have a functioning traversing movement. You
will get to know certain basic hardware and software functions and will calculate and check
the application-dependent parameters in this sample.
This process will take one to two hours, depending on your experience.

First Steps in Commissioning CPU 31xC: Positioning with analog output


Getting Started, 08/2011, A5E00105537-03 5
Introduction

First Steps in Commissioning CPU 31xC: Positioning with analog output


6 Getting Started, 08/2011, A5E00105537-03
Preparation 2
Scope
These instructions apply to the following CPUs:

CPU SIMATIC Micro Memory Card As of firmware


required for operation? version
314C-2 DP yes V3.3
314C-2 PtP yes V3.3
314C-2 PN/DP yes V3.3

The order number can be found in the manuals, e.g. the operating instructions CPU 31xC
and CPU 31x: Installation (http://support.automation.siemens.com/WW/view/en/13008499).

First Steps in Commissioning CPU 31xC: Positioning with analog output


Getting Started, 08/2011, A5E00105537-03 7
Preparation

Requirements
The following requirements must be met:
● You have an S7 300 station consisting of a power supply module and a CPU 314C-2 DP,
314C-2 PtP or 314C-2 PN/DP.
● STEP 7 is correctly installed on your PG.
The table below shows the STEP 7 version you need for each CPU.

CPU STEP 7 version


314C-2 PtP STEP 7 as of V5.5 + SP1 or STEP 7 as of V5.3 + SP2 with HSP 204
314C-2 DP STEP 7 as of V5.5 + SP1 or STEP 7 as of V5.3 + SP2 with HSP 203
314C-2 PN/DP STEP 7 as of V5.5 with HSP 191

● You have downloaded the sample projects from the Internet or have the CD of sample
projects included with the Technological Functions operating instructions.
● You have set up a project for the S7-300 station.
● The PG is connected to the CPU.
● You have an external 24 V DC power supply, an encoder, a drive, and the necessary
accessories, such as a front connector and wiring material.
● You provided hardware limit switches and EMERGENCY-OFF switches for safe and
reliable operation of the system.
● The CPU is correctly connected to a power supply.

WARNING

Operation of an S7-300 as part of plants or systems is subject to special rules and


regulations, which depend on its field of application. Please make sure that you adhere
to the applicable safety and accident prevention regulations, for example IEC 204
(emergency stop systems).
You risk severe injury, or damage to machines and equipment if you ignore these
regulations.

First Steps in Commissioning CPU 31xC: Positioning with analog output


8 Getting Started, 08/2011, A5E00105537-03
Preparation

Layout of the example

1 2 3

7 6 5 4
① For setting the line voltage
② Mode selector
③ Mounting rail
④ Programming device with STEP 7 software
⑤ PG cable
⑥ Connecting cable
⑦ Clamp for strain relief

Figure 2-1 Overview of sample layout

First Steps in Commissioning CPU 31xC: Positioning with analog output


Getting Started, 08/2011, A5E00105537-03 9
Preparation

First Steps in Commissioning CPU 31xC: Positioning with analog output


10 Getting Started, 08/2011, A5E00105537-03
Learning units 3
3.1 1. Step: Wire the CPU

WARNING

Make sure that the PS 307 power supply module and the S7 300 are completely
disconnected before you start wiring.
You may come into contact with live wires if the PS 307 power supply module and S7 300
are connected to the power supply.

Procedure
1. Connect the wired front connectors to the CPU.
2. Fasten the front connector.
3. Connect the power supply of the inputs and outputs:
– 24 V to X2, pins 1 and 21
– Ground to X2, pins 20 and 30
4. Connect the incremental encoder to the 24 V power supply.
5. Connect the encoder signals (X2, pins 2 to 4).
; ;

,QFUHPHQWDOHQFRGHUV
   
6LJQDO$    
6LJQDO%    
6LJQDO1    
   
   
   
   
   
   

  
  
  
  
  
  
  
9   
0
  
/
  
0

6. Connect the power unit to the power supply.

First Steps in Commissioning CPU 31xC: Positioning with analog output


Getting Started, 08/2011, A5E00105537-03 11
Learning units
3.1 1. Step: Wire the CPU

7. Connect the signal lines of the power unit over shielded cables (X1, pin 16 or 17 and
pin 20 and X2, pins 28 and 30).
; ;

   
   
   
   
   
3RZHUXQLW    
   
&219B(1    
   
) *URXQG    
0
3RZHUVLJQDO
)   
0DQDORJ   
  
  
  
  
  
  
/   
/   
/

8. Strip the insulation from the shielded cables.


9. Clamp the cable shield into the shield connection element. using the shield terminal
elements.

First Steps in Commissioning CPU 31xC: Positioning with analog output


12 Getting Started, 08/2011, A5E00105537-03
Learning units
3.1 1. Step: Wire the CPU

Connector pin assignment


The pin assignments described below relate only to the connectors relevant for the
positioning type.

Table 3- 1 CONNECTOR X1

Pin Name/address Function


16 AO 0 (V) Voltage output, power unit
17 AO 0 (A) Current output, power unit
20 Mana Analog ground

Table 3- 2 CONNECTOR X2

Pin Name/address Function


1 1 L+ 24 V power supply of the inputs
2 DI + 0.0 Encoder signal A
3 DI + 0.1 Encoder signal B
4 DI + 0.2 Encoder signal N
5 DI + 0.3 Length measurement
6 DI + 0.4 Reference point switch
20 1M Ground
21 2 L+ 24 V power supply of the outputs
28 DO + 0.6 CONV_EN: Power unit enable
30 2M Ground

Reference
You will find information on the remaining connections in the documentation of the S7-300.

First Steps in Commissioning CPU 31xC: Positioning with analog output


Getting Started, 08/2011, A5E00105537-03 13
Learning units
3.2 2. Step: Installing the sample project

3.2 2. Step: Installing the sample project

Introduction
When installing the sample project, you have the following options:

Installing from CD
1. Take the CD out of the Technological Functions operating instructions.
2. Start the installation program on the CD by double-clicking on the SETUP.EXE file in the
SETUP folder.
The installation program is started.
3. Now follow the instructions in the installation program.

Installing from the Internet


1. Open the directory with the sample projects.
2. Start the installation program by double-clicking the SETUP.EXE file.
The installation program is started.
3. Now follow the instructions in the installation program.

First Steps in Commissioning CPU 31xC: Positioning with analog output


14 Getting Started, 08/2011, A5E00105537-03
Learning units
3.3 3. Step: Parameter assignment

3.3 3. Step: Parameter assignment

Procedure
1. Open your project in SIMATIC Manager.
A window, divided into two sections, opens showing the title of your project.
2. In your project, call the configuration table HW Config.

3. Double-click on the submodule "AI5/AO2".


The "Properties AI5/AO2" dialog opens.
4. Disable analog output 0 by left-clicking the "Output mode" field of the "Output " tab and
select "Disabled". Close the dialog with "OK".
Analog output 0 is enabled for controlling the motor power unit.
5. Double-click on the submodule "Positioning".
The "Positioning properties" dialog opens.
6. Select "Positioning with analog output". On the drive, axis and encoder tabs, customize
the properties according to your system.

First Steps in Commissioning CPU 31xC: Positioning with analog output


Getting Started, 08/2011, A5E00105537-03 15
Learning units
3.3 3. Step: Parameter assignment

7. Confirm your settings with "OK".


The "Positioning properties" dialog closes.

Note
The input and output address of the submodules "DI24/DO16", "AI5/02", "Counting" and
"Positioning" must be adapted for the example to function correctly.
Double-click the relevant line to adapt the submodule. A dialog opens. Select the
"Addresses" tab in each case. Deselect the "System default" checkboxes. Change the
addresses as follows:
• DI24/DO16: Inputs: 124..126, Outputs: 124..125
• AI5/AO2: Inputs: 752..761, Outputs: 752..755
• Counting: Inputs: 768..783, Outputs: 768..783
• Positioning: Inputs: 784..799, Outputs: 784..799
Confirm your settings with "OK".

8. Save your configuration to your project with "Station > Save and compile".
Your changes are now stored in your project.
9. When the CPU is in STOP, select "PLC > Download to module ..." to download the
configuration.
The data are now downloaded from the PG to the CPU.
10.Close HW Config with "Station > Close".
You have returned to SIMATIC Manager.

First Steps in Commissioning CPU 31xC: Positioning with analog output


16 Getting Started, 08/2011, A5E00105537-03
Learning units
3.4 4. Step: Linking blocks to the user program

3.4 4. Step: Linking blocks to the user program

Procedure
1. Open the project "ZDt26_03_TF_____31xC_Pos" in the catalog ...
\Siemens\STEP7\Examples via "File > Open ... > Sample projects" in SIMATIC Manager.
A window, divided into two sections, opens showing the title of the project.
2. Double-click on the S7 program "Analog 1 First Steps".
The "Sources", "Blocks" and "Symbols" folders are displayed in the right-hand window.
3. Double-click on the "Blocks" container.
All blocks of the S7 program are displayed.
4. Copy all blocks from this folder to your project under "SIMATIC 300 Station > CPU 3xx >
S7 Program > Blocks".

Chip Name (in the toolbar) Description


OB 1 CYCLE_EXC Cyclic program
OB 100* COMPLETE RESTART Complete restart: Reset the control signals
FC 1 GETST_A Example 1: ANALOG, first steps
SFB 44 ANALOG SFB ANALOG
DB 6 DI_ANALOG Instance DB for ANALOG
VAT_GETST_A VAT_GETST_A Variable table
* Note: Adjust the values for the speed, acceleration, deceleration, and switchover and shutdown
difference in the block COMPLETE RESTART (OB 100).

5. In SIMATIC Manager, select "SIMATIC 300 Station > CPU 3xx > S7 Program > Blocks".
All blocks of the S7 program are displayed.
6. Download all of the S7 blocks it contains via "PLC > Download to your CPU" (CPU in
STOP mode).
The program and configuration are downloaded from the PG to the CPU.

First Steps in Commissioning CPU 31xC: Positioning with analog output


Getting Started, 08/2011, A5E00105537-03 17
Learning units
3.5 5. Step: Trial run

3.5 5. Step: Trial run

Procedure
1. In the "Function blocks" directory, double-click on the variable table "VAT_GETST_A" in
your project.
The variable table for monitoring and modifying is displayed.
2. Go online with "PLC > Connect to > Configured CPU".
At the bottom right, you will see that the CPU is set to "STOP" mode.
3. Activate monitoring with "Variable > Monitor".
The current values of the addresses are displayed in the "Status Value" column.

CAUTION

The next two test steps start the drive.


You can stop the drive in one of the following ways:
• Set the control value for the direction to 0 again and activate it
• Set the control value for the drive enable to 0 again and activate it
• Change the CPU to STOP

4. Switch the CPU to RUN.


At the bottom right, you will see that the CPU is set to "RUN" mode.
5. Try out the two following experiments. With "Variable > Activate Modify Values", you can
make the control values valid.

"Jogging" mode
Make the following settings: You can monitor the following signal statuses in
the column "Status Value":
MODE_IN = 1: ST_ENBL = 1:
Select "Jogging" mode Start enable
DRV_EN = 1: MOD_OUT = 1:
drive enable Current mode "Jogging"
SPEED: WORKING = 1:
Speed in pulses/s Travel active
Starting the drive: ACT_POS:
DIR_P = 1: Jogging in plus direction Current actual position
DIR_M = 1: Jogging in minus direction
Remark: If both variables DIR_P and DIR_M are
activated, no positioning is possible.

First Steps in Commissioning CPU 31xC: Positioning with analog output


18 Getting Started, 08/2011, A5E00105537-03
Learning units
3.5 5. Step: Trial run

"Incremental approach, relative" mode


Make the following settings: You can monitor the following signal statuses in
the column "Status Value":
MODE_IN = 4: ST_ENBL = 1:
Select "Incremental approach, relative" mode Start enable
DRV_EN = 1: MOD_OUT = 4:
drive enable Current mode "Incremental approach, relative"
TARGET: WORKING = 1:
Distance in pulses Travel active
SPEED: ACT_POS:
Speed in pulses/s Current actual position
Start drive: POS_RCD = 1:
DIR_P = 1: Incremental approach, relative in plus Position reached
direction
DIR_M = 1: Incremental approach, relative in
minus direction

First Steps in Commissioning CPU 31xC: Positioning with analog output


Getting Started, 08/2011, A5E00105537-03 19
Learning units
3.5 5. Step: Trial run

First Steps in Commissioning CPU 31xC: Positioning with analog output


20 Getting Started, 08/2011, A5E00105537-03
Further Information 4
Diagnostics/Correction of Errors
Incorrect operator input, faulty wiring or inconsistent configuration data may lead to errors.
For information on how to analyze such errors and messages, refer to the S7-300
documentation.

Example:
The "ZEn26_03_TF_____31xC_Pos" project contains further samples you can use for
orientation. You can customize all samples according to your personal applications.

First Steps in Commissioning CPU 31xC: Positioning with analog output


Getting Started, 08/2011, A5E00105537-03 21
Further Information

First Steps in Commissioning CPU 31xC: Positioning with analog output


22 Getting Started, 08/2011, A5E00105537-03

You might also like