You are on page 1of 36

ACOPOS Smart Process Technology

TM446

Introduction

Requirements

Training modules:

TM410 - The Basics of ASiM TM445 - ACOPOS ACP10 Software

Software:

AS 2.5 or later / ACP10 software 1.100 or later

Har dware:

None

TM446

ACOPOS Smart Process Technology y

Introduction

Table of contents

1. INTRODUCTION 1.1 Objective 2. GENERAL 3. CONCEPT 3.1 SPT functions 3.2 Implementation 3.3 Param eter update of SPT functions 3.4 Processing 3.5 Diagnostics 4. FUNCTION OVERVIEW 4.1 Variables 4.2 Constants 4.3 Available functions 4.4 Special fun ctions 5. EXERCISES 6. SUMMARY 7. APPENDIX 7.1 Solutions

4 5 6 8 8 11 14 15 16 18 18 18 19 28 30 31 32 32

ACOPOS Smart Process Technology

TM446

Introduction

1.

INTRODUCTION App lication scenarios in which a minimum reaction time is required are becoming mo re and mor e comm on (e.g. print mark control). Howe ver, highly complex calculations (e.g. offset compensation) still have to be mad e to prevent a loss of accuracy at high spee ds. This is exactly why B&R integrated S mart P rocess T echnology (SPT) fun ctions in the drives. SPT functions run directly on the ACOPOS processor. This gives the user direct acc ess to the functionalities of the ACOPOS at software level. In addition to pure SPT netwo rks, SPT fun ctions can also access other ACOPOS information and fun ctionalities. This opens up endless po ssibilities for operating the ACOPOS without the overhead on the PLC or the network delay affecting the reaction time.

Fig. 1: Printer with print mark correction

I/O plug-in cards for the ACOPOS supplement the SPT fun ctions. They are directly accessed using the SPT fun ctions, which make s it po ssible to control e.g. drum sequen cers at high speed and with high precision. Thanks to a wide ran ge of functions, SPT allows the user to implement even highly complex fun ctionalities with minimum cycle times.

TM446

ACOPOS Smart Process Technology

Introduction

1.1

Objective You will receive an overview of how and when SPT functions are used. You will learn how to use SPT fun ctions on the ACOPOS and how they are configured in Automation Studio. You will be able to move fast-reacting par ts of the application on the ACOPOS to create a high-performance application.

Fig. 2: Objectives

ACOPOS Smart Process Technology

TM446

General

2.

GENERAL Smart Process Technology can be viewed as a sort of sepa rate programming language. SPT functions are prefabricated, se parate fun ction units on the ACOPOS that can be used freely by the user. SPT functions are "programm ed" in parameter tables using ParIDs because they run at a very deep level to spare unneces sary overhead. The functions are also inter-connected with the help of ParIDs by using e.g. the output ParID of a fun ction as value for the input of another SPT fun ction. These inter-connections can mak e it po ss ible to create extremely powerful networks.

Fig. 3: Example of a complex SPT network

TM446

ACOPOS Smart Process Technology

General

These networks are available in Automation Studio as parameter lists, however it is recomme nde d to first sketch the SPT connections on paper before starting with programming. This helps to maintain a clear and organized overview, which also makes diagnostics and fun ction testing much easier. The schematic diagrams in this document were created in Microsoft Visio .

Fig. 4: VISIO drawings for SPT network

The param eter table can be created once the ne twork has been designed on pap er . If necessary, an SPT network can also be distributed in multiple tables. Ho wever, this should only be done when multiple SPT networks, independent from ea ch other, are running on one axis. Note: Information ab out parameter tables can be found in the online help files under Automation Software: Automa tion Studio: Motion Components: NC data objects: ACOPOS parameter table

ACOPOS Smart Process Technology

TM446

Concept

3. 3.1

CONCEPT SPT functions In this manual the ARITH fun ction is used for explaining the functionality of the SPT fun ctions. It is basically used for executing the four basic arithmetical operations.

3.1.1 Inputs/outputs SPT functions contain a number of inputs in accordance to the fun ction, a separate me mor y area and a respective numb er of out puts. Internal data cannot be accessed. The inputs and outputs are app lied as ParIDs.

