controlled positioning with asynchronous motor … parameter movement ... micromaster 420,...

91
Structure of the document Part A1 Automation Description (incl. Component list/Basic performance data) Part A2 Function Mechanisms in Detail Part B Step by Step Commissioning and Setup Part C Program Description Micro Application Examples The Fast Track to an Optimized Solution Controlled Positioning with Asynchronous Motor including HMI Configuration (S7-200, MICROMASTER 420 via USS-Protocol and TP070) Micro Application Example 1 V1.0 (Edition 03/2003) Micro Automation

Upload: truongque

Post on 03-Apr-2018

242 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motor including HMI Configuration (S7-200, MICROMASTER 420 via USS-Protocol and TP070)

V1.0 (Edition 03/2003)

Micro Application Example 1

Structure of the document

Part A1 Automation Description (incl. Component list/Basic performance data)

Part A2 Function Mechanisms in Detail

Part B Step by Step Commissioning and Setup

Part C Program Description

Micro Application Examples The Fast Track to an Optimized Solution

Mic

ro A

utom

atio

n

Page 2: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 2/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Liability Siemens AG do not accept liability of any kind for damages arising from the use of this application, except where they are obliged to by law in the event of damages to items used for personal purposes, personal injury or due to willful damage or gross negligence.

Warranty The program examples given are specific solutions to complex problems which were worked on by Customer Support. We must also point out that it is not possible in the current state of the technology to exclude all errors in software programs under all conditions of use. The program examples were prepared according to the best of our knowledge. However, we cannot accept any liability beyond the standard guarantee for Class C software in accordance with our “General Terms of Sale for Software Products for Automation and Drive Technology". The program examples can be purchased on the Internet as single licenses. They may not be transferred to a third party.

Page 3: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 3/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Table of Contents

Part A1: Application Description................................................................................. 8 1 Automation task ......................................................................................... 9 2 The Automation Solution ........................................................................ 11 2.1 Overview .................................................................................................... 11 2.2 Required Standard, Hardware and Software Components as well

as Application Software Components (“Shopping list”) .............................. 13 2.2.1 Hardware components ............................................................................... 13 2.2.2 Software components ................................................................................ 14 2.2.3 Application software components .............................................................. 15 3 Basic performance data .......................................................................... 16 3.1 General ...................................................................................................... 16 3.2 Measurements taken.................................................................................. 17 3.3 Measured data ........................................................................................... 18 3.3.1 Explanation on evaluating the measured data ........................................... 18 3.3.2 Example diagrams ..................................................................................... 19 3.3.3 Data............................................................................................................ 22 Part A2: Function Mechanisms ................................................................................. 25 4 Function Mechanisms ............................................................................. 26 4.1 Structural description of the complete solution .......................................... 26 4.1.1 Detection and evaluation of encoder impulses (actual value of the

position):..................................................................................................... 27 4.1.2 Control unit (S7-200 CPU) ......................................................................... 31 4.1.3 Controlling and diagnosis of frequency converter MM420 and

asynchronous motor................................................................................... 33 4.1.4 Using and monitoring of the application via TP070.................................... 35 4.2 Program and data structure ....................................................................... 37 4.2.1 Organization block OB 1 ............................................................................ 37 4.2.2 Subprogram for initializing the communication and the positioning

block........................................................................................................... 38 4.2.3 Subprogram for communication with the MICROMASTER and the

evaluation of the end-position switch, as well as the diagnosis communication ........................................................................................... 39

4.2.4 The subprogram “Pos” (positioning block) ................................................. 40 4.2.5 Subprogram for the communication with the MICROMASTER 420

frequency converter via USS protocol........................................................ 43 4.2.6 Used variable (data block, DB) .................................................................. 44

Page 4: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 4/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Part B: Installation of the Sample Application......................................................... 53 5 Installation of Hardware and Software................................................... 54 5.1 Hardware configuration .............................................................................. 54 5.2 Installing the software ................................................................................ 58 5.2.1 Transferring of the application code to the S7-200 CPU............................ 58 5.2.2 Transferring the application code to the Touch Panel TP070 .................... 58 5.2.3 Parameterization of the MICROMASTER 420 ........................................... 59 6 Operation of the application TP 070....................................................... 62 6.1 Providing the S7-200 CPU program with parameters ................................ 62 6.1.1 Parameter movement................................................................................. 63 6.1.2 Parameter mechanics/encoder .................................................................. 64 6.1.3 Parameter P- I- Controller .......................................................................... 65 6.2 Automatic mode and jog mode .................................................................. 66 6.2.1 Automatic ................................................................................................... 66 6.2.2 Jog mode ................................................................................................... 67 6.3 Diagnosis values of the MICROMASTER 420 frequency converter .......... 68 6.3.1 Status values of the MICROMASTER frequency converter and

errors in the USS communication .............................................................. 68 6.3.2 Reading the process values from the MICROMASTER............................. 70 6.4 Modification of the system settings at the TP070....................................... 71 Part C: Program Description ..................................................................................... 72 7 Explanations on the STEP7 Program..................................................... 73 7.1 OB1 (description of the block).................................................................... 73 7.2 INIT (SBR0), (description of the block) ...................................................... 74 7.3 Comm_Diag (SBR9), (description of the block) ......................................... 76 7.4 POS (positioning block, parameter) ........................................................... 82 7.5 Blocks for USS communication (parameter) .............................................. 82 7.6 Data block .................................................................................................. 82 8 Changes in the STEP7 program ............................................................. 83 8.1 Using a linear or round axis as well as modifying units//scales ................. 83 8.2 Using other inputs for the encoder (fast counter)....................................... 84 8.3 Transferring analogously the setpoint for the MICROMASTER

frequency converter ................................................................................... 86 8.4 Using other frequency converter of the MICROMASTER 3XX or

4XX family .................................................................................................. 87 8.5 Moving to freely selectable or relative positions......................................... 87 8.6 S7-Application code for own project use.................................................... 90

Page 5: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 5/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Preamble

This application deals with the topic “Controlled positioning with Asynchronous Motors” which will be briefly incorporated in a survey of the most common positioning procedures. The positioning is mainly differentiated between the “controlled“ positioning and the “regulated“ positioning. The differences of both procedures are shown in Table 1-1. Generally, it can be said that the control unit of a regulated positioning must always know the information about the current position, this does not apply in case of a controlled positioning. Table 0-1 Controlled and regulated positioning

Figure 0-1 Controlled positioning with less weight

The controlled positioning is exactly configured for a weight (e.g. 2kg) In the configuration it has been determined that the motor shall slow down 1m in front of the finishing post. The carriage will stop exactly at the defined place.

Figure 0-2 Controlled positioning with higher weight

Due to the fact that the carriage is loaded with a higher weight the inertia of the weight increases enormously. When the motor slows down 1 m in front of the finishing post, the “slow-down way“ will be longer than in case of a positioning with a less weight. This will result in a deviation if configured as shown in Figure 0-1.

Figure 0-3 Regulated positioning with less weight

The positioning always ”knows“ the current position and the positioning way. The motor speed of the carrier will be regulated in dependence on the remaining distance, hence exactly adjusted.

Figure 0-4 Regulated positioning with higher weight

Due to the “knowledge“ of the current position, it is possible to make corrections if the finishing post has not been passed, i.e. the motors returns shortly and corrects the position.

In this application the cases 3 and 4 of Table 1-1 are considered. They can certainly be realized with different inverters and asynchronous motor.

Page 6: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 6/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

However, in this application the following component types are considered as set

• S7-200 CPU

• MICROMASTER

• Asynchronous motor Consequently the application is destined for solving simple point-to-point positioning tasks. Due to the fact that a number of products of different performances are available for the aforementioned components types, we have concretely chosen those with a very high market relevance. S7-226 CPU, MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1).

In case you use exactly these components, this application on hand offers you a Plug&Play solution for linear axes which even contains performance data measured under load. But even in case you use other products of the aforementioned product types (e.g. MICROMASTER 410 or 440 instead of MM 420, etc.) you will highly profit from this application. Both, a detailed description of the function mechanisms as well as the user program offer you the possibility simply to adjust the delivered functionality to your specific requirements (e.g. to the HW components used by you).. With respect to a number of often asked questions we additionally offer answers leading you step by step to the intended purpose (please cf. chapter 8), for example:

• How will you use the application, if you want to automate a round axis instead of linear axis?

• What will you have to do, if you want to employ an older MM3XX instead of the MM420 in the application?

Page 7: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 7/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

The basic solution principle of the application works as follows. In order to realize the positioning forming the basis of the application, different standard components (hardware and software) are required. You have to make this available (please cf. figure 1-5). The application software delivered by us saves you extensive parameterizing and programming of the standard components, thus offering you a comfortable possibility for a fast implementation of the regulated positioning.

Figure 0-5 Basic solution principle of the application on hand.

Possible employment areas for this application are • Palettizing facilities

• Allocation facilities

• Material transport • Paper processing machines

• Cardboard processing machines

Page 8: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 8/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Part A1: Application Description

Objectives of Part A1 Part A1 of this document provides the reader with information on the following topics:

• description of the automation problem

• showing a possible solution

• the performance capacity of the overall application.

Page 9: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 9/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

1 Automation task

A typical industrial case The following example shows one possible application case where the provided application can be used. The following is an example as to how each car seat is transported one by one to a defined position by means of conveyor belt. However, this procedure is not dealt with in this application (please see green conveyor belt in Figure 0-1 ). Every time a car seat is at the defined position a gripper operates between two positions “A” and “B”. The (low air pressure) gripper rests in position “A” above a reservoir for seat covers. In case a car seat (as mentioned above) is at the defined position on the conveyor belt, the gripper will suck up a seat cover and turn to position “B” above the car seat where it will then deposit the seat cover. The gripper turns back to the starting position and the car seats are moved on the conveyor belt to the next processing station.

The axis with the two positions “A” and “B” is the positioning task which is dealt with in the application.

Figure 1-1 Example of a positioning

“Abstracted” requirements on the application on hand The application should place upon the “given” HW components (S7-CPU 226, MICROMASTER 420, asynchronous motor type 1LA7, please cf. also list of components in chapter 2.2.1).

Page 10: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 10/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

In connection with the “application software“ (see chapter 2.2.3) a certain performance attitude is caused fixing the solution presented here according to its usage range. As a Plug&Play solution (i.e. under employment of the HW components given by us, please see above) it is possible to employ the application in the following basic data areas.

Table 1-1 Basic data areas of the application

Technical date from until

Motor moment -0,8Nm 0,8Nm Position A bei 0mm Position B bei 1000mm Accuracy 3mm Positioning speed (per motion length)

150

Possible encoder 20kHz In general, the “application software” can be operated in connection with other performance classes of frequency converters (series MM420) and asynchronous motors resulting in an appropriate expansion of the employment with respect to the drive performance. The positioning accuracy usually remains unaffected by this. Apart from the technological functionality, the application shall offer both a comfortable and inexpensive HMI connection. Inter alia the following will have to be monitored: The actual value of the position, the setting for the MICROMASTER 420 as well as its diagnosis values being available. Inter alia the following will have to be operable Desired value of the position, jog operation and the possibility of searching for reference. In addition the entire parameterization of the positioning should be possible via the HMI unit.

Page 11: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

2 The Automation Solution

In this chapter you will learn in detail as to how the automation task explained in Chapter 2 is solved by the application described in this document. It demonstrates what the application can do and how it works. The description is deliberately made in universally applicable terms. Part A2 of this documentation includes in-depth information, which you will only need, if you are interested in the detailed processes and the interactions between the individual solution components.

2.1 Overview

The depicted hardware setup gives an overview of the configuration.

Fig 2-1 Please c