Fig. 5: Diagram ARITH: Inputs/outputs

Fig. 6: ARITH inputs/outputs

TM446

ACOPOS Smart Process Technology

Concept

There are essentially two type s of inputs and outputs when using SPT fun ctions. The ParID is defined either with an actual value or with a pointer. Pointer means that a target or source ParID is specified instead of a numerical value.

Fig. 7: Diagram ARITH: Pointer

Fig. 8: ARITH pointer

Note: The following as pect s indicate a pointer in the pa rameter table: "Parameter ID of " in the description "_PARID" at the end of the ParID definition

Note: A detailed description of the inputs and outputs of an SPT function can be found in the online help files under: Automa tion Software: Automa tion Studio: NC Software: ACP10: ACOPOS drive functions: Function name: Parameter IDs

ACOPOS Smart Process Technology

TM446

Concept

3.1.2 Instances Every SPT function requires its own memor y area on the ACOPOS. This memo ry is limited and thats why ea ch function type has a maximum of eight instances (instance 0 7). Which instance is us ed by which fun ction is determined by the number attached to the ParID as "+X".

Fig. 9: Example of instances

3.1.3 Connections The inputs and outputs of the SPT functions can be linked with any ParID with the corresponding attributes (RD, WR, RD/WR). Linking mea ns that a ParID of a fun ction can be attached as a value to the ParID of another function. In addition to combine SPT fun ctions with each other, they can also be combined with "external" ParIDs. An "external" ParID is a ParID that is pr esent on the ACOPOS but not part of an SPT fun ction.

Fig. 10: FB-FB and "external" link

10

TM446

ACOPOS Smart Process Technology

Concept

3.2

Implementation

3.2.1 Creating an instance An instance has to be cre ated in a parameter table before in ord er to use a fun ction. Creating means that the ACOPOS res erves memo ry for exactly this SPT function instance during startup and places it in cyclic processing. The SPT functions are "created" using FUNCTION_BLOCK_CREATE (ParID 777). Any ParID of the function to be created can be specified as value for this ParID.

Fig. 11: Parameter table with SPT Create

ACOPOS Smart Process Technology

TM446

11

Concept

3.2.2 Or der of execution An important as pect of SPT fun ctions is the processing se quen ce. Failure to properly follow this order can result in errors, which often take a long time of intensive searching to uncover. The ord er of execution is determined by the instancing sequence and always goes from top to bottom.

Fig. 12 : Order of execution

The SPT functions should be created in the order equal to the direction of data flow in the schematic diagram.

Fig. 13: Direction of data flow

12

TM446

ACOPOS Smart Process Technology

Concept

3.2.3 Configuring SPT functions After being instanced, the fun ctions must still be configured and connected. A new group is created for adding an SPT fun ction to the pa ram eter table. The desired fun ction and instance can now be selected from the dropdown list in the dialog bo x.

Fig. 14: Selecting the fun ction block

Fig. 15: Selecting the instance

After completing the dialog box, a new sub-folder, with the nam e of the SPT function, is add ed to the param eter table.

Fig. 16: SPT - parameter group

The function interface, contained in this group, can then be filled with values or pointers. All param eter s can be initialized right in the parameter table. Howe ver, it is also po ssible to write these values during run time (ParID (cyclic) Read, ParID (cyclic) Write). Note: When using the wizard to add an SPT function, all fun ction inputs and fun ction output pointers are ad ded to the group. Howe ver, the output ParIDs of an SPT fun ction are not automatically contained in the parameter group.

ACOPOS Smart Process Technology

TM446

13

Concept

3.3

Parameter update of SPT functions As mentioned earlier, SPT ne tworks run on the ACOPOS processor, independent of the main CPU. In most cas es, it is necessar y for SPT fun ctions to be updated from the application. Print mark control provides an example for this: The position values are read by the CPU and the correction value is calculated. The compensation distance is then transferred to the ACOPOS, which applies the correction. The print mark detection process can also be enabled/disabled and the numb er of non-detected print marks can be read. Com munication profile: Position value: Number of error s: Compensation distance: Enable input: Read cyclically by the CPU Read by the CPU Written cyclically by the CPU Set by the CPU

Fig. 17 : Parameter update diagram

Note: Further information ab out parameter updates can be found in the online help files under Automa tion Software: Automation Studio: NC Software: ACP10: ACOPOS drive func tions: Function name

14

TM446

ACOPOS Smart Process Technology

Concept

3.4

Processing

3.4.1 Cyclic processing The processing cycle of the SPT functions corresp onds to the po sition controller cycle and set value generator cycle. This means that each instanced SPT fun ction is called every 400 s. Only a limited number of SPT functions can be used on the ACOPOS because the processor must also pr ocess all othe r drive fun ctions on the ACOPOS in this time period . The number of poss ible ParIDs cannot be determined in ad vance. ACOPOS outputs the following error messag e if the processor is overloaded: Maximum cycle time exceeded - CPU load too high

3.4.2 Or der of execution for operating system fun ctions In addition to the SPT fun ctions, the process or also carries out other drive fun ctions. Knowing the order of execution can be important for app lications in order to avoid unne cessary dea d times. The ACOPOS pr ocesse s the drive functions in this order: Data acquisition Network communication SPT Cam profile automat Set value generator Virtual axis

ACOPOS Smart Process Technology

TM446

15

Concept

3.5

Diagnostics Diagnostics for software written in SPT has so me considerable differences from software written with other programm ing languages. Diagnostics are principally handled using NC Trace, mainly for time-critical ParIDs. ParID Read can also be used for slow changing values.

Fig. 18: Diagnostics Trace

Caution: If the ACOPOS processor is already under considerable load, Trace may no longer be able to record all 10 possible ParIDs for each axis because every additional ParID increases the process or load.

16

TM446

ACOPOS Smart Process Technology

Concept

In addition to the NC Trace, the network comm and Trace can also be helpful. It can be used to check the individual parameters transferred from the PLC to the ACOPOS for each block.

Fig. 19: Ne twork comm and trace

This method is very useful for: checking WHICH ParIDs were written WHEN checking the order of execution if, for example, multiple parameter tables are being used checking initialization values

ACOPOS Smart Process Technology

TM446

17

Function Overview

4. 4.1

FUNCTION OVERVIEW Variables In addition to the SPT fun ctions, ACOPOS also provides the use r with "free " memory space that can be used as data sink. There are three different data types INT(I2), DINT(I4) and REAL(R4). Just like functions, user variables must be created first and there are eight instances. Each instance consists of four variables with the same data type (variable number). Jus t one data type has to be created with FUNCTION_BLOCK_CREATE (ParID 777 ) so that the sa me instance can be use d with all data types. These variables can be called using the following ParIDs: VAR_I2_x+y VAR_I4_x+y VAR_R4_x+y xV ariable numb er (0-3) yInstance (0-7)

Fig. 20: Available variab les after creating an instance

4.2

Constants To cut back on the number of user variables, there are two predefined constants from the DINT data type that can be read, but not written. CONST_I4_ZERO CONST_I4_ONE (0) (1) (ParID 292 ) (ParID 310 )

18

TM446

ACOPOS Smart Process Technology

Function Overview

4.3

Available functions SPT currently contains 18 different fun ctions. 16 of these functions can be used with any drive. The two remaining functions can only be used in combination with special hardware. This is an overview with descriptions for the individual SPT functions:

Function name
ARITH LOGIC CMP EVWR MUX CAMCON VARITH DELAY BIT IPL MINMAX FIFO PID LATCH CURVE MPGEN DIO AIO Logic operations Comparator

Description
Arithmetic operations

Event controlled parame ter writing Multiplexer, switch Cam control Vector Arithmetic Dead time element Bit op erations Interpolator Minimum Maximum First-In, First-Out memory PID transfer function Event-controlled saving Curve function Motion Profile Generator Digital IO interface Analog IO interface

ACOPOS Smart Process Technology

TM446

19

Function Overview

4.3.1 ARITH This SPT fun ction us es an arithmetic function to link two input values. Arithmetic op eration is set as mode.

Fig. 21: ARITH

4.3.2 LOGIC This SPT fun ction is used to logically link up to four input values. Logical op eration is set as mod e.

Fig. 22: LOGIC

4.3.3 CMP The SPT function, CMP, creates a comp arator which can be configured. Comparison operation is set as mod e.