! Note The functiohowever, t(e.g. via ththe applica Each haThis provindividua

Limit switch, reference point switch

.05.2003 11/91

Hardware components of the automation solution

onsider the following note on visualization:

nality “Controlled Positioning” functions even without the HMI connection, he command interface in the DB (data block) must be operated by other means e digital inputs of the CPU). (Nevertheless, this has not been prepared explicitly in tion project.

rdware element shown in Fig 2-1 is explained in the following table. ides you with an overview of all hardware elements and their l functions for the complete solution of the automation problem:

Page 12: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 12/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

No.

Classification according to Figure 2-1

Type (Main) Function

1 Visualization Touch Panel TP070

A total of 8 figures are available whose interactions and functions are described in Part A2 and B. The main functions are: Operating:

• Jog operation • Search for reference • Positioning to an entered mark

Monitoring:

• Position derived from counter content • Setting • Diagnosis

2 Super-ordinate intelligence with E/A modules

S7-CPU 226 • Counting of encoder impulses • Determining the difference between setpoint

and the actual value of the position. • Calculation of setting • Providing of the command interface (e.g. for

TP070) (in the DB) • USS communication to the frequency

inverter • Diagnosis of the frequency inverter (reading

of process values and states) 3 Drive Frequency

converter MM420 • Generating of a three-phase current grid

with variable frequency 4 Motor Asynchronous

motor type 1LA7

• Conversion of the electrical energy in mechanical energy

5 Shaft angle encoder

Optically incremental with HTL level

• Electrical square wave impulses are generated out of the mechanical position information (in the Aplication Example 100Inc/Rev used)

Table 2-1 Functions of the individual hardware components for the complete solution

Page 13: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 13/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

2.2 Required Standard, Hardware and Software Components as well as Application Software Components (“Shopping list”)

2.2.1 Hardware components

Products Component Type MLFB/Order informaton No. Remarks

Single-phase converter MICROMASTER 420 6SE6420-2UC11-2AA0 1

S7-200 CPU SIMATIC S7-CPU 226 XM 6ES7216-2BD22-0XB0 1

Motor 3-phase NS asynchronous motor 1LA7 060-4AB10 1

Touch Panel TP 070 6AV6545-0AA15-2AX0 1

Encoder Incremental encoder 6FX2001-4NA10 1

Operation Panel for MICROMASTER BOP (Basic Operator Panel)

6SE400-0BP00-0AA0 1

Note The here chosen encoder has a resolution of 100 increments per revolution, this is sufficient for a solution of the automation problem. In case an encoder with a higher resolution proves to be necessary for other requirements it will have to be considered that the highest possible number of motor revolutions is limited by the sensing frequency of the counter (in the CPU). Maximally impulses with a frequency by 20kHz the counter sensing. If, for example, an encoder with a resolution of 1000 increments per revolution is employed, then the maximal number of motor revolutions will be 1200 revolutions per minute.

! CAUTION This note describes the deceleration of large loads. When braking loads of more than approx 10% of the MICROMASTER rated output power, you must use one the following alternatives.

1. Use a MICROMASTER 440 (with brake resistors) instead of the MM420. 2. For low requirement in terms of positioning dynamics increase the

deceleration time: The braking power of the MICROMASTERs which can be applied decreases (thus the duration of the positioning becomes larger; only applicable by braking power few more of 10% of the MICROMASTER rated output).

Page 14: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 14/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Accessories Component Type MLFB/Order informaton No. Remarks

Connection cable (S7-200 CPU and MICROMASTER 420) PROFIBUS cable 6XV1830-0EH10 1

Yard ware, minimum order quantity 20m, maximum 1000m suitable for quick mounting.

Bus connector Connector for PROFIBUS cable

6ES7 972-0BA12-0XA0 1 With terminating resistance (deactivatable)

Connection cable (S7-200 CPU and TPO70

MPI cable (5m) 6ES7901-0BF00-0AA0 1

Network filter Low leakage EMC filter (for operation at the FI protective switch)

6SE6400-2FL01-0AB0 1 In case of other requirements other filters can be employed.

Note: Instead of the BOP (Basic Operator Panel), the AOP (Advanced Operator Panel) or the PC inverter connection block can alternatively be employed for the parameterization of the MICROMASTER 420. AOP (Advanced Operator Panel): • MLFB 6SE6400-0AP00-0AA1

PC converter connection block

The PC inverter connection block contains the following components: • Serial interface for the MICROMASTER frequency converter

• Serial connection cable between PC and the MICROMASTER frequency converter

• PC startup software STARTER for Windows NT4 SP5/SP6 and Win 2000 SP1 (is included in the delivery on the Docu CD of the MICROMASTER)

• MLFB 6SE6400-1PC00-0AA0

! Important For the operation in an network with an FI protective switch, the network filter for low leakage currents is required! (please see accessories)

! Important Please bear in mind that an output inductor will have to be employed between the MICROMASTER frequency converter and the motor, in the event of a wire length longer than 50m shielded or 100m unshielded. (The output inductor reduces the capacitive equalizing currents occurring in case of long wire lengths.)

2.2.2 Software components

Configuration software/tools Component Type MLFB/Order informaton No. Comment

STEP 7Micro/WIN 32 V3.2 6ES7810-2BC02-0YX0 1

STEP 7Micro/WIN 32 TP-Designer V1.0 6ES7850-2BC00-0YX0 1

Connection cable 2 PC/PPI cable 6ES7 901-3BF20-0XA0 1 For the configuration of S7-200 CPU and TP070

Page 15: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 15/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

2.2.3 Application software components

Table 2-2 Application software components

No.

Name

Function description

Technical data

System environment

1 MAIN [OB1] - Calling the INIT (SBR0) block, only in the first cycle - Calling the Comm_Diag (SBR9) block

S7-226 CPU

2 POS (SBR1) - Evaluating quick counters and determining the actual position

- Calculating the setting for setpoint velocity of the motor - Manual procedure - Referencing - Setting a new zero point

S7-226 CPU

3 INIT (SBR0) - Calling the block for initializing the positioning block (USS_INIT)

- Calling the block for initializing the USS protocol (USS_INIT)

- initializing a quick counter - initializing a time interrupt

S7-226 CPU

4 Comm_Diag (SBR9) - Calling the MICROMASTER control block, communication block

- five-time calling of the block ‘read process values’

S7-226 CPU

5 USS3 (SBR2) - Block for communication via USS protocol S7-226 CPU

6 USS_INIT (SBR3) - Initializing USS protocol S7-226 CPU

7 USS1 (SBR4) - Block for communication via USS protocol S7-226 CPU

8 USS2 (SBR5) - Block for communication via USS protocol S7-226 CPU

9 USS_CTRL (SBR6) - Controlling of MICROMASTER via USS protocol - Recording the status of the MICROMASTER

S7-226 CPU

10 USS4 (SBR7) - Block for communication via USS protocol S7-226 CPU

11 USS_RPM_R (SBR8) - Reading process values for diagnosis S7-226 CPU

12 USS6 (SBR9) - Block for communication via USS protocol S7-226 CPU

13 USS7 (INT1) - Block for communication via USS protocol (Interrupt program)

S7-226 CPU

14 USS8 (INT2) - Block for communication via USS protocol (Interrupt program)

S7-226 CPU

15 USS9 (INT3) - Block for communication via USS protocol (Interrupt program)

S7-226 CPU

16 Data block - Provides command interface - First initializing of the block parameter

S7-226 CPU

17 TP-Designer Project - Contains the pictures for operating and monitoring TP070

18 Parameter list of MM420 - Contains the parameter for the MICROMASTER MM420

(19) (STARTER Project) (- Contains the parameter for the MICROMASTER)

Motor-specific parameter are to adjusted to their own motor! (PC/MM420)

Page 16: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 16/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

3 Basic performance data

3.1 General

This chapter gives you a summary of the performance criteria of this application. Measurements of the applications were performed on a test model using the given components (see figure 3-1 test setup). The test model is in principle a mechanical setup, which is driven by the motor of the application on hand (tested motor). For simulating a real load, a second motor was added. The effect of the added motor is in direction or counter-direction of the tested motor. Furthermore, the model provides the reference point and the position-end-switch to the test application. For enabling taking up the traveled rotations (or the imagined travel distance), the test model has a separate shaft angle encoder with corresponding evaluation. The test setup is schematically outlined and labeled in the figure below.

Fig. 3-1 Test setup

Page 17: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 17/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

3.2 Measurements taken

A measurement is always taken over a defined period of time (e.g. approx. 20s), position setpoint or speed setpoint of the application were always recorded (every 25 ms). From the measured data a diagram was generated from which the data in chapter 3.3.3 were read. The taken measurements can be divided into three categories:

• The load momentum is effective in positioning direction of the motor (tested motor)

• Load momentum is effective against positioning direction of the motor (tested motor)

• An impact of constant momentum is applied to the position control in standstill (constancy)

The simulated load, a constant momentum which is effective against or in positioning direction, was varied in steps of 0.1Nm in the range from 0.0Nm to 0.5 Nm. Additionally, for each measurement there are different variations of the moment of inertia by adding or removing disk flywheels. The moment of inertia was varied by the steps below:

• Without additional disk flywheel (J= ca. 0,005276 Kg m²; measured, calculated)

• With one additional disk flywheel (J= ca. 0.00077 Kg m²; calculated)

• With two additional disk flywheels (J= ca. 0.00077 Kg m²; calculated)

• With three additional disk flywheels (J= ca. 0.00231 Kg m²; calculated)

Page 18: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 18/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

3.3 Measured data

This section gives you an explanation on evaluating the measured data, additionally, example diagrams of four measurements are shown. In the last chapter of the basic performance data the detailed tables have been printed with the measured values. Generally it can be summarized, that the position control at load shows better control properties in position direction than at loads against the position direction.

3.3.1 Explanation on evaluating the measured data

For each variation of the measurement, measured values were recorded and a diagram produced. The measured values could be taken from the generated diagrams as illustrated in the figure below.

Figure 3-2 Terminology at the example diagram of a positioning to 1000mm, with an additional moment of inertia of J=0.00077 Kg m² and a constant load of 5Nm.

Page 19: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - E

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

3.3.2 Example diagrams

This chapter gives two each examples for measurements with the properties:

• Load momentum is effective in (or against) positioning direction of the motor (tested motor)

• An impact of constant momentum is applied to the position control in standstill (constancy)

constant speed

ndgültig 13.05.2003 19/91

Fig. 3-3 Travel from position 0mm to 1000mm and back. (At this measurement no load momentum was effective, only the friction of the model had to be overcome. The additional moment of inertia was J=0,00077 Kg m²)

acceleration

deceleration

Page 20: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A -

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Fig. 3-4 Travel from position 0mm to 1000mm and back (One additional moment of inertia of J=0.00231 Kg m² was mounted and the constant load momentum was 0.5Nm.)

positioning in load-direction

Positioning oposite load-direction

momentum starts

Position without overshoot reached

Setpoint in limitation

Position Controller in stand

Endgültig 13.05.2003 20/91

Fig. 3-5 Impact of 0.5 Nm, without additional flywheel mass

Page 21: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - E

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Position with overshoot reached

Momentum

starts

ndgültig 13.05.2003 21/91

Fig. 3-6 Impact of 0.3 Nm, with additional flywheel mass of 0.00231Kgm²

Page 22: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 22/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

3.3.3 Data

Table 3-1 Accuracy load momentum in travel direction

Test condition Accuracy load momentum in travel direction Remarks

Add

ition

al

mom

ent o

f in

ertia

(by

disk

s)

[kg

m²]

Con

st. l

oad

in

Nm

Max

. dev

iatio

n [m

m]

Ris

e tim

e [s

]

Settling time [s] ± 2,5 mm position window

Settling time [s] ± 0.5 mm position window

Rem

aini

ng

devi

atio

n af

ter

20 s

0 0,62 8,38 10,85 0,04

0.1 0.78 8.60 13.85 -0.02

0.2 0.51 8.48 9.13 -0.02

0.3 2.53 8.50 9.25 14.43 -0.08

0.4 4.69 8.50 11.95 15.15 -0.11

0

0.5 14.77 8.43 10.98 17.03 -0.07

kp=120 I=0,02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0,015

0 0.58 8.45 11.53 0.04

0.1 1.20 8.58 12.90 0.04

0.2 1.71 8.58 13.63 -0.04

0.3 2.80 8.53 11.00 14.63 -0.13

0.4 5.10 8.50 10.43 14.73 -0.11

0.0077

0.5 15.07 8.50 11.08 22.48 0.11

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

0 0.74 8.63 14.85 -0.07

0.1 1.53 8.75 14.13 -0.09

0.2 2.33 8.75 14.63 -0.14

0.3 3.75 8.65 13.03 15.98 0.05

0.4 9.73 8.60 13.23 18.28 0.09

0.0154

0.5 19.52 8.58 11.85 12.65 0.17

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

0 0.16 9.15 0.16

0.1 1.40 9.08 24.55 0.50

0.2 2.60 8.93 11.23 23.85 -0.27

0.3 4.37 8.83 20.40 29.03 -0.58

0.4 10.10 8.80 18.68 46.20 -0.11

0.0231

0.5 26.00 8.73 18.83 -0.56

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

Page 23: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 23/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Table 3-2 Accuracy load momentum against travel direction

Test conditions Accuracy load momentum against travel direction Remarks

Add

ition

al

mom

ent o

f in

ertia

(by

disk

s) [k

g m

²]

Con

st. l

oad

in

Nm

Max

. dev

iatio

n [m

m]

Ris

e tim

e [s

]

Settling time [s] ± 2.5 mm position window

Settling time [s] ± 0.5 mm position window

Rem

aini

ng

devi

atio

n af

ter

20 s

0 0.41 8.30 0.01

0.1 0.01 19.05 0.00

0.2 -0.40 16.45 -0.04

0.3 -0.12 18.48 -0.11

0.4 -1.15 11.65 22.63 0.13

0

0.5 -0.29 10.69 11.20 -0.17

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

0 -1.02 8.40 0.03

0.1 -0.07 15.65 -0.03

0.2 -0.11 15.30 -0.09

0.3 -0.14 18.70 -0.13

0.4 -1.60 11.55 23.53 0.08

0.0077

0.5 -2.50 11.05 11.45 11.45 21.28

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

0 -0.78 8.58 15.10 0.04

0.1 -0.09 15.15 -0.06

0.2 -0.44 13.98 0.04

0.3 -1.41 15.65 29.10 0.05

0.4 -1.54 15.80 33.93 0.07

0.0154

0.5 -3.79 12.35 20.33 24.45 0.14

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

0 -0.38 9.13 -0.37

0.1 -0.14 17.43 -0.14

0.2 -0.28 19.83 -0.28

0.3 -3.01 16.33 30.88 36.25 0.01

0.4 -4.29 17.25 34.58 38.80 0.00

0.0231

0.5 -0.84 19.18 18.58 -0.83

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

Page 24: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 24/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Table 3-3 Measurement of constancy (impact on position controller at rest)

Test conditions Constancy Remarks

Add

ition

al

mom

ent o

f in

ertia

(by

disk

s) [k

g m

²]

Con

s. lo

ad in

N

m

Max

. dev

iatio

n [m

m]

Ris

e tim

e [s

]

Settling time [s] ± 2.5 mm position window

Settling time [s] ± 0.5 mm position window

Rem

aini

ng

devi

atio

n af

ter

20 s

0

0.1 0.82 12.65 6.63 -0.01

0.2 1.95 12.25 6.48 -0.01

0.3 3.39 23.50 3.65 8.30 -0.08

0.4 7.67 3.10 3.35 3.60 -0.01

0

0.5 15.83 20.75 2.53 11.88 0.00

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

0

0.1 0.83 15.40 6.70 -0.04

0.2 1.57 29.05 6.58 -0.04

0.3 3.38 15.00 3.78 7.93 -0.09

0.4 3.03 13.58 4.68 7.28 0.03

0.0077

0.5 11.18 3.60 3.38 3.55 0.10

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

0

0.1 0.16 0.08

0.2 1.83 13.08 6.93 -0.01

0.3 3.55 15.23 4.45 7.80 -0.03

0.4 8.18 5.23 10.48 12.73 0.09

0.0154

0.5 18.09 3.63 8.63 9.10 0.00

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

0

0.1 1.89 18.93 14.45 -0.11

0.2 1.06 32.93 25.33 -0.08

0.3 6.64 11.25 10.88 40.70 -0.05

0.4 6.97 14.38 13.25 14.18 -0.10

0.0231

0.5 32.24 11.08 10.55 -1.43

kp=120 I=0.02

Vmax=150mm/s a=75mm/s²

10mm/U corr=0.015

Page 25: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 25/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Part A2: Function Mechanisms

Objectives of Part A2: Part A2 of this document provides the reader with information on the following topics.

• Explanation of all integrated function elements

• Representation of the data flow between the function units

• Providing the necessary background information required for the understanding of the solution.

Page 26: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

4 Function Mechanisms

In principle this application can immediately be used. The installation instructions of part B tell you how to start the application without having read this chapter. But if you want to modify specific parts of the application, you will need certain information, for example to convert your program sequences correctly and without too much effort into the STEP7-Micro/Win Code, TP-Designer Project for TP070 and STARTER-Project for the MICROMASTER. The said information will be given in the following sections.

4.1 Structural description of the complete solution

The structure of the complete solution of the application is shown in Fig. 4-1 .

Fig. 4-1 Fu

Limit switch; reference switch

.05.2003 26/91

nction principle of the application

Page 27: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 27/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

From a structural point of view the functions of the applications can be divided in four different parts:

• Detection and evaluation of encoder impulses to determine the actual value of the position (see chapter 4.1.1)

• Controlling of the application (calculation of the manipulated variable for the MM420, command interface (see chapter 4.1.2)

• Controlling of the frequency converter MM420 and asynchronous motor (see chapter 4.1.3)

• Operating and monitoring of the application via TP070 (see chapter 4.1.4)

The mechanics consist, for example, of a threaded spindle with a slide on its top. (Its position is changed by rotation of the spindle. In this connection a rotation of the shaft by X degree corresponds to a movement of the nut by Z millimeters.

Bild 4-2 Example for mechanics, here threaded spindle

4.1.1 Detection and evaluation of encoder impulses (actual value of the position):

The actual value of the position is formed in this application via an evaluation electricity consisting of an incremental encoder (here HTL shaft angle encoder) and a counter (here the HW counter of the S7-200 CPU). The incremental encoder generates a fixed number of impulses per each shaft twist.

Slide with carriage

Page 28: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 28/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Figure 4-3 Function principle of the HTL shaft angle encoder

A luminescent source transilluminates a disc with slits stripes being fixed on the shaft. If the disc rotates it will generate intermittently contrasts which will then be detected by a photo element. These impulses are changed into square wave impulses and are displayed. The incremental encoder owns two channels (A and B), i.e. theoretically there are two encoders. The channels are phase-shifted towards each other by 90°, thus allowing to determine the rotational direction of the shaft (see figure 1-1)

Figure 4-4 Pulse train of the incremental encoder in case of different rotational

directions. In order to increase the resolution all edges of the counter are evaluated resulting in quadruplicating the impulses.

Page 29: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 29/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Figure 4-5 Counter content in dependency of the encoder impulses (with impulse quadruplicating)

The evaluation of the encoder impulses is made via the hardware counter integrated in the S7-226 CPU. The number of the impulses is a measure for the travelled distance. By using the HW counter it is possible to evaluate the encoder impulses indenpendently of the cycle time of the user program. The advantage is the fact that the user program is independent of the counter and does not use up any data processing time. Here it is not possible to use a software counter which can be seen in the following small arithmetic example: An encoder with a resolution of, for example, only 100 impulses per rotation at a motor with e.g. 1350 rotations per minute already generates 2250 impulses/sec.

SecondImpulses2250

Seconds 60Minute

Rotation1350RotationImpulses100

Figure 4-6 Calculation of impulses arising per second This value corresponds 2250° Hertz. In order to record a frequency like this successfully, it will have to be scanned with at least its double frequency. This theoretically corresponds to 4500 callings of a counter block which

Page 30: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 30/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

would correspond to a cycle time of 0.22 milliseconds. This cycle time cannot be obtained with S7-200.

dsMillisecon 0,22Seconds 0,000224500Hertz

14500Hertz2250Hertz2

:nCalculatio

Frequency2Frequency: theoremsShannon'

scanned be tomeasure

==

×≥

Figure 4-7 Calculation of the theoretically required cycle time in order to scan the impulses of the shaft angle encoder

Page 31: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 31/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

4.1.2 Control unit (S7-200 CPU)

4.1.2.1 Calculation of the manipulated variable for the frequency converter MM420 In the following picture the actual position control is displayed.

Fig. 4-8 Procedure of a position control (determining the difference between setpoint and the actual value of the position and calculating the setting for the motor speed)

The S7-200 CPU determines the actual value of the position via the counter contents. The setting for the setpoint velocity of the motor (P- controller) is constantly determined by the deviation between the setpoint of the position (in the application of the HMI system) and the actual value of the position. Shortly before the actual value reaches the setpoint of the position the motor may come to a stillstand as the setpoint velocity of the motor and thus the motor power are to low to move the motor. This connection is illustrated in the following picture.

Setpoint value Actual value

high deviation between setpoint and actual value, high setting

small deviation between setpoint and actual value, small setting

Figure 4-9 Dependency of the setting from the deviation between setpoint and actual value

Page 32: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 32/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

In this way the setpoint position would only be reached approximately. It is possible that a permanent deviation will remain. As a consequence, it will additionally be ascertained during the positioning how long a deviation is remaining thus increasing the setpoint velocity of the motor per time increment (I-controller).

Jerky movements In order to avoid jerky movements at the motor and the connected mechanics, acceleration limitations are put on the setpoint value at the beginning and the end of the positioning.

Figure 4-10 Illustration of the acceleration, the constant and the delay phases in a way-time and speed-time diagram

4.1.2.2 Command interface The command interface is an area in the data block. Here are several bits which display global status information (e.g. in the positioning window) or by means of which global functions of the application (jog operation forward/back) can be controlled Further information and a detailed description of the command interface can be found in chapter 4.2.3 “data block”.

Page 33: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 33/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

4.1.3 Controlling and diagnosis of frequency converter MM420 and asynchronous motor

The asynchronous motor is controlled via the frequency inverter MICROMASTER 420. If an asynchronous motor is directly connected to the three-phase current network an exact positioning (for this low speeds are required in case of creep feed) will be nearly impossible. This is due to the fact that, in this case, the speed is in a fixed proportion to the speed of the current network. This means that the speed is largely constant. From the current network with a constant frequency, the frequency inverter generates speed with a variable frequency. (please cf. Fig. 4-2). Consequently the speed of the motor is no longer constant. And consequently, the configuration can be employed for positioning tasks.

Fig. 4-2 Frequency conversion

Page 34: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 34/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

The S7-200 CPU and the MICROMASTER frequency converter own a serial RS485 interface and are connected with each other via a PROFIBUS cable. The devices communicate via the USS protocol (see chapter 4.1.2). The converter gets the following parameters from the S7-200 CPU:

• Motor On/Off • Setting (in percent of the converter parameterized maximum speed with

a sign for the direction; -100% 100%) The output variables of the MM420 to the asynchronous motor are:

• Voltage

• Frequency of voltage The following speed areas can be covered by means of the MM420 and a connected norm asynchronous motor

Frequency\pair of poles

2 4 6 8

50Hz 3000min-1 1500min-1 1000min-1 750min-1

60Hz 3600min-1 1800min-1 1200min-1

Apart from realizing the “variable motor speed” the frequency converter assumes further functions, for example the limitation of the motor current or heat protection functions (calculated) of the motor. The diagnosis is made – in the same way as the control of the MM420 – via the USS protocol. Every time the appropriate communication block is called, the latest status of the frequency converter is transmitted. In addition some process values (some of them chosen) are deliberately read. Status and process values are evaluated by the S7-200 CPU and provided in the visualization.

Note: The process values (which are transmitted to the data block when the communication block is being called) will be constantly updated, when the communication block is called cyclically. The diagnostic values are only be updated as a result of a trigger (command). If a constant updating of the process values took place, the communication would burden the bus too much and the control behavior would deteriorate. Only the most important process values are transmitted to the S7-CPU. The communication will also be burdened too much, if too many process values are read out of the converter. The process values used in the application are only one example and could be modified to the individual requirements, as occasion demands.

Page 35: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 35/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

4.1.4 Using and monitoring of the application via TP070

Via the TP 070 the application contains a comfortable using and monitoring possibility. A total of 8 figures are available whose functionalities are illustrated in table 4-1. It is a particular comfort for you that each figure can be selected out of each figure. To enable this, a standard navigation bar is at the bottom of each figure. On this are various “sensors”. By pressing a button you can move into the various figures of the project. The button of the currently chosen figure is always shaded in color. Some operation categories contain several figures. In these cases a second navigation bar appears above the standard menu bar. The following two examples illustrate this:

You are in the operation category “Parameter” and you

have opened figure “P-I controller.

Your are in the operation category “Jog Mode”, no

further figures exist here.

Figure 4-3 Figure navigation

Page 36: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 36/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Table 4-1 HMI figures and their functions

Operation category

Figure Figure No. 1

Function description

Movement B1 Entering of all parameters having direct effect on the fastness of the positioning.

Mechanics/ Encoder

B2 Entering of all parameter for encoders (e.g. increments per revolution) as well as the absolute positions A and B, which are to be approached.

Para

met

ers

P/I controller B3 Entering of controller-specific parameters like reinforcements and compensation values, affecting the controlling behaviour. In addition, the possibility of activating the controlling permanently, or switching it off in a specific positioning window, is given here.

Auto

-m

atic

op

e- e

r-at

ion

Automatic B4 Enabling the controller as well as selection of the target positions A and B by pressing the button. Additional display of current setpoints, settings and the setpoint velocity of the motor.

Jog

ope-

ratio

n

Jog mode B5 Manual procedure (forward run/return slow/fast) as well as setting of zero point, looking for reference point by pressing the button and controller enable on/off. Additional display of current setpoints, settings and the setpoint velocity of the motor.

Status: B6 Display of status information of the frequency converter MM420 as well as displaying the error codes relating to USS communication.

Dia

gnos

is

Process values

B7 Display of a selection of process values from the MM420, e.g. output voltage, output current, etc.

System System B8 Modification of the system settings at the TP070.

You will find a detailed description of the individual HMI pictures in Part B, chapter 6 (Operation of the Application). There each of the parameters used in the figures is explained in detail.

Note If desired, you will of course be able to simply modify the delivered HMI figures !

Page 37: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 37/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

4.2 Program and data structure

This chapter explains the program and data structure of the S7 Micro/Win program which is on the S7-CPU 226. With respect to their structures the functions being on, the S7-CPU 226 have already been explained previously. The S7-Micro/Win program has the following structure:

Fig. 4-13 Overview of the STEP7 Micro/Win program structure The individual program blocks are described below:

4.2.1 Organization block OB 1

In the following section you can see how the calls in OB1 are functioning program technically:

Page 38: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 38/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

In the following figure it is apparent, that the subprograms INIT (SBR0) and Comm_Diag (SBR9) are called.

Fig. 4-4 Structure of the organization block OB1

The organization block OB 1 contains two main fields.

• Call of the subprogram “INIT” (initializing) (network 1).

• Call of the subprogram “Comm_Diag“ for Comunication and Diagnose of the MICROMASTER (reading the process values) and evaluating the limit values and reference point switches (network 2)

4.2.2 Subprogram for initializing the communication and the positioning block

Fig. 4-5 Structure of the initializing block INIT

Page 39: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 39/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

The commands of the initialization block are only executed in the first cycle of the CPU. The functions in detail are:

• Set up hardware counter (for encoder pulses)

• Set up time interrupt for the call of the positioning block

• Initializing the USS communication of the CPU for the MICROMASTER 420, by call-up of the subprogram USS_INIT.

4.2.3 Subprogram for communication with the MICROMASTER and the evaluation of the end-position switch, as well as the diagnosis communication

Fig. 4-6 Structure of the initializing block INIT This block is called cyclically in the OB1, it contains the following functionalities:

• Communication with the MICROMASTER 420

• Reading the (diagnostics) process values from the MICROMASTER 420

• Evaluation of the end-position switch and the reference point switch

Page 40: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 40/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

4.2.4 The subprogram “Pos” (positioning block)

Fig. 4-15 Structure of the organization block OB1

The subprogram „Pos“ (positioning block) represents the core module of the S7 Micro/Win program. The MICROMASTER frequency converter is completely “controlled” in the automatic operation from here. In particular the subprogram “Pos“ (positioning block) carries out the following tasks:

• Evaluation of the counter contents and generation of the actual value of the position (network 5) The current counter content of the fast hardware counter is read out and converted by means of the parameters increments per revolution and travel per revolution into the current actual value of the position.

• Calculation of the deviation between setpoint and actual value (networks: 28; 59)

The variable “VD_new_position“ (VD1000 in the data block) contains the value of the setpoint. The difference is formed by the value of the current actual value and the deviation between setpoint and the actual value is calculated therefrom.

• Calculation of the setting for the setpoint velocity of the motor (networks: 15-17; 23-27; 30-44; 46-48; 51-53; 55-58; 64-67; 83) By means of the calculated deviation between setpoint and actual value, a setting for the setpoint velocity of the motor is calculated. Vectra

Page 41: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 41/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

The calculation consists of 2 parts: ▪ The P-Part and ▪ The I-Part

P-Part The P-part is a purely proportional factor: In case the deviation between setpoint and actual value is too high, the P-part will also be too high, it will only be limited by the maximum output size (positive and negative). I-Part In the event that prior to reaching the setpoint the deviation between setpoint and actual valued is small, then the calculated P-Part will also be (very) small. This will result in a low (setpoint) velocity of the motor . A burden or high friction can have the effect that due to the low speed requirements the motor stops moving and comes to a standstill. Thus causing a remaining system deviation. In order to counteract this fact, the I-Part will be constantly increased during a certain time in case the setpoint is not reached so that the setpoint velocity of the motor generates enough torque to overcome friction and burden.

Fig 4-7 prevailing formula forming setpoint

Page 42: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 42/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

• Performing the search for reference and setting of zero value When restarting the S7-200 CPU the current actual position is unknown. The system has to be informed to this effect. There are two solutions for this:

▪ Manual procedure and setting of the zero point by pressing the button (networks: 11-14; 60) Via the jog operation the mechanics are manually moved to a defined point corresponding to the “zero point” of the system. In addition the command “set zero point” is given. By this procedure the system is “taught” the actual value.

▪ Search of reference (networks: 22; 49) In case the mechanics own a reference point switch, then this can be used to “teach” the system the current position. If the command search for reference is given, the control will “look for” the reference point switch until this has been passed over. There the counter content will be put to “zero”.

Note In case the rest position (or the desired zero position) does not correspond to the physical reference point, then a reference point shift unequal 0 can be defined in the parameters.

• Manual motion (network: 18-21; 54; 70-72; 75-82) In order to operate the mechanics manually, four commands are available:

▪ Forward run with low speed (V1) ▪ Return with low speed (V1) ▪ Forward run with high speed (V2) ▪ Return with high speed (V2)

Note For the manual procedure (and referencing) the speeds (V1, V2) can be parameterized in the data block

Page 43: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 43/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

4.2.5 Subprogram for the communication with the MICROMASTER 420 frequency converter via USS protocol

Fig. 4-16 Structure of the communication programs for the USS communication with the frequency converter MICROMASTER 420 (blocks of the Instruction Library)

The subprograms for communication via the USS protocol with the MICROMASTER 420 frequency converter have been taken from the S7-Mirco/Win command library. All relevant block are described in the online documentation. Therefore only a summarized overview about the used functions of the USS communication library exists here. The used functions (block) are: • Initialization of the communication block.

The communication to the MicroMaster drive is initialized and activated or deactivated by means of the operation USS_INIT. Before an other USS operation can be used, the operation USS_INIT will have to be executed correctly.

Page 44: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 44/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

• Controlling of MICROMASTER frequency converter By means of the operation USS_CTRL an active MicroMaster drive is controlled The operation USS_CTRL disposes the selected commands in a communication buffer, which is then sent to the addressed drive (Parameter Drive), provided that this drive is set in the Parameter Active of the operation USS_INIT.

• Reading the parameters out of the MICROMASTER There are three reading operations for the USS protocol:

▪ Operation USS_RPM_W reads an unsigned one

▪ Operation USS_RPM_D reads an unsigned one

▪ Operation USS_RPM_R reads a floating point parameter, only this block is used in the application.

4.2.6 Used variable (data block, DB)

This chapter contains a list of the variables used by the program. The data block contains, inter alia, the command interface of the positioning block and the parameters used in the application. The following table illustration of the used variables is divided in four areas:

• Parameters

• Internal variables

• Command/status interface

• The memory area in the data block assigned by the USS communication blocks.

The variables are clearly described by their symbolic names and/or a comment. Furthermore the nature/type of the variable are shown and those blocks which access the variables by reading or writing.

Page 45: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Con

trolle

d Po

sitio

ning

with

Asy

nchr

onou

s M

otor

s in

clud

ing

HM

I Con

figur

atio

n

Rev

. A -

Endg

ültig

13.

05.2

003

45

/91

Copyright Siemens AG 2003 All rights reserved MA_0351_Gereg_Pos_Asynchron_DOKU_v00_e.doc

PrkNN.NN-N/A

Des

crip

tion

of th

e va

riabl

e N

atur

e an

d ty

pe o

f the

var

iabl

e Pr

ogra

m b

lock

s ha

ving

acc

ess

to th

e va

riabl

es (R

=rea

ding

,W=w

ritin

g Serial no.

Category Sy

mbo

lic N

ame

Com

men

t De

faul

t va

lue

Type

Fl

ags

DB

IN

IT

COM

M

DIA

G

POS

USS-

Kom

-m

unik

atio

n B&

B

1 VD

_OP_

Vmax

Sp

eed

max

imal

[mm

/s]

150.

0 Re

al

VD

1140

R

B1

-RW

2 VD

_OP_

Besc

hleu

nigu

ng

Acce

lera

tion

[mm

/s²]

75.0

Re

al

VD

1132

R

B1

-RW

3 VD

_OP_

Verz

öger

ung

Dela

y [m

m/s

²] 75

.0

Real

VD11

36

R

B1-R

W

4 VD

_OP_

V1_M

anue

ll Fi

xed

setp

oint

spe

ed m

anua

l 1

[%]

10.0

Re

al

VD

1016

R

B1

-RW

5 VD

_OP_

V2_M

anue

ll Fi

xed

setp

oint

spe

ed m

anua

l 2

[%]

40.0

Re

al

VD

1020

R

B1

-RW

6 VW

_OP_

Hoc

hlau

f_M

an

Star

tup

time

man

ual a

nd

refe

renc

ing

+500

In

t

VW11

56

R

B1-R

W

7 VW

_OP_

Aus

lauf

_Man

Sl

owdo

wn

time

man

ual a

nd

refe

renc

ing

+500

In

t

VW11

58

R

B1-R

W

8

Movement parameters

VD_F

akto

r_A

nzei

ge

Fact

or d

ispl

ay c

ompa

red

with

m

eter

s -1

.0 D

ispl

ay a

nd s

peci

ficat

ion

in m

eter

-0

.01

Disp

lay

and

spec

ifica

tion

in c

entim

eter

-0

.001

Dis

play

and

sp

ecifi

catio

n in

mill

imet

er

-0.0

0000

1 Di

spla

y an

d sp

ecifi

catio

n in

mic

rom

eter

1.0

Real

VD11

08

R

9 VD

_OP_

INK_

Umdr

ehun

g In

crem

ents

per

revo

lutio

n 10

0.0

Real

VD11

48

R

B2-R

W

10

VD_O

P_S_

Umdr

ehun

g Tr

avel

per

revo

lutio

n 10

.0

Real

VD11

52

R

B2-R

W

11

Mechanics /encoder parameter

VD_O

P_Re

f_Ve

rs

Refe

renc

e po

int s

hift

[mm

] 0.

0 Re

al

VD

1144

R

B2

-RW

12

Controlle

r para

VD_O

P_P_

Fakt

or

P am

plifi

catio

n 10

0.0

Real

VD10

72

R

B3-R

W

Page 46: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Con

trolle

d Po

sitio

ning

with

Asy

nchr

onou

s M

otor

s in

clud

ing

HM

I Con

figur

atio

n

Rev

. A -

Endg

ültig

13.

05.2

003

46

/91

Copyright Siemens AG 2003 All rights reserved MA_0351_Gereg_Pos_Asynchron_DOKU_v00_e.doc

PrkNN.NN-N/A

Des

crip

tion

of th

e va

riabl

e N

atur

e an

d ty

pe o

f the

var

iabl

e Pr

ogra

m b

lock

s ha

ving

acc

ess

to th

e va

riabl

es (R

=rea

ding

,W=w

ritin

g Serial no.

Category Sy

mbo

lic N

ame

Com

men

t De

faul

t va

lue

Type

Fl

ags

DB

IN

IT

COM

M

DIA

G

POS

USS-

Kom

-m

unik

atio

n B&

B

13

VD_O

P_I_

Fakt

or

I- a

mpl

ifica

tion

0.02

Re

al

VD

1008

R

B3

-RW

14

VD_O

P_A

nlag

enbe

iwer

t

Corr

ectio

n fa

ctor

for

P-

Rein

forc

emen

t (P

-Rei

nfor

cem

ent

x co

rrec

tion

fact

or =

real

P-

Rein

forc

emen

t

0.01

5 Re

al

VD10

80

R

B3-R

W

15

VD_O

P_Gr

enze

n_A

usga

be

Outp

ut li

mit

100.

0 Re

al

VD

1076

R

B3

-RW

16

VD_O

P_Fe

nste

r_Po

s Po

sitio

ning

win

dow

, con

trol

switc

hes

off h

er [m

m]

1.0

Real

VD11

28

R

B3-R

W

17

timin

g Cl

osed

Loo

p Cy

cle

30

byte

VB99

4 R

18

VD_n

eue_

Posi

tion

New

pos

ition

[m]

0.0

Real

VD10

00

RW

19

VD_i

st_P

ositi

on

Cur

rent

pos

ition

[m]

0.0

Real

VD10

04

RW

20

VD_S

ollp

ositi

on_G

en

Setp

oint

pos

ition

of s

et-

poin

t val

ue g

ener

ator

[m]

0.0

Real

VD10

24

RW

21

VD_S

tellw

ert_

int

Setti

ng [m

] 0.

0 Re

al

VD

1028

RW

22

VD_S

treck

e_G

en

Ope

ratio

n di

stan

ce [m

] 0.

0 Re

al

VD

1032

RW

23

VD_a

lte_P

ositi

on

Old

pos

ition

[m]

0.0

Real

VD10

36

RW

24

VD_Z

eitw

ert

Tim

e va

lue

[0,1

sec

unds

] 0.

0 Re

al

VD

1040

RW

25

VD_W

EG_U

mdr

ehun

g Tr

avel

per

revo

lutio

n [m

m]

Re

al

VD

1092

RW

26

VD_V

_Sol

l_Ge

n Se

tpoi

nt s

peed

of t

he

gene

rato

r [m

/s]

0.0

Real

VD10

56

RW

27

Internal variables

VD_H

S1_G

en

Auxi

liary

sto

rage

1

gene

rato

r 0.

0 Re

al

VD

1060

RW

28

VD_H

S2_G

en

Auxi

liary

sto

rage

2

gene

rato

r 0.

0 Re

al

VD

1064

RW

29

Internal variables

VD_H

S3_G

en

Auxi

liary

sto

rage

3

gene

rato

r 0.

0 Re

al

VD

1068

RW

Page 47: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Con

trolle

d Po

sitio

ning

with

Asy

nchr

onou

s M

otor

s in

clud

ing

HM

I Con

figur

atio

n

Rev

. A -

Endg

ültig

13.

05.2

003

47

/91

Copyright Siemens AG 2003 All rights reserved MA_0351_Gereg_Pos_Asynchron_DOKU_v00_e.doc

PrkNN.NN-N/A

Des

crip

tion

of th

e va

riabl

e N

atur

e an

d ty

pe o

f the

var

iabl

e Pr

ogra

m b

lock

s ha

ving

acc

ess

to th

e va

riabl

es (R

=rea

ding

,W=w

ritin

g Serial no.

Category Sy

mbo

lic N

ame

Com

men

t De

faul

t va

lue

Type

Fl

ags

DB

IN

IT

COM

M

DIA

G

POS

USS-

Kom

-m

unik

atio

n B&

B

30

VD_R

ampe

_I_A

ntei

l R

amp

I fra

ctio

n 0.

0 Re

al

VD

1096

RW

31

VW_S

peic

her_

Hoch

lauf

St

orag

e st

artu

p m

anua

lly

0 In

t

VW10

88

RW

32

VW_S

peic

her_

ausl

auf

Stor

age

slow

dow

n m

anua

lly

0 In

t

VW10

90

RW

33

VD_V

_Man

uell

Spee

d ou

tput

man

ually

0.

0 Re

al

VD

1100

RW

34

VD_S

peic

her_

Man

uell

Inte

rmed

iate

sto

rage

m

anua

l mot

ion

0.0

Real

VD11

04

RW

35

Diag

_Poi

nter

VSpe

iche

r6

Poin

ter 6

for 1

6 by

tes

stor

age

for d

iagn

osis

co

mm

unic

atio

n

Byte

VB17

18

RW

36

Diag

_Poi

nter

VSpe

iche

r5

Poin

ter 5

for 1

6 by

tes

stor

age

for d

iagn

osis

Byte

VB16

92

RW

37

Diag

_Poi

nter

VSpe

iche

r4

Poin

ter 4

for 1

6 by

tes

stor

age

for d

iagn

osis

Byte

VB16

76

RW

38

Diag

_Poi

nter

VSpe

iche

r3

Poin

ter 3

for 1

6 by

tes

stor

age

for d

iagn

osis

co

mm

unic

atio

n

Byte

VB16

60

RW

39

Diag

_Poi

nter

VSpe

iche

r2

Poin

ter 2

for 1

6 by

tes

stor

age

for d

iagn

osis

co

mm

unic

atio

n

Byte

VB16

44

RW

40

Diag

_Poi

nter

VSpe

iche

r1

Poin

ter 1

for 1

6 by

tes

stor

age

for d

iagn

osis

co

mm

unic

atio

n

Byte

VB16

02

RW

41

Diag

_Err

or

Erro

r byt

e of

the

diag

nosi

s co

mm

unic

atio

n

Byte

VB16

01

W

42

Done

06

Don

e Bi

t 6 o

f the

di

agno

sis

com

mun

icat

ion

Bi

t

V160

0.5

R

W

43

Internal variables

Done

05

Don

e Bi

t 5 o

f dia

gnos

is

Bi

t

V160

0.4

R

W

Page 48: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Con

trolle

d Po

sitio

ning

with

Asy

nchr

onou

s M

otor

s in

clud

ing

HM

I Con

figur

atio

n

Rev

. A -

Endg

ültig

13.

05.2

003

48

/91

Copyright Siemens AG 2003 All rights reserved MA_0351_Gereg_Pos_Asynchron_DOKU_v00_e.doc

PrkNN.NN-N/A

Des

crip

tion

of th

e va

riabl

e N

atur

e an

d ty

pe o

f the

var

iabl

e Pr

ogra

m b

lock

s ha

ving

acc

ess

to th

e va

riabl

es (R

=rea

ding

,W=w

ritin

g Serial no.

Category Sy

mbo

lic N

ame

Com

men

t De

faul

t va

lue

Type

Fl

ags

DB

IN

IT

COM

M

DIA

G

POS

USS-

Kom

-m

unik

atio

n B&

B

44

Done

04

Don

e Bi

t 4 o

f the

di

agno

sis

com

mun

icat

ion

Bi

t

V160

0.3

R

W

45

Done

03

Don

e Bi

t 3 o

f the

di

agno

sis

com

mun

icat

ion

Bi

t

V160

0.2

R

W

46

Done

02

Don

e Bi

t 2 o

f dia

gnos

is

Bi

t

V160

0.1

R

W

47

Done

01

Don

e Bi

t 1 o

f the

di

agno

sis

com

mun

icat

ion

Bi

t

V160

0.0

R

W

48

D

one

USS

_IN

IT

Bi

t

W

49

R

espo

nse_

R U

SS_C

TRL

Bi

t

W

50

Sp

eed

USS

_CTR

L

Real

W

51

R

un_e

nabl

ed U

SS_C

TRL

Bi

t

W

52

D

_Dire

ctio

n U

SS_C

TRL

Bi

t

W

53

In

hibi

t USS

_CTR

L

Bit

W

54

Fa

ult U

SS_C

TRL

Bi

t

W

55

timin

g_w

Cl

osed

Loo

p Co

ntro

l tim

e in

W

ord

Form

at

30

Wor

d

VW99

6 W

R

56

Mer

ker_

low

M

emor

y fo

r low

er li

mit

0 Bi

t

V999

.0

RW

57

Mer

ker_

uppe

r M

emor

y fo

r upp

er li

mit

0 Bi

t

V999

.1

RW

58

VD_O

P_N

eue_

Posi

tion

New

, re

sp. n

ext p

ositi

on

[mm

] 0.

0 Re

al

VD11

20

R

B4-R

W

59

VD_O

P_Ak

tuel

l_Po

sitio

n C

urre

nt p

ositi

on [m

m]

Re

al

VD

1124

RW

B4-R

60

VD_S

tellw

ert

Setti

ng [±

%]

0.0

Real

VD11

60

W

R B4

;5-R

61

Kommando- / Statustabelle

Diag

_Mot

orau

slas

tung

Va

lue

of m

otor

wor

kloa

d (%

, cal

cula

ted)

Real

VD16

40

W

B7

-R

Page 49: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Con

trolle

d Po

sitio

ning

with

Asy

nchr

onou

s M

otor

s in

clud

ing

HM

I Con

figur

atio

n

Rev

. A -

Endg

ültig

13.

05.2

003

49

/91

Copyright Siemens AG 2003 All rights reserved MA_0351_Gereg_Pos_Asynchron_DOKU_v00_e.doc

PrkNN.NN-N/A

Des

crip

tion

of th

e va

riabl

e N

atur

e an

d ty

pe o

f the

var

iabl

e Pr

ogra

m b

lock

s ha

ving

acc

ess

to th

e va

riabl

es (R

=rea

ding

,W=w

ritin

g Serial no.

Category Sy

mbo

lic N

ame

Com

men

t De

faul

t va

lue

Type

Fl

ags

DB

IN

IT

COM

M

DIA

G

POS

USS-

Kom

-m

unik

atio

n B&

B

62

Diag

_Ant

riebs

tem

p

Valu

e of

the

driv

e te

mpe

ratu

re (°

C)

Real

VD16

36

W

B7

-R

63

Diag

_Ant

riebs

ausl

astu

ng

Valu

e of

the

driv

e w

orkl

oad

(%)

Re

al

VD

1632

W

B7-R

64

Diag

_Aus

gang

s_I

Valu

e of

the

conv

erte

r ou

tput

cur

rent

(A)

Re

al

VD

1628

W

B7-R

65

Diag

_Zw

isch

enkr

_U

Valu

e of

the

conv

erte

r lin

k vo

ltage

(V)

Re

al

VD

1624

W

B7-R

66

Diag

_Aus

gans

_U

Valu

e of

the

conv

erte

r ou

tput

vol

tage

(V)

Re

al

VD

1620

W

B7-R

67

St

atus

bits

of t

he

frequ

ency

con

verte

r

W

B7-R

68

Er

ror b

yte

of th

e co

nver

ter c

omm

unic

atio

n

W

B6-R

69

Acce

lera

tion

Bi

t

V118

0.0

RW

70

Con

stan

t mot

ion

Bi

t

V118

0.1

RW

71

Del

ay

Bi

t

V118

0.2

RW

72

STDW

(Ste

uerd

oppe

lwor

t)

Gen

erat

or in

pos

ition

Bit

V1

180.

3

RW

73

Sign

dis

tanc

e ge

nera

tor

(1=m

inus

)

Bit

V1

180.

4

RW

74

Sign

of s

ettin

g (1

=min

us)

Bi

t

V118

0.5

RW

75

In p

ositi

onin

g w

indo

w

Bi

t

V118

0.6

RW

76

New

pos

ition

ing

Bi

t

V118

0.7

RW

77

Mot

ion

rele

ase

0 Bi

t

V118

1.0

R

B4;5

-RW

78

Kommando- / Statustabelle

STDW

(Steuerdoppelwort)

Set z

ero

poin

t

Bit

V1

181.

1

R

B5

-W

Page 50: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Con

trolle

d Po

sitio

ning

with

Asy

nchr

onou

s M

otor

s in

clud

ing

HM

I Con

figur

atio

n

Rev

. A -

Endg

ültig

13.

05.2

003

50

/91

Copyright Siemens AG 2003 All rights reserved MA_0351_Gereg_Pos_Asynchron_DOKU_v00_e.doc

PrkNN.NN-N/A

Des

crip

tion

of th

e va

riabl

e N

atur

e an

d ty

pe o

f the

var

iabl

e Pr

ogra

m b

lock

s ha

ving

acc

ess

to th

e va

riabl

es (R

=rea

ding

,W=w

ritin

g Serial no.

Category Sy

mbo

lic N

ame

Com

men

t De

faul

t va

lue

Type

Fl

ags

DB

IN

IT

COM

M

DIA

G

POS

USS-

Kom

-m

unik

atio

n B&

B

79

Man

ual m

otio

n V1

fo

rwar

d ru

n

Bit

V1

181.

2

R

B5

-W

80

Man

ual m

otio

n V2

fo

rwar

d ru

n

Bit

V1

181.

3

R

B5

-W

81

Man

ual m

otio

n V1

rtn

run

Bi

t

V118

1.4

R

B5-W

82

Man

ual m

otio

n V2

rtn

run

Bi

t

V118

1.5

R

B5-W

83

Ref

eren

ce p

oint

sea

rch

Bi

t

V118

1.6

R

B5-W

84

Ope

ratio

n m

anua

l or

refe

renc

ing

Bi

t

V118

1.7

RW

85

0=U

nipo

lar 1

=Bip

olar

1

Bit

V1

182.

0

R

86

0=C

ontro

l onl

y ou

tsid

e w

indo

w 1

=Alw

ays

0 Bi

t

V118

2.1

R

87

Pow

er o

n re

fere

ncin

g

Bit

V1

182.

2

RW

B3-R

W

88

Mem

oriz

ing

sear

ch fo

r re

fere

nce

part

2

Bit

V1

182.

3

RW

89

Perfo

rmin

g se

arch

for

refe

renc

e pa

rt 2

Bi

t

V118

2.4

RW

90

Man

ual m

otio

n ch

ange

Bit

V1

182.

5

RW

91

Res

.

Bit

V1

182.

6

RW

92

To 0

.0 a

fter s

earc

h fo

r re

fere

nce

Bi

t

V118

2.7

RW

93

Dig

ital F

U O

n fo

rwar

ds

Bi

t

V118

3.0

RW

95

Dig

ital F

U O

n fo

rwar

ds

Bi

t

V118

3.1

RW

96

Kommando- / Statustabelle

STDW

(Ste

uerd

oppe

lwor

t)

Res

erve

Bit

V1

183.

2 bi

s V1

183.

7

97

Rang

e Ra

nge

in th

e da

ta b

lock

for t

he U

SS

com

mun

icat

ion

VB

1200

bis

VB

1600

RW

Page 51: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Con

trolle

d Po

sitio

ning

with

Asy

nchr

onou

s M

otor

s in

clud

ing

HM

I Con

figur

atio

n

Rev

. A -

Endg

ültig

13.

05.2

003

51

/91

Copyright Siemens AG 2003 All rights reserved MA_0351_Gereg_Pos_Asynchron_DOKU_v00_e.doc

PrkNN.NN-N/A

N

ote

1 Th

e co

mpl

ete

func

tiona

lity

of th

e po

sitio

ning

can

be

“ser

ved”

and

“mon

itore

d” v

ia th

e sh

own

com

man

d / s

tatu

s in

terfa

ce.

I.e. t

he a

pplic

atio

n co

uld

be s

erve

d an

d co

ntro

lled

by m

eans

of t

he d

igita

l inp

uts.

Th

e po

sitio

ning

func

tiona

lity

coul

d be

con

nect

ed w

ith a

n ex

istin

g pr

oces

s, e

.g. a

sto

p br

ake

coul

d be

con

trolle

d vi

a th

e Bi

t V11

80.6

(in

posi

tioni

ng w

indo

w).

Page 52: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …
Page 53: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 53/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Part B: Installation of the Sample Application

Part B of this document provides the reader with information on the following topics.

• how to install the sample application with all hardware and software components

• how to operate the application via the TP070

Page 54: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 54/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

5 Installation of Hardware and Software

On the basis of the components mentioned under chapter 2.2 the complete application (standard and application componetns) will be able to run immediately upon installation. The actual installation involves installing the SIMATIC hardware (chapter 5.1) and software (chapter 5.2).

Note With respect to the installation it is assumed that the MICROMASTER 420 with BOP (Basic Operator Panel) is used. The AOP (Advanced Operator Panel) and the PC converter connection block are alternatives to the BOP and are not explicitly described.

5.1 Hardware configuration

For hardware components required we refer to chapter „2.2.1 Hardware components“. The hardware configuration consists of four parts:

• S7-CPU 226

• TP070

• MICROMASTER frequency converter MM420 with BOP (Basic Operator Panel)

• Motor type 1LA7 and mechanics with shaft angle encoder

! Note Here it will not be dealt with:

• how the shaft angle encoder is mechanically connected with the motor

• how the motor is mechanically linked to the connected process

Page 55: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 55/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

In the following the installation/connection of the HW components is described:

Table 5-1 Hardware configuration Step Focus Instruction

1 Modules on the top hat rail

Attach the MICROMASTER frequency converter and the S7-200 CPU to the top hat rail..

2

Connecting the shaft angle encoder with the integrated hardware counter of the S7 200 CPU

The encoder changing the movement of the mechanics into electrical impulses is connected with the fast counter (e.g. HSC0) of the S7-200 CPU. The counter HSC0 is used in the sample application. This assigns the inputs E0.0 and E0.1. Along with the additional input E0.2 the counter can be set back. Furthermore the shaft angle encoder requires an external supply voltage. The load current supply of the S7-200 CPU can be used for this. Wire the encoder and the CPU according to the following table:

Table 5-2 Assignment plan CPU shaft angle encoder

Serial no. Encoder

(Core color) Inputs/outputs of the CPU

1 Brown E0.0

2 Grey (dark) E0.1

3 Blue Load current supply (+)

4 White Load current supply (-) and weight

! Note

In case you use another counter than the one mentioned in the chapter, it will be possible that the assignment plan deviates. In this connection please read the description of the encoder and the manual of the S7-200 CPU.

Note 2

It is possible, that the count direction deviates (depending on encoder installation position). In this case, please swap both channels of the encoder (brown and gray cable).

3

Connecting the reference point switch and the end-position switch

Connect the end-position switch and the reference point switch according to the following assignment table.

Table 5-2 Assignment plan CPU – Reference point switch, end-position switch

No. Switch Inputs/outputs of the CPU

1 Lower end-position switch E0.3

2 Upper end-position switch

E0.4

3 Reference end-position switch

E0.5

4 Connecting the Touch Panels with the S7-200 CPU

The Touch Panel TP070 is connected with the S7-200 CPU by means of the MPI cable. The power supply of the device can also be made via the load current supply of the S7-200 CPU, provided that the maximum current is not exceeded by that.

Page 56: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 56/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Step Focus Instruction

5 Connecting the S7-200 CPU with the MICROMASTER frequency converter

The MICROMASTER is connected to the S7-200 CPU via a PROFIBUS cable. At the MICROMASTER the cable is connected with the terminals 14 (red) and 15 (green). At the CPU side there is the usual PROFIBUS connector

Fig. 5-1 Connection sample MICROMASTER 420

6 Connecting the

asynchronous motor to the MICROMASTER frequency converter

At the MICROMASTER the motor is connected to the three terminals U, V and W.

Take care that the output inductors will have to be used in the event of longer cables between the MICROMASTER and motor.

Fig. 5-2 Connection motor with MICROMASTER

Page 57: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 57/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

7 Connecting the

MICROMASTER and the S7-200 CPU to the power supply

After all the wiring has been carried out properly, the configuration can be connected to the power supply.

MICROMASTER frequency converter: Depending on the features of the connected current network the MICROMASTER may require input filter. This also applys to the operation of the MICORMASTER at a FI protective switch. At the connected current network, the MICROMASTER frequency converter is to be protected correctly .

Fig. 5-3 Connection of the MICROMASTER to the power supply.

Fig. 5-4 Recommended protective network of the MICROMASTER 420 Legend: Sicherung := fuse; einphasig := single-phase; Schutz := protection; Optimaler Filter := optimal filter; Schirmung := shielding

S7-200 CPU

In the application, an AC S7-200 CPU is used for the connection to a usual 230V power supply.

Fig. 5-5 Network connection S7-200 CPU

!

Important Please take care that the protective conductor at the S7-200 CPU (at the terminal strip for the power supply) and at the MICROSMASTER 420 (at the blackplane sheet) has been correctly connected.

Page 58: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 58/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

5.2 Installing the software

• The installation of STEP7-Micro/Win, the TP-Designer and the MICROMASTER installation program “Starter“ is not described here. Installation takes place in the familiar Windows environment and is self-explanatory.

• The applications software and projects are to be transferred to the S7-200 CPU, the Touch Panel TP070 and the MICROMASTER 420.

Note It is assumed here that all components have been installed correctly and connected to the power supply.

5.2.1 Transferring of the application code to the S7-200 CPU

Step Focus Instruction

1 Installing the STEP7-Micro/Win software Please install the STEP7-Micro/Win software according to instruction

2 Opening of the project Open STEP7-Micro/Win – application code in the program (open file).

3 Setting the communication connection Set your link path to the S7-200 CPU in STEP7 Micro/Win (in the operation tree under communication).

4 Creating the cable connection Create the cable connection between S7-200 CPU und the PC/PG . Make sure that this corresponds with the features being already set under step 3!

5 Compile and load everything into the CPU Click the button “compile everything” in the task bar and then the button “load in CPU”

5.2.2 Transferring the application code to the Touch Panel TP070

Step Focus Instruction

1 Installing the TP-Designer Please install the TP-Designer software according to instruction.

2 Opening of the project Open the TP configuration file in the program (open file).

3 Setting the communication connection Set your link path to the S7-200 CPU in the TP-Designer (setting communication PC to TP communication).

4 Creating the cable connection Create the cable connection between the Touch Panel TP070 and the PC/PG. Make sure that this corresponds with the features being already set under step 3!

5 Compile and load everything into Touch Panel laden

Click the button “compile” in the task bar and then the button “load in TP”

Page 59: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 59/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

5.2.3 Parameterization of the MICROMASTER 420

For the parameterization with the parameter list (list of the system-specific values for the MICROMASTER 420, please cf. the following table) the hardware components shown in the following picture are required at the MICROMASTER.

Fig. 5-6 BOP for the parameterization of the MICROMASTER 420 frequency converter

In the following the variation for parameterizing the MICROMASTER frequency converter is dealt with in detail

Table 5-3 Parameterizing with AOP or BOP Step Focus Instruction

1 Fixing of BOP or AOP Remove the shutter of the MICROMASTER and fix the BOP or the AOP.

2 Parameterizing Enter the parameters one after the other into the following Parameterliste.

The parameter list is stated below. When using a BOP or AOP (Basic Operator Panel oder Advanced Operator Panel) you can enter the parameters one after the other.

Schritt Parameter Index Wert (zu parametrieren)

Kommentar

1. P0003 3 Access step

2. P0010 30

3. P0970 1 Startup parameters on factory defaults

4. P0010 1 Quick Commissioning

Page 60: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 60/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Schritt Parameter Index Wert (zu parametrieren)

Kommentar

5. P0100 0 Europe 50Hz P in kW

6. P0304 Rated Motor Voltage

7. P0305 Rated Motor Current

8. P0307

Typenschild des Motors

Rated Motor Power

9. P0310 Rated Motor Frequency

10. P0311 Typenschild des

Motors Rated Motor Speed in rpm

11. P0700 5 Selection of Command Source

12. P1000 5 Selection of Frequency Setpoint

13. P1080 0,20 Hz Min. Motor Frequency

14. P1082 50Hz Max. Motor Frequency

15. P1120 0,00 Ramp-Up Time

16. P1121 0,00 Ramp-Down Time

17. P3900 1 End Quick Commissioning

18. P0003 3 Access step

19. P2000 50.00 Reference frequency 50 Hz (1 to 650 Hz)

20. P2009 0 0 USS normalizing 0 to 65535 ms

21. P2010 0 7 Speed of data transmission 19200 baud

22. P2011 0 1 Adress (Slave)

23. P2012 0 2 USS PZD-length

24. P2013 0 127 USS PKW-length

25. P2014 0 300

Communication monitoring Value 0 is not being monitored; if you have to modify this value, the SPS will have to start the execution of USS protocol previously, as otherwise error 72 appears. You will also have to modify the value with the arrow downwards, as the arrow up would be the first value 1 ms causing an immediate error message.

26. P0971 1 Protect the data in the E²PROM

! Important The parameter (P0304-P0311) for the motor data must be adjusted to the respectively used motor.

Note After parameterizing the MM it is recommended to check the direction of encoder and MM. To do this, specify a small inching setpoint, e.g. 5 to 10%. Then the drive is moved in one direction in inching mode. The actual value of the position must be changed according to the direction or rotation, i.e. reduce at counterclockwise operation. If this is not the case, either both track signals of the incremental encoder, or two phases (e.g. U and V) of the motor must be exchanged. Clockwise operation is referred to the motor shaft moving to the top right while looking from the load side onto the motor shaft, see below figure.

Bild 5-1 Clockwise operation

Page 61: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 61/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Note

Parameterization with PC via a serial interface A further possibility to parameterize the MICROMASTER is provided via a serial connection to a PC/PG.

Step Focus Instruction

1 Fix a serial interface

Remove the shutter of the MICROMASTER and fix new shutter with a serial interface.

2 Parameterizing software „Starter“

Install the parameterizing software “Starter” on the PC/PG according to the instructions.

3 Connecting Create cable connection between the serial interface of the MICROMASTER and the PC/PG.

4 Looking for online drives

Select the menu item “look for online drive” in the welcome wizard

Fig. 5-7 Configuration assistant

In the course of the assistant always follow the instructions.

5 Enter parameter

Navigate into the expert list of all parameter, as shown in the following illustration and enter the parameter mentioned below.

Fig. 5-8 Navigation expert list

Copy the data on the EEPROM after the parameters have been entered. They are then stored safely against voltage drop.

Page 62: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 62/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

6 Operation of the application TP 070

Each of the operating and monitoring figures and each of the values and parameters is explained.

Preconditions The conditions described in the chapter “Installing Hardware and Software“ (chapter 6) are to be complied with and all devices have been switched on.

6.1 Providing the S7-200 CPU program with parameters

For operating the application it is essential that it is provided with system-specific parameters (resolution encoder, features of the mechanics). For this reason, the navigation bar at the bottom of the screen contains the item “Parameter”. If this item is selected, you will move into the following figure (Figure 6-1). The category parameter is divided in three figures:

• Movement (chapter: 6.1.1)

• Mechanics/encoder (chapter: 6.1.2)

• P-I-controller (chapter: 6.1.3) Typical default values of the parameters are stored in the data block of the S7-200 CPU. Please see chapter 4.2.3. The parameters of the individual figures are explained in the following:

Page 63: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 63/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

6.1.1 Parameter movement

Figure 6-1 TP070 Figure “Parameter – Movement“

The parameter speed max. (mm/s) contains the value being admissible as maximum speed for the materials-handling technology (e.g. low air pressure encoder). Thus the maximum motor drive being limited upwards.

!

Note The value of the speed of the materials-handling technology (e.g. the low air pressure encoder) is subject to the features of the mechanics and the resolution of the encoder. The modification of these values will automatically result in a modification of the actual speed. At worst, the given value for speed max. (mm/s) can be too high. This can cause damages to the mechanics.

Values are entered in both fields acceleration (mm/s²) and deceleration (mm/s²) which should avoid sudden changes in the number of revolutions and speed. The fields with the fixed value contain the speeds for a manual procedure (jog mode) and for the search of reference. The manuel speed value slow (%) corresponds to the slow speed, the manuel speed value fast (%) to the fast speed. A fixed value of 100% corresponds to the speed max. (mm/s), explained in the previous chapter.

Page 64: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 64/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

6.1.2 Parameter mechanics/encoder

Fig. 6-2 TP070 figure “parameters – mechanic/encoder” The first field on this figure contains the value for the resolution of the use shaft angle encoder in increments per revolution. For this value the physical resolution is required (without edge evaluation which is carried out in the counter of the S7-200 CPU).

The used mechanics is described by the value of the parameter distance per revolution. In this sample application we proceed from a linear axis.

Note The two parameter increments per revolution and ditance per revolution directly influence the control behavior and the speed of the positioning. Wrong values may damage the mechanics.

The fields with the values of the parameter position A (mm) and position B (mm) contain defined positions which should be approached by the materials-handling technology (e.g. low air pressure encoder). These are absolute specifications starting from the zero point.

The parameter reference offset (mm) indicates the distance the zero point has been shifted from the reference point.

Page 65: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 65/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

6.1.3 Parameter P- I- Controller

Fig. 6-3 TP070 Figure “Parameter – P- I- controller“

The parameters P-amplification, I- amplification und correction value are controller-specific parameters. These values are to be adjusted to the respective system. The values and the correction value are factors and are the actual P-factor of the position controller. The correction value provides for the scaling of P-Reinforcing.

P-factor = P-Reinforcing x correction value Further information on the P-I-controller can be found on page 32 under “Setting of the setpoint velocity for the motor”.

In addition, there is a switch “Permanent controlling“ moving between the mode “Always positioning” and “Controlling inside the positioning window off“.

Note

In case the modus “Permanent controlling“ is used, the motor will require a forced air cooling. In the mode “Controlling inside the positioning window”, it is quite possible to use a stop brake.

Page 66: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 66/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

6.2 Automatic mode and jog mode

The actual operation of the application is made in the two figures “Automatic“ and “Jog mode“. In the following sections they are explained in detail.

6.2.1 Automatic

Fig. 6-4 TP070 Figure “Automatic operation“

For the operation there are three elements in this figure. The two positions A and B are selected by means of the respective sensors.

For activating the position control, the Closed loop control on is to be given. When this is set and a position is selected the motor immediately starts to accelerate. In addition the following values are shown.

• position (mm)

• Setpoint (%)

• speed (Setpoint velocity of the motor)

DANGER Overloading the MICROMASTERS and/or the motor can cause an inadmissible status of the position controller! This situation is to be avoided and must be considered during dimensioning MICROMASTER and motor!

Note If a position is reached, in which a situation limit switch becomes active, then the automatic controller release is durably closed. The barrier is driven waived into manually over the switch of point of reference back into the permissible range.

Page 67: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 67/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

6.2.2 Jog mode

Fig. 6-5 TP070 Figure “Hand Ctrl.“

The operation in the jog mode figure can be roughly divided in two categories.

• The first category contains the manual procedure, i.e. it is possible to operate the position of the materials-handling technology manually. For activating the jog mode the Closed loop control on (functionally identical with the controller enable in the figure Automatic) is to be taken. The operating elements are self-explanatory.

▪ Slow forward run ▪ Slow return ▪ Fast forward run ▪ Fast return

The parameterizing of both speeds for this mode has already been dealt with in chapter “6.1.1 Parameter movement”.

• The second category contains the operating elements dealing with the reference point and the zero point:

▪ Reference point search looks for the reference point switch and puts it here to the zero point (the zero point shift is taken into account).

▪ Setting of zero point, puts the counter at the current position to 0.0. The following details are also illustrated:

• Position (mm)

• Setpoint (%)

• speed (Setpoint velocity of the motor)

Page 68: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 68/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Note If an end-position switch was passed over, the direction of the end-position switch that was passed over is also blocked for manual operation. If for example the lower end-position switch was passed over, the negative direction (backwards) cannot be manually operated.

Note For starting the search for reference it must be ensured, that the current position has a positive distance from the reference point. The search for reference always occurs in negative direction.

6.3 Diagnosis values of the MICROMASTER 420 frequency converter

For greater clarity and for the structure of the diagnosis functions, the figure “Diagnosis is divided in two individual categories.

6.3.1 Status values of the MICROMASTER frequency converter and errors in the USS communication

Fig. 6-6 TP070 Figure “Diagnosis - Status“

The right part of the figure contains selected status information of the frequency converter. An active status is represented as “pressed button” but is not operable.

▪ Ready to operate: The MICROMASTER is switched on and ready.

▪ Ready for start: The MICROMASTER is waiting for the “signal motor on” and a setpoint velocity value of the motor

▪ Operation active: Motor is running.

Page 69: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 69/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

▪ Drive warning: There is an error in the drive (MM420).

▪ Overload drive:The motor is not overloaded.

▪ Overload MICROMASTER: The MICROMASTER is not overloaded.

▪ Current limitation: The output current is not limited.

The error bytes of the USS communication to MM4 are represented on the left top of the figure. If value “0” is shown, no error has been occurred. For identifying occurred errors the following table contains the error codes:

Error code Error description

0 No error occurred 1 Drive does not react. 2 The response of the drive contains a checksum error

3 The response of the drive contains a parity error

4 Error caused by a failure of the user program

5 Invalid command

6 Invalid drive address

7 The communication interface has not been set up for the USS protocol

8 The communication interface is processing another operation

9 The given speed of the driving motor is outside the range

10 Wrong length of the drive’s response

11 The first sign of the drive’s response is wrong

12 The length sign in the response of the drive is not supported by the USS operation

13 Reaction of the wrong drive

14 Wrong DB_Ptr address

15 Wrong parameter number

16 An invalid protocol has been selected

17 USS is active, modifications are not allowed

18 An inadmissible baud rate has been given

19 No communication: the drive is not active

20 The parameter or the value in the response of the drive is wrong or contains an error code

21 Instead of the required word value a double word value has been output

22 Instead of the required double word value a word value has been output

Page 70: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 70/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

6.3.2 Reading the process values from the MICROMASTER

Fig. 6-7 “TP070 Figure Diagnosis – Process values“

The diagnosis figure process values contains a selection of process values from the MICROMASTER. Only the most important have been chosen as example. In order to save cycle time in the user program of the CPU, an updating will only be carried out in case of one changeover into the diagnosis figure process values and each time the button “process values“ is pressed again. The fields only contain “instantaneous exposures” of the read values.

Note A cyclical reading and illustration of the value is possible, provided a low cycle time and high positioning accuracy is not important. The following is a brief comment on the illustrated process values:

▪ Output voltage MICROMASTER (V): Contains the amount of the output voltage of the MICROMASTER In case the motor is in a brakeless stillstand, the value will be 0 V.

▪ intermediate circuit voltage MM (V): The link voltage in the converter is usually about 310 V (on 230V supply voltage).

▪ Output current MICROMASTER (A): In the event that this value is higher than the maximally allowed motor current, than this will be limited. When the MICORMASTER is parameterized, the maximum motor current is fixed as a parameter.

▪ load MICROMASTER (%):

Page 71: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 71/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

▪ Temperature MICROMASTER (%): Contains the value of the converter temperature.

▪ Drive load (calculated, I²t) (%): The workload of the converter is calculated by means of the recorded current and time. If this value exceeds 100% the motor will be switched off. The converter displays an error.

6.4 Modification of the system settings at the TP070

Fig. 6-8 TP070 Figure “System settings“

• The display contrast can be modified by means of the buttons contrast + and contrast -.

• The connection status is influenced by the two sensors online and offline.

• If it is necessary to clean the screen, the button Cleaning screen will have to be pressed beforehand. This deactivates the screen which is sensitive to touch.

• A calibration ensures the congruence between the invisible raster of the touch screen and the actually optical display. These are calibrated by pressing the button Calibrate screen.

• By pressing the button Serial upload a new TP070 project can be loaded on to the touch panel.

Page 72: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 72/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Part C: Program Description

Objectives of Part C: The purpose of this section is to

• explain the code details of some core elements in the program

• give instructions where extensions are appropriate

Preconditions This is not an introduction into STEP7 Micro/Win language AWL, KOP or FUP. Readers should be familiar with the basics of these languages. Before reading the description of the code, it may be useful to read the chapters in part A2.

Page 73: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 73/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

7 Explanations on the STEP7 Program

7.1 OB1 (description of the block)

In the following section you can see how the calls in OB1 are functioning program technically: In the following figure it is apparent, that the subprograms INIT (SBR0) and Comm_Diag (SBR9) are called.

Fig. 7-1 Network 1 and 2 in the OB1 In network 1, the subprogram INIT (SBR0) is called once in the first cycle. In this subprogram, initializations of the fast counter, the time interrupt and the USS communication are processed. In network 2, the program Comm_Diag is called for each cycle, it performs the communication and the evaluation of the reference and end-position switches.

Page 74: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 74/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

7.2 INIT (SBR0), (description of the block)

Fig. 7-2 Network 1 and 2 in INIT (SBR0) In network 1 the fast counter is initialized for the evaluation of the shaft angle encoder. For the temporal call of the interrupt program the time value is passed on in milliseconds (as byte).

Page 75: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 75/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Fig. 7-3 Network 3 to 15.24 cm INIT (SBR0) In the third network, the interrupt program is set up, i.e. an event is assigned. (Event 10 means temporal execution with time configured in SMB34) Network 4 provides the time value of the SMB34 as integer value. In network 5, the communication from CPU to converter is initialized. For error confirmation at the inverter a time is started in network 6 after CPU startup, after it has elapsed an Error – Acknowledge is send to the MICROMASTER.

Note If you configure your MICROMASTER with other address or speed parameters, these parameters will have to correspond to those at the initializing call of the USS communication.

Page 76: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 76/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

7.3 Comm_Diag (SBR9), (description of the block)

Fig. 7-4 Network 1 to 3 In the first network, the positioning block is instructed to transfer bipolar set values to the MICROMASTER. The second network switches the inverter on in the various operating phases. In the third network, the Acknowledge is transmitted to the USS communication block after the time has elapsed.

Page 77: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 77/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Fig. 7-5 Network 4 to 6 The USS communication block is called in network 4. Bits transferred in the status word are negated in networks 5, 6, and 7. They hence need not be displayed as negated values.

Page 78: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 78/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Fig. 7-6 Network 7 to 9 The networks 8 to 14 are nearly identical, here a value is respectively read out of the MICROMASTER. This procedure is triggered by a Bit (M0.6) in the (first diagnosis) network 8. After the communication of the first value is completed, all following values are read out of the MICROMASTER in a step sequence. At the end of the step sequence the “start“ bit (M0.6) is set back. The number of the diagnosis values and the repeating speed of the diagnosis can adjusted individually. The diagnosis values in the application are only shown as examples. The following is read:

Page 79: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 79/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

No. Net-work Diagnosis value Parameter of the MICROMASTER 420

1 8 Output voltage P0025

2 9 Link voltage P0026

3 10 Output current P0027

4 11 Drive workload P0036

5 12 Drive temperature P0037

6 13 Motor workload P0034

Note A permanent reading of process (diagnosis) values can result in an extreme load of the communication between the MICROMASTER 420 and S7 200 CPU. A constantly fast communication, which is required for a precise position control, does not take place anymore. This “effect” has a decisive influence on the control behavior. Unter Berücksichtigung des „Effektes“ aus dem oben aufgeführten Hinweis wird das Lesen der Diagnosewerte nur bei „Bedarf“ ausgeführt. D.h. explizit, nur wenn das Bild Prozesswerte aufgerufen wird oder wenn der Taster Prozesswerte erneut betätigt wird.

Fig. 7-7 Network 10 to 11

Page 80: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 80/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

See text on page 80, networks 8 to 14.

Fig. 7-8 Network 12 to 13 See text on page 80, networks 8 to 14.

Page 81: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 81/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Fig. 7-9 Network 14 to 18 In network 15 the reference point switch is evaluated and only transferred to the positioning switch as long as the search for reference is active. In the last following networks the end-position switches are evaluated. If an end-position switch becomes active (i.e. is passed over) this sets a marker. This marker blocks the controller enable and the manual procedure in the direction in which the end-position switch was passed over. The marker of the end-position switches are set back by the reference point switch.

Page 82: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 82/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Fig. 7-10 Network 19 and 50.80 cm INIT (SBR0)

7.4 POS (positioning block, parameter)

The interrupt program POS is not called cyclically in the OB1, but time controlled (in the application example every 30 ms).

Note You will find the code with detailed comments in the application project „CODE_Lagereglung_e_.mwp“. A description of the command interface is shown in chapter 4.2.4.

7.5 Blocks for USS communication (parameter)

Note Standard blocks have been used for the communication between the MICROMASTER 420 and S7 226 CPU. You will find a documentation of these blocks in the manual of the S7 200 CPU or in the Online help of the S7 Micro/Win 32.

7.6 Data block

You will find a detailed description of all used variables including the data block in chapter 4.2.4.

Page 83: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 83/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

8 Changes in the STEP7 program

In the following you are given some tips and instructions how to adjust the program to you specific requirements.

8.1 Using a linear or round axis as well as modifying units//scales

This chapter will answer the question if and how a round axis can be employed instead of a linear axis, and how other “mechanics” can be adjusted in the application project. In case a round axis is employed instead of a linear axis, then this will only apply to:

• The physical units in the TP Designer Project of the Touch Panel TP070 (visualization, only purely optical, no functionality)

• The parameter travel per revolution is to be changed into the relevant degree specification or into the new, desired unit.

Note The modification of the parameter can have decisive influences on the control behavior of the application.

Modifying physical units in the TP-Designer Project Step Focus Instruction

1 Opening the project Open in the TP-Designer the „*.tpf“ project. added to the application. Go to file open to do this..

2 Modifying the units

You can adjust the units in the intended text boxes in the figures ‘automatic’, ‘jog mode’ and ‘parameterizing 1/2/3’. The following units are for the parameters:

• Setpoint (automatic)

• Setpoint position (jog mode)

• Speed maximum (parameter 1)

• Acceleration (parameter 1)

• Delay (parameter 1)

• Travel per revolution (parameter 2)

• Route mark position A (parameter 2)

• Route mark position B (parameter 2)

• Reference point shift (parameter 2) Positioning window (parameter 3)

3 Securing and new transferring

Store the modifications (under file store). Compile the project and transfer it afterwards to the Touch Panel TP070.

Page 84: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 84/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Modifying the parameter “distance per revolution” Step Focus Instruction

1 Opening the project Open the application project in S7 Micro/Win 32

2 Modifying the ratio

Move to the view of the data block. For that purpose you click on the data block in the operation tree. Here you look for the comment heading Mechanics / Encoder. There you will find the entries of the two variable with comments:

• Ttravel per revolution

• Factor of the display compared with metrs. Modify the settings of the default values according to your requirements-

3 Securing and new transferring Restore your project, compile it and load it into the CPU.

8.2 Using other inputs for the encoder (fast counter)

This chapter answers the question:

• How can I use other inputs for the connection of my shaft angle encoder?

Using other inputs for the shaft angle encoder In case the digital inputs of the counter are already assigned to an existing project, another free counter of the CPU may be used, provided that the counting mode 101 is supported. However, the variable for the access to the counter will have to be corrected in the entire S7 Micro/Win project.

Table 8-1 used inputs of the counter Serial no.

Fast counter Assigned inputs

1 HSC0 E0.0, E0.1, E0.2

2 HSC1 E0.6, E0.7, E1.0, E1.1

3 HSC2 E1.2, E1.3, E1.4, E1.5

4 HSC3 E0.1

5 HSC4 E0.3, E0.4, E0.5

6 HSC5 E0.4

The S7-226 CPU owns, e.g., 5 counters, HC0 to HC5, from these only the counters HC0, HC1, HC2 and HC4 support the mode 10.

1 A/B counter with quadruple counting speed, no start input, reset input

Page 85: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 85/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Step Focus Instruction

1 Opening the project Open the application project in S7 Micro/Win 32

2

Move into the positioning block and adjust the variables

Move into the operation tree and select the INIT (SBR0) block. There you go to network 2. Here you modify the variables/values marked in the following figure.

Fig. 8-1 Network 2 in the INIT block

Please modifiy in network 5 (in the positioning) the following variables on the counter used by you.

Fig. 8-2 Network 5 in the positioning block

3 Securing and new transferring Restore your project, compile it and load it into the CPU.

Page 86: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 86/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

8.3 Transferring analogously the setpoint for the MICROMASTER frequency converter

The setting for the MICROMASTER 420 calculated by the positioning block is directly transferred in the application to the MICROMASTER 420 via the communication block (via USS protocol). If it is necessary to configure a (very) dynamic control it can be advantageous to transfer the setting to the MICROMASTER analogously. Therefore the communication time between the S7-226 CPU and the MICROMASTER 420 is dropped, In this case the S7-226 CPU would additionally require an analog output module. The MICROMASTER has an analog value input as standard. The structure could be as follows:

Fig. 8-3 Possible modification of the application (transfer of the setting via an analog value)

This is only an overview of the necessary modifications in the S7 Micro/Win project and not a detailed description. The USS communication can be neglected, consequently it is not necessary to use the library blocks for this communication. The MICROMASTER 420 is exclusively controlled by the digital outputs and anolog values for the setpoint velocity. The setting being calculated in the positioning block is to be transferred to the analog initial word of the analog expansion module. The following data are to be transferred to the MICROMASTER via a direct wiring.

• Motor ON/OFF (binary)

• Direction (binary)

• Setting (analog)

Page 87: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 87/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

8.4 Using other frequency converter of the MICROMASTER 3XX or 4XX family

Generally, only the replacement of the MICROMASTER 420 by a MICROMASTER 3XX results in modifications of the actual S7-Micro/Win application code. When calling the USS communication library it has to be taken care in OB1 (network 7) that the correct value for the parameter “Type“ is transferred. Please see the following picture:

Fig. 8-4 Network 7 in OB1, adjustment of the parameter “Type“ for the communication with a MICROMASTER 3XX or 4XX

The input type (drive type) sets the nature of the drive. In case of a drive MICROMASTER 3XX (or earlier) you set 0 for “Type“. In case of a drive MICROMASTER 4XX you set “Type“ to 1.

8.5 Moving to freely selectable or relative positions

In the following the procedure is described, if you want to move to a freely selectable position instead of the positioning between two defined points A and B.

Moving to freely selectable positions Step Focus Instruction

1 Opening the project Open in the TP Designer the „*.tpf“ project. added to the application Go to file open to do this.

Page 88: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Step Focus Instruction

2 Select figure Automatic Select the figure Automatic in the operation tree.

3 Deleting of operating elements

Delete the operating elements shown in the following figure

Fig. 8-1 Deleting of elements Legend: Reglerfreigabe := controller enable; Istposition := actual value; Stellwert := setting; Fahrt := travel;

4 Add input box

Then complete an input box and link this with the variable Neu_Pos (VD1120 in the S7 226 CPU).

Fig. 8-6 Add input box

3 Securing and new transferring

Store the modifications (under file store). Compile the project and transfer it afterwards to the Touch Panel TP070.

1.

2.

3.

88/91

Page 89: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 89/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Moving to relative positions This is only an overview of the necessary modifications in the S7 Micro/Win project and not a detailed description. Upon each executed positioning and with a rising edge of the status bit in the “positioning window”, the command “set zero point” can be given. This means that upon each positioning the current position is “0”. Each new positioning is approached from the reference point of the current position, thus resulting in a “simulated” relative positioning.

Page 90: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 90/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

8.6 S7-Application code for own project use

Note An S7-Micro/Win library cannot be generated from the application code, as the core module of the application code is located in a time-interrupt program. Here the principle procedure is described, how to still use the core module of the application in your own project. Schritt Fokus Aktion

1 Open the project Open the production master of the application project via ‘File open’ .

2 Copy interrupt program into clipboard

3 Open new/own project

Open the work copy of your own project via “File open“ or create a new one via “File new”.

4 Insert Interruptprogram from clipboard

5 Change to Application project Change to Application project

Page 91: Controlled Positioning with Asynchronous Motor … Parameter movement ... MICROMASTER 420, asynchronous motor type 1LA7 (please cf. chapter 1). In case you use exactly these …

Controlled Positioning with Asynchronous Motors including HMI Configuration

Rev. A - Endgültig 13.05.2003 91/91

Cop

yrig

ht

Sie

men

s AG

200

3 A

ll rig

hts

rese

rved

M

A_03

51_G

ereg

_Pos

_Asy

nchr

on_D

OKU

_v00

_e.d

oc

PrkN

N.N

N-N

/A

Schritt Fokus Aktion

6 Copy symbol table USR1 to clipboard

7 Change to new/own project Change to new/own project

8 insert symbol table USR1 from clipboard

9 copying of USR2 and USR3 Repeat the steps 5-8 for the symbol tables USR2 and USR3