Fig. 23: CMP

Example: Ba sics, Part 1 Design and create an SPT network that prod uces a sum of two variables. A flag should be set for checking when this sum is greater than 25 and an Enable input is active.

20

TM446

ACOPOS Smart Process Technology

Function Overview

4.3.4 EVWR This SPT fun ction make s it po ssible to write a value from one ParID to another ParID. This happ ens when the value of the Event input is equal to the specified level, either edge-controlled or level-controlled.

Fig. 24: EVWR

4.3.5 MUX The SPT function, MUX, selects one of n inputs and connects it through to the output. The selection is controlled via a "selector input". The method of switching can be set using the mod e.

Fig. 25: MUX

ACOPOS Smart Process Technology

TM446

21

Function Overview

4.3.6 CAMCON The SPT function, CAMCON, switches an output depending on the po sition of a master axis. The on and off po sitions can be set with ea ch cam. The entire cam switching sequen ce for an output is called a track. The start pr ocedure and method of operation for cam control are defined using one mod e.

Fig. 26: CAMCON

Example: Ba sics, Part 2 A interval of 10,000 should be produced from the drive's set position. A value should be written to a new user variable if the flag is set: The value depends on the interval position: 0 5,000 5,000 10,000 Value of ARITH 100

Use the test window to check the fun ctioniality

22

TM446

ACOPOS Smart Process Technology

Function Overview

4.3.7 VARITH This SPT fun ction us es an arithmetic function to link two input vectors. The input and output values consist of an array of n similar elements. The arithmetic operation of these vectors is set as mode. Depending on the op eration, the result is provided as output vector or as scalar in the first element.

Fig. 27: VARITH

4.3.8 DELAY The DELAY fun ction forwards a value with a specified delay (dead time).

Fig. 28: DELAY

ACOPOS Smart Process Technology

TM446

23

Function Overview

4.3.9 BIT This SPT fun ction us es n input values and n internal op erands to execute different bit manipulations. The bit op eration is specified by the mod e.

Fig. 29: BIT

4.3.10 IPL The IPL function can be use d to perform an adjustment of different clocking systems. Interpolation use s existing data po ints x(tn) to predict additional values y(ti). Example: The 2 ms set value step s from the networ k are interpo lated and adjusted to the 400 s ACOPOS cycle. This fun ction block is mostly use d when entering set values via the CAN networ k and via Powerlink, if a master cycle of 400 s cannot be set.

Fig. 30: IPL

24

TM446

ACOPOS Smart Process Technology

Function Overview

4.3.11 MINMAX Each cycle, the SPT function determines the current extreme value of all inputs. The ext reme value is set using the mode: As "Minimum" for the smallest value or as "Maximum" for the largest value.

Fig. 31: MINMAX

4.3.12 FIFO In its basic method of op eration, the FIFO fun ction is similar to a shift register. The data appe ars in the same sequen ce as it was enter ed. The first value en tered (First In) is also the first value read (First Out). Unlike the shift register, this procedure can run completely asynchronous in a FIFO (i.e. the output rate is not depe nden t on the input rate).

Fig. 32: FIFO

4.3.13 PID The SPT function creates a real PID controller which can be configured (PID transfer function). This Proportional Integral Differential controller with delay and anti-windup is constructed in add itive (parallel) form.

Fig. 33: PID

ACOPOS Smart Process Technology

TM446

25

Function Overview

4.3.14 LATCH The value of a changing input value, is saved (i.e. "latched") when certain trigger events occur. The trigger signal must fulfill certain conditions su ch as : reaching a trigger edge within a certain window and with a certain signal width. In most cas es , the input value is a position value, with a corresponding po sition sensor as trigger event. Therefore, the LATCH function can be used for trigger positioning, length measu re ment and for print mark detection.

Fig. 34: LATCH

Example: Detail 1 Design and create an SPT network that latches the set po sition with a delay of 10 ms as soon as the current motor speed exc ee ds the 60 rev/min limit Do not use the ParID for speed to determine the spee d. Instead, determine the spe ed from the se t po sition (ADVICE: use the PID fun ction) Use the test window to check the fun ctionality

26

TM446

ACOPOS Smart Process Technology

Function Overview

4.3.15 CURVE The CURVE function provides a fun ction f(x) between input and output value. The function is implemented with cam profile polynomials. Therefore, all existing mechanisms for creating and downloading cam profiles can be used. Some of the area s of app lications for the CURVE function are: creating characteristic curves, cyclic offsets and implementation of correction fun ctions.

Fig. 35: CURVE

4.3.16 MPGEN The SPT function, MPGEN, creates a movem en t profile that can be configured. This profile corres ponds to a compensation fun ction, which can work as a position link or as a time-controlled movement.

Fig. 36: MPGEN

Example: Detail 2 Use the MPGEN time-dependent compensation profile to smo oth a jump of one half revolution on the additional slave axis (AUT_SL_ADD_AXIS_VAX1 (ParID 582)) of a virtual automat. Use the test window to check the fun ctionality

ACOPOS Smart Process Technology

TM446

27

Function Overview

4.4

Special functions These fun ctions can only be used if an I/O plug-in card is prese nt in the drive. The card is detect ed by the ACOPOS and the required SPT functions are automatically created. Therefore, this fun ction's instances do not have to be created in the pa ram eter table.

4.4.1 DIO This SPT fun ction is used to oper ate the drive's digital inputs and outputs. This fun ction is available for the following hardware: 8AC130.60-1 8AC131.60-1 8BAC0124.000 -1 Note: The function can vary depending on the hardware. Information is available in the online help files under: Automa tion Software: Automa tion Studio: NC Software: ACP10: ACOPOS drive functions: DIO Digital IO interface

4.4.2 AIO This SPT fun ction is used to oper ate the drive's analog inputs and outputs. This fun ction is available for the following hardware: 8AC131.60-1 8AC132.60-1 8BVxxxxxxx xx.xx1

Note: The function can vary depending on the hardware. Information is available in the online help files under: Automa tion Software: Automa tion Studio: NC Software: ACP10: ACOPOS drive functions: AIO Analog IO interface

28

TM446

ACOPOS Smart Process Technology

Function Overview

Note: Detailed information about the individual SPT functions and configuration can be found in the Automation Studio online help files under Automation Software: Automa tion Studio: NC Software: ACP10: ACOPOS drive functions: Function name

ACOPOS Smart Process Technology

TM446

29

Exercises

5.

EXERCISES Note: Practical exercises for the individual SPT functions can be found in the online help files under: Automa tion Software: Automa tion Studio: NC Software: ACP10: ACOPOS drive functions: Function name: Example

30

TM446

ACOPOS Smart Process Technology

Summary

6.

SUMMARY Now you know how to create the SPT fun ctions on the ACOPOS and how to configure and connect them to a network. The decision of whether to run the software remotely on the ACOPOS or on the PLC, depends on the desired reaction times and the load on the main CPU.

Fig. 37: Printer with print mark correction

If the decision is made in favor of SPT, the netwo rk is cre ated on paper. This helps maintain a clear and organized overview and allows you to more easily check and diagnose the network. In the even t that minor errors were made, you can use NC Trace to record up to ten parameters, ther eby minimizing the time nee ded for finding errors.

ACOPOS Smart Process Technology

TM446

31

Appendix

7. 7.1

APPENDIX Solutions

7.1.1 Basics, Part 1 (Section 4.3.3 ):

Fig. 38: Solution approach for Basics, Part 1

Fig. 39: Solution to Basics, Part 1

32

TM446

ACOPOS Smart Process Technology

Appendix

7.1.2 Basics, Part 2 (Section 4.3.6 ):

Fig. 40: Solution approach for Basics, Part 2

Fig. 41: Solution to Basics, Part 2

ACOPOS Smart Process Technology

TM446

33

Appendix

7.1.3 Detail 1 (Section 4.3.14 ):

Fig. 42: Solution approach for Detail 1

Fig. 43: Solution to Detail 1

34

TM446

ACOPOS Smart Process Technology

Appendix

7.1.4 Detail 2 (Section 4.3.16 ):

Fig. 44: Solution approach for Detail 2

Fig. 45: Solution to Detail 2

ACOPOS Smart Process Technology

TM446

35