Está en la página 1de 44

ACOPOS ACP10 Software

TM445

Introduction

Requirements

Training modules:

TM410 The Basics of ASiM

Software:

Automation Studio 2.5 Automation Runtime 2.80

Har dware:

None

TM445

ACOPOS ACP10 Sof tware e

Introduction

Table of contents
1. INTRODUCTION 1.1 Training guideobjectives 2. OPERATING AN AXIS 2.1 General 2.2 Registering an axis 2.3 Executing comm ands 3. ACP10 EXAMPLE TASK 3.1 Initialization step s 3.2 Action step s 4. SPECIAL FUNCTIONS 4.1 Transferring individual ACOPOS param eter s 4.2 Initialization of multiple param eter s on ACOPOS 4.3 Me ssage manage men t 5. SUMMARY 4 5 6 6 8 18 28 29 31 33 33 37 41 42

ACOPOS ACP10 Software

TM445

Introduction

1.

INTRODUCTION ACP10 is special operating software develop ed for ACOPOS servo drives. An object-oriented programming interface has been developed to optimize setting up processe s for complex applications with several single-axis tasks. It is user-friendly and also provides flexible expansion and simple maintenance.

Fig. 1 Introduction

This training module deals with the operation of the ACP10 software using an app lication program. Basic considerations concerning system architecture as well as the relationship between the individual system components (as mentioned in the TM410 AsiM Basis module) mak e up the basic information required to under stand the processe s in this system. We will use different fun ctions to create flexible commend sequen ces (po sitioning tasks, monitoring, etc). The Automation Studio online help will provide us with the necessary "supply" information.

TM445

ACOPOS ACP10 Software

Introduction

1.1

Training guideobjectives Co urse participants will becom e familiar with use of the ACP10 software to ope rate the B&R drive application (ACOPOS). Co urse participants will be able to use the ACP10 software fun ctions in a structured form to control ACOPOS servo drives from an app lication program.

Fig. 2 Overview

ACOPOS ACP10 Software

TM445

Operating an Axis

2. 2.1

OPERATING AN AXIS General What does "ob ject-oriented" mean? With the NC concept (TM410 AsiM Basis), we have already seen the system architecture for the B&R drives (ACOPOS). The NC Manager on the controller communicates with the NC operating system on the ACOPOS ser vo drive. In an application prog ram, various commands can now be transferred to the NC Manager, forwarded to the drive and then processed.

Fig. 3 Handling the NC object with ACP10 software

TM445

ACOPOS ACP10 Software

Operating an Axis

An NC object is man age d by the software on the controller for each object that must be controlled ("real axis", "virtual axis"). We have the NC objects as the main objects on the first level. Add itionally, the NC ob jects are placed in various subgroups (subjects). For example, the NC object "real axis" contains the subg roups "controller", "encoder_if", "limit", etc.

As seen in TM410 AsiM Basis, this structuring is also found in the NC INIT parameter module (initial configuration) and in the param eter interface (configuration for test actions in NC test). In thes e subg roups, various commands (NC actions) can now be used (e.g. "switch on controller", etc.). The struct ured (object-oriented) organization of the NC software allows clear and easy drive configuration. Note: Handling of the various NC objects ("real axis", "virtual axis", etc.) is done using the same principle and the same functions. In this training module, we will be mainly working with the NC object "real axis" for practical reasons. The knowledge and procedures can easily be applied to all other NC objects.

In the following steps, we will get to know the fun ctions (NC functions) that can be used to prepare or control the ACOPOS drive for positioning. As a basis in the training module TM410 AsiM Basis, we learned how an axis object can be ad ded to an existing project and what pa rameters have to be configured. Using NC tes t, we were already able to start specific tasks triggered by NC actions (initialization, switching on the controller, referencing, etc.). Now we want to go over exactly how to control thes e pr ocedures from an app lication task using the fun ctions from the ACP10 user library. Automatic pr ocesses can be created in this way.

ACOPOS ACP10 Software

TM445

Operating an Axis

Note: Different ACOPOS type s (1022, 1045, etc.) are ope rated using one mechansim. Therefore, we do not have to follow any type-specific specifications, as long as ACOPOS servo drives are being used. This makes it po ss ible to use a variety of program parts repeatedly.

The programm ing languages Structured Text (ST), Automa tion Basic (AB) or ANSI-C are recomme nde d for programming the drives using the fun ctions from the ACP10 software. In the Automation Studio online help, you can find detailed information about the ACP10 software fun ctions:

Fig. 4 Automation Studio online help, NC fun ctions

2.2

Registering an axis First we need a reference to the axis a unique address or ID that we can use to access the axis object specifically. Therefore we have to inform the NC Manage r via a fun ction that we want to use a certain NC object (e.g. "real axis"). The two NC functions ncalloc and ncaccess are available for this purpose. Both fun ctions are use d for the sam e pur pos e, registering the NC object with the NC Manager. After the fun ction executes successfully, the respective NC object is put into cyclic operation, i.e. it's ad ded to the NC Manager's execution sequence. We get back an axis reference (axis address ) as result. This is an ID that we can use to acc ess the axis object from now on. Which of these two func tions shoul d we use? We already know the two possibilities for managing (organizing/configuring) the axe s in a project:

TM445

ACOPOS ACP10 Software

Operating an Axis

The drives (ACOPOS modules) can be adde d to the hardware tree and managed there.

This type of manag eme nt requires the use of the ncalloc function to register the axis. Another possibility for managing the NC ob jects is flexible NC configuration. All relevant settings (interface to the ACOPOS drive, node number, etc.) are made in the NC Deployment Table.

The ncaccess function is use d for this type of management. 2.2.1 NC Fun ction ncalloc

Fig. 5 Automation Studio online help, parameter s for the ncalloc function

ACOPOS ACP10 Software

TM445

Operating an Axis

In the image above we see the list of function parameters for ncalloc as they are shown in the Automation Studio online help documentation. Which parameters doe s this fun ction nee d? bus_typ the bus type for the ACOPOS drive module on the PLC. Here, the code for the ACP10 software ("ncAPC10MAN") must be ad ded to the code for the networ k interface used ("ncCAN_IF" or "ncPOWERLINK_IF"). modul_adr the station number (node number) for the ACOPOS drive module in the networ k. (When using multiple CAN network lines, the network numb er has to be entered in the high byte and the station number in the low byte) object_typ specifies the NC object type, "real axis" or "virtual axis". channel "1". (For NC objects that only exist once on the address ed device) nc_object the memory address for the NC structure of the NC object and, therefore, the reference for the NC object. Specifying this add ress allows us to apply the respective function to the desired NC object ("real axis") in the future. status retur ns the function status and should therefore always be checke d every time this fun ction is called. A return value of "status=ncOK" indicates that the NC object was able to be registered successfully with the NC Manager. Information about errors that may occur when this function is called can be found by looking up the status error number in the Automation Studio help system. 2.2.2 NC Fun ction ncaccess

Fig. 6 Automation Studio online help, parameter s for the ncacc ess function

In the image abo ve we see the list of function parameter s for ncaccess as they are shown in the Automation Studio online help documentation.

10

TM445

ACOPOS ACP10 Software

Operating an Axis

Let's have a closer look at the individual parameters: nc_sw_id the code for the software family, in our cas e the NC constant "ncACP10MAN", must be entered for the ACP10 software. nc_obj_name this is where the name that has been defined for the NC object in the deployment table.

Fig. 7 NC deployment table, NC object name

nc_object the memory address for the NC structure of the NC object and, therefore, the reference for the NC object. Specifying this add ress allows us to apply the respective function to the desired NC object ("real axis") in the future. status retur ns the function status and should therefore always be checke d every time this fun ction is called. A return value of "status=ncOK" indicates that the NC object was able to be registered successfully with the NC Manager. Information about errors that may occur when this function is called can be found by looking up the status error number in the Automation Studio online help system. Here, we also see an advan tage when using the deployment table. If changes are made to the machine configuration (network, additional drives, etc.), this can be adjusted directly in the table. Existing NC object registrations (real axes, virtual axes, etc.) remain the same.

ACOPOS ACP10 Software

TM445

11

Operating an Axis

Note: Error number "10600" is a special case. Although the axis was able to be registered correctly and the reference addr ess is valid, there are still errors for this NC object. These errors can be evaluated and acknowledged using a me ssa ge routine (more ab out this later). For performance rea so ns , we recommend executing the ncalloc or ncaccess fun ction in the Init subprogram for the respective task. This guarantees that the function is called cleanly once.

2.2.3 Accessing the NC data structure The functions ncalloc and ncaccess return the reference add ress of the NC structure for the NC ob ject. With this information, it is possible to acces s a dynamic variable in the corresponding memo ry area. What makes up this data structure? In the NC structure, application-relevant parameters are groupe d in a logical way. As we have already seen for object-oriented use of the NC software, the correspo nding par ameters are also divided into individual subgroups of the NC object here which are called subjects (e.g. controller, encode r, etc.). An NC Object, for instance an axis, contains a large amount of parameter data and process information. To make this clearer, they are grouped as topics in a user data structure corresponding to the NC object type. The contents of these structures depend on the NC object type. A real axis requires more information than a virtual axis, (e.g. encoder interface information).

12

TM445

ACOPOS ACP10 Software

Operating an Axis

Therefore, there is an NC structure for each NC object type:

Fig. 8 Automation Studio help, NC object data types

NC structure elements contain the par ameters for the individual subgroups: E.g. data type ACP10AXIS_typ: dig_in ... ... Digital inputs ... Encoder interface ... Axis limit values ... Controller settings

encoder_if ... limit ... controller ...

mo vement ... ... Moveme nt settings The parameter data in the application progr am can also be written to the NC structure. For example, setting the spee d controller parameters would look like this:
p_ax_dat.controller.speed.kv = 0.5; /* [As/Rev.] */ p_ax_dat.controller.speed.tn = 0.02; /* [s] */ for ST

p_ax_dat->controller.speed.kv = 0.5; /* [As/Rev.] */ p_ax_dat->controller.speed.tn = 0.02; /* [s]*/ for ANSI-C

In addition to the param eter data, the NC struct ure also contains all important process and status data: E.g. data type ACP10AXIS_typ: monitor ... message ... ... Axis monitor ... Messages (erro rs, war nings)

A complete listing of the el ement s and variables for thi s data type can be found in the Automation Studio help.

ACOPOS ACP10 Software

TM445

13

Operating an Axis

Fig. 9 Automation Studio online help, NC data structure

Fig. 10 Automation Studio online help, exc erpt of NC data structure

In the image abo ve, you can see an excerpt of this list for the data type "ACP10AXIS _typ" which is used for the NC object "real axis". Note: All status data has a gray background. These status values are read only, and they are upd ated by the NC Manager. The other entries are par ameter data, which is used for configuration of the NC objects during operation (limit values, etc.) or for certain actions and comm ands (movement distance, referencing methods, etc.).

Access To configure the par am eters and re quest the status in this structure from the application task, the respective memory location must be accessed with a dynamic variable (e.g. a pointer in Ansi C). When doing this, the dynamic variables must have the same data type as the NC data structure (i.e. the "ACP10AXIS_typ" struct ure data type for the NC object "real axis").

14

TM445

ACOPOS ACP10 Software

Operating an Axis

Fig. 11 Access of memory location using a dynamic variab le

In the application task, the dynamic variables can reference the memory location (access the mem ory location) as follows depending on the programming language used: Structured Text: Automation Basic: Ansi C: p_ax_dat access ax_obj; p_ax_dat access ax_obj p_ax_dat = (ACP10AXIS_typ*)ax_obj;

"p_ax_dat"...dynamic variable of the NC struct ure type "ax_obj"...valid memor y address from the register function In this way, the NC data structure is available for use to configure the NC object or request status information in the application program.

ACOPOS ACP10 Software

TM445

15

Operating an Axis

Task: Registering the NC object "real axis" Using this task, we want to get to know how to use the ncaccess function correctly. Try executing the fun ction in your controller task's Init SP and then check the fun ction status. If registered successfully, a dynamic variable (type "ACP10AXIS_typ") should be accessed on the NC data struct ure for the NC object ("real axis"). This makes the data from your drive object (parameter, stati) available in the application program. Have a look at the corresponding dynamic structure variable ("Watch").

16

TM445

ACOPOS ACP10 Software

Operating an Axis

The diagram shown abo ve can now be completed. The parameters for the NC object ("axis") are available in the application pro gra m as a data structure in a logical way.

Fig. 12 Handling an NC object with ACP10, configuration using an NC data structure

Param eters (speeds, mo vement distances, etc.) for actions are set using this data struct ure before the NC Manager executes the command.

ACOPOS ACP10 Software

TM445

17

Operating an Axis

2.3

Executing commands Executing the NC comm ands, as we know from the TM410 AsiM Basis module, is done from the app lication task using the NC function ncaction.

2.3.1 NC function ncaction

Fig. 13 Automation Studio online help, parameter s for the ncaction fun ction

In the image abo ve we see the list of function parameter s for ncaction as they are shown in the Automation Studio online help documentation. The procedure for setting the para meters for the fun ction is extremely clear and easy. Which par am eters are required? nc_object specifies the NC object that the fun ction should be app lied to the very reference address that we received from the ncaccess or ncalloc fun ction. subject specifies the subject (subgroup) of the NC object where the function should be used, e.g. the controller, the encoder interface, etc. action the action to be carried out e.g. initialization, start-up, etc. Combining the subg roups (subjects) of the NC object with various actions results in many comma nd po ssibilities. Take a look at the Automation Studio online help to see a complete list of subjects, actions and the po ssible combinations.

18

TM445

ACOPOS ACP10 Software

Operating an Axis

Fig. 14 Automation Studio online help, NC actions

Note: As can be seen, there are actions with various priorities and a different action radius. For example, mo vement stop com mands are given high priority, i.e. can interrupt other procedures if necessar y. There are also internal actions that do not need to communicate with the NC operating system on the ACOPOS servo drive (e.g. reading mes sag e texts).

status the status of the function is given as a return value. The following cases are possible: the value "ncOK", the command was correctly received by the NC Manager the value "ncACTIVE", the NC Manager was not able to receive the command (->Busy) Error code, an error number that provides information about a faulty fun ction parameter After executing the ncaction function, the function status determines how further processing is handled in the program.

ACOPOS ACP10 Software

TM445

19

Operating an Axis

2.3.2 Programming There are certain process es taking place betwee n the application task, NC Manager and the NC operating system on the ACOPOS servo drive that must be tak en into consideration when executing a comm and using the ncaction fun ction: We control the ACOPOS servo drive using an app lication task, and can imagine the NC Manag er as being an "intermediary" between the app lication pr ogram and ACOPOS servo drive.

Fig. 15 NC Manag er as "intermediary"

With the NC fun ction ncaction, we define a certain comm and in the app lication program and send it to the NC Ma nager. The fun ction informs us if the com mand was able to be received using the status. The command is simply sen t off and then we are no longer within the scop e of the ncaction fun ction. Now let's assume that our comm and was received by the NC Manager and acknowledged ("ncOK"). It is then sen t to the ACOPOS ser vo drive (NC op erating system) via the network and executed there. This is the start of the physical process. The action is running and, in the next step, we have to wait for a response, such as: ...with the ncaction function, we have successfully ("status=ncOK") started a relative mo vem en t ("ncREL_MOVE,ncSTART") and are now waiting for the axis to reach the tar get position. ...we have started the controller ("ncCONTROLLER,ncSWITCH_ON") and are waiting for an indication that the controller has been switched on. For this purpose, a corresponding status component can be found in the data for each subject or subg roup in the NC data struct ure. This is se t to a specific value after successfully ending an action on the ACOPOS device (via the NC Manager).

20

TM445

ACOPOS ACP10 Software

Operating an Axis

For example, we could receive the following for our relative movement after the action has been carried out succ essfully: "...move.basis.status.in_pos=ncTRUE" (immediately after calling the ncaction "ncFALSE") or for successfully switching on the controller: "...controller.status=ncON" (immediately after calling the ncaction "ncOFF") We can request this information specifically in our app lication pro gram and then decide what to do next. The many command combinations that are ma de available to us by the ACP10 software result in a large number of parameters that must be set and status requests that must be ma de for the individual actions. The Automa tion Studio online help will provide suppo rt here. It shows a detailed listing of all po ssible command combinations, separated into the individual subjects or subgroups.

Fig. 16 Automation Studio online help, subgroups and actions

In each subgr oup, we find various information blocks and descriptions as well as another directory with the actions that are possible for the subject. For each action, we find complete information about the relevant parameters and status values.

ACOPOS ACP10 Software

TM445

21

Operating an Axis

For example, take an action from the "Controller" subgroup, such as "Switch Controller On":

Fig. 17 Automation Studio online help, action "Switch Controller On"

On the right side of the help windo w, we find all the information we need to correctly integrate this action in our application program:

Fig. 18 Automation Studio help, action "Switch Controller On Handling"

22

TM445

ACOPOS ACP10 Software

Operating an Axis

Function call: Shows how the ncaction function (to sen d an NC command) sets the parameters for the respective action. Note: The ad van tage s of object-oriented parameters and clearly defined constants can be see n here. "You program like you speak" "Switch on controller". This make s the program easier to read.

Parameter: Here, the elements from the NC data structure that are needed to set the parameters for the action are specified. Before executing the comm and using the ncaction fun ction, these param eters must be set to the desired values in the NC data structure. In our example, no special par ameter settings are required, the controller just has to be switched on. Example: For the action to initialize the basic mo veme nt param eter s ("ncBASIS_MOVE, ncINIT"), these parameter s must be set tot he desired values in the NC data struct ure for the axis object, i.e. acceleration and spe ed values ("...movement.basis.parameter. ...").

Fig. 19 Automation Studio online help, basic moveme nt parameters

With this action, these values (NC data structure on the controller) are initialized on the ACOPOS ser vo drive.

This entry refers to the param eters that we had to "prepare" in the NC data structure before executing the command.

ACOPOS ACP10 Software

TM445

23

Operating an Axis

Conditions: There are certain conditions that must exist before an action can be started. For example, a relative mo vem ent doesn't make any sense before the controller has been started and a homing procedure has been carried out for the drive. The dependencies, "When can what be done?", are not always clear. Therefore, the conditions for an action have been listed here. For our action "Switch controller on", we have to check if the controller is ready using "...controller.ready" so that nothing is taken for granted. As we can see, the two hardware limit switches (pos itive and negative) are not permitted to be active at the same time. Result: Shows the effects of the NC command, a short action description. Status Display: As mentioned earlier, we need a status signal to monitor the process that we star ted by succ essfully executing the command (ncaction) on the ACOPOS se rvo drive (NC operating system). This signal is provided in the form of a status parameter in the corresponding element (subgroup) of the NC data structure. The NC Manager enters a value matching the action status here. For our cas e, we will see the value "ncON" for "...controller.status", after the action has been succ essfully executed and the controller is active. Example: Add itionally, a program routine is shown in the help for each comm and combination. The comm and lines are executed in the ANSI C programming language. What information is offered here? As we have see n, ther e is a certain sequence that we have to take into consideration in our app lication pr ogram when executing an action: Wait for the necessary com mand conditions (requirements), Set param eters for the relevant process values and execute the respective commands via the NC Manager, Wait for a res ponse from the process (the action on the ACOPOS ser vo module) A control struct ure that is especially well-suited for managing these type s of fun ction sequen ces is the step sequencer.

24

TM445

ACOPOS ACP10 Software

Operating an Axis

Step se quen cers allow the implementation of individual steps whose sequence can be determined by the use of a step index. This program excerpt shows the execution of an action in the individual steps of the application program. Let's look at how the sequen ce can be handled in a step se quen cer for the action "Switch on controller":

Fig. 20 Automation Studio online help, action "Switch controller on" program example

The programm ing example shows an exc er pt of a step sequen cer; exactly the step we need for correct execution of our action. The sequen ce is controlled using the index variable "step", so let's assume that the action "Switch controller on" should be executed and the index variable was set to the value "W_CONTROLLER_READY". In this step, the conditions for switching on the controller are checked. If the status value is correct, the index variable is use d to automatically go to the next step. The conditions have been clarified, now the comma nd can be executed.

ACOPOS ACP10 Software

TM445

25

Operating an Axis

Using the ncaction function, the command is sent to the NC Manager. As we already know, the function status provides information about if the command was received. Therefore, this step is repe ated until this happens (Status "ncOK"). If this step is completed correctly, we move on to the next phas e, monitoring the "physical process" on the ACOPOS servo drive. In this case, we wait until the controller has been switched on. The inquiry now concerns the concrete status value in the data structure of the NC object ("real axis"). The NC actions in an app lication pr ogr am are implemented in this way. In general, all actions can be executed acc ording to this procedure.

Fig. 21 Carrying out an NC action

As an overview, we recommend taking time for a shor t look at the respective entries in the Automation Studio online help. You will quickly get a feeling for the implementation of the various actions. When doing so, it is important to becom e familiar with this uniform mechanism. Note: When carrying out consecutive actions, checking the conditions for the following step is often done together with the status che ck (completion) of the current step.

26

TM445

ACOPOS ACP10 Software

Operating an Axis

Task: Positioning routine This task will help you practice processing commands for the ACOPOS in the application task using the ncaccess fun ction. 1. A basic routine to prep are the drive for positioning commands will be crea ted. Implement the following NC actions in the cyclic part of your control task using a step sequencer: Check if the drive is read y (".network.init = ncTRUE" ?) Global initialization ("ncGLOBAL, ncINIT") Switch on drive controller ("ncCONTROLLER, ncSWITCH_ON) Homing the drive ("ncHOMING, ncSTART"). This should be done in homing mo de "ncDIRECT". After executing these actions, the process should end with a "waiting" step. Then the drive is read y for positioning comma nds. All errors on the drive can be acknowledged in ad vance in the NC test. 2. Expand the pr oces s by adding the following "po sitioning action": Relative movement ("ncREL_MOVE, ncSTART") Using a trigger variable, you can start this action in a targeted manner ("Watch"). After succ essfully completing the action, the program should return to the "waiting" step.

Note: All procedures can be "tried out" in NC Test. Relevant parameter s, actions and status data are repres en ted in the testing environment. Don't avoid this tool for testing command procedures before it has been integrated in your application program!

ACOPOS ACP10 Software

TM445

27

ACP10 Example Task

3.

ACP10 EXAMPLE TASK In the following section, we will take a look at an example application that is included in the standard Automa tion Studio package. This app lication task contains most of the comm and proced ures for single axis applications. We can use this pr ogram to continue with correct implementation of NC actions in a program and this example will also show us how these actions are placed in a sequence that makes sen se and will fun ction properly. The example program should not be seen as a guideline, it is mor e to provide support and show an approach that makes sense. The example project is found in the Automa tion Studio directory in "...\Samples\Motion\English\Acp10\acp10. pgp". Task: Importing the ACP10 example task This project contains tasks in two programm ing languages, Automation Basic (AB) and ANSI C. Impo rt the desired task in your project.

For a clear structure, the following segmentation can be ma de: The program will include various routines. In the Init subprogram, the NC object is registered ("real axis") and a few standard queries to check the version compatibility of the NC Ma nager and NC operating system on the ACOPOS servo module are carried out. Detailed information can be found in the Automation Studio online help:

Some parameters are also initialized. The cyclic section of the program is blocked (jump to the end) if the axis is not registered correctly or the versions of the NC Manager and NC op erating system are not compatible. If a special situation "Status=10600 " exists whe n registering the NC object (axis), there is a special routine to re ad and acknowledge the respective error entry (more information about this will be given later). A permanen t axis error inquiry take s place via the status entry "...monitor.status.error" in the NC data structure.

28

TM445

ACOPOS ACP10 Software

ACP10 Example Task

The heart of the app lication is the step sequencer where the handling of the individual NC actions takes place. The initialization step (switch controller on, homing, etc.) prep ares the ACOPOS se rvo drive for op eration, and then the action step s carry out the individual actions (e.g. movements). Note: The two terms initialization and action steps are only used he re to provide a better overview. For programming purpos es, they are completely identical. As mentioned in "2.3.2. Programming", the known step s are always needed.

Fig. 22 Carrying out an NC action

The continuity of the NC software operation is fully accomm odated. 3.1 Initialization steps What steps are needed to prep are the ACOPOS ser vo drive? To pr epare a drive for mo vement com mands, the following must be true: The drive controller must be switched on The drive must be homed Note: As mentioned earlier, information ab out the requirements for the individual NC actions can be found in the Automation Studio online help.

ACOPOS ACP10 Software

TM445

29

ACP10 Example Task

To guarantee complete initialization of the ACOPOS drive, certain step s and status inquiries must be included in the initialization section of the program. In the example task, an initialization process will be shown that meets these requirements. The se quen ce of steps provides us with a simplified representation: Wait for the "Network initialized" status. An inquiry is used to check if a global initialization is necessary. If it does, the next action must switch off the controller. Then the glob al initialization can take place. The current par ameter values in the NC structure (controller) on the ACOPOS ser vo module are initialized. Activation of Simulation Mode is carried out here in the example task, depending on the setting.

If global initialization is not necessary, the n the "Switch controller on" phase is imm ediately started. It's necessary to check if the controller is rea dy, then the command to switch it on can be executed. After successfully completing this action, homing can take place.

Now the ACOPOS servo drive is ready for movement actions. The app lication is in a waiting step, the command step.

Fig. 23 Poss ible initialization process

30

TM445

ACOPOS ACP10 Software

ACP10 Example Task

3.2

Action steps Actions (relative mo vem en ts, absolute movements, etc.) can be carried out from the comm and step using various conditions (setting trigger variables).

Fig. 24 Action steps

Note: Here, an "action" is not mean t to only be a step in the step sequencer! Of course, certain step s must be carried out to proc ess an action (check conditions execute comm ands wait for responses)

ACOPOS ACP10 Software

TM445

31

ACP10 Example Task

In the example task, the pro gra m goe s back to the com mand step after completing most actions. Of course, we have the possibility to vary the requirements as nee ded. For example, actions can be lined up directly one after the other or an action can be repeated periodically, any se quen ce is po ssible. Using the step sequencer and the object-oriented application of the ACP10 software, we can achieve a very clear structuring of the function process. Task: ACP10 example task In the example task, let's se t up the ncaccess fun ction so that the drive in your project is controlled by this task. Try to implement the individual steps and actions in the pr ogram sequence and tes t the various fun ctions.

32

TM445

ACOPOS ACP10 Software

Special Functions

4. SPECIAL FUNCTIONS In the following section, we will take a closer look at the special functions of the ACP10 software. In general, these fun ctions are operated using the known systematic, but have a som ew hat mor e complex relationship and should therefore be discussed in detail. 4.1 Transferring individual ACOPOS parameters The service interface (NC data struct ure: "network.service") provides the user with read or write access to all parameters on the drive. This allows drive parameters that are not in the NC struct ure and cannot be set with an NC action or read by the NC man ag er to be set or read in the app lication task. The relevant par ameters for this action are found in the correspo nding element ("...network.service") of the data struct ure for the axis object:

Fig. 25 Automation Studio online help, service interface parameters

The ACOPOS parameter that the action will "read" or "write" to is determined by the value "...service.request.par_id". (A listing of all ACOPOS pa ram eter s can be found in the Automation Studio online help.) There are two different types of possibilities available for entering (when writing) or receiving (when reading) the par ameter values:

ACOPOS ACP10 Software

TM445

33

Special Functions

Type 1: The value for the param eter is at the address defined with "...network.service.data_adr". In this case, we have to use one of the following NC actions: "ncSERVICE, ncREAD" "ncSERVICE, ncSET" A variable with the corresponding data type has to be available in the app lication tas k as source of the value (when writing) or target for the parameter value (when reading) for the operation. Before calling the NC action, the add ress of this variable has to be entered in "...network.service.data_adr". Type 2: The value of the par am eter is entered in "...network.service.data_text" in text format (STRING): In this case, we have to use one of the following NC actions: "ncSERVICE, ncREAD+ncDATA_TEXT" "ncSERVICE, ncSET+ncDATA_TEXT" The NC manager searches the parameter ID in the parameter list and creates a text from the param eter value (when reading a parameter) or a pa ram eter value from the text (when setting a parameter).

34

TM445

ACOPOS ACP10 Software

Special Functions

Note: The NC manager identifies the data type of the ACOPOS parameter, and it is converted acc ordingly:
ACOPOS parameter data type REAL UDINT Input/output text 4.23 4.23 (only possible for input) UDINT STR32 17 Motor-Identifier-Text 17 Motor-Identifier-Text ACOPOS parameter value 4.23 4

Of course, complete ope rator information is also available for these actions. In the example of "ncSERVICE, ncREAD", we can see the correct pr ocedure when using the service interface to re ad ACOPOS pa ram eter s from the example program:

Fig. 26 Automation Studio help, read ing ACOPOS parame ter s - programm ing

ACOPOS ACP10 Software

TM445

35

Special Functions

In this case, the pr og ram example shows an excerpt from the ste p sequencer, the two steps neede d for correct execution of the action. (The conditions for the action are considered to be met) Step 1: Setting parameters, executing the command Before calling the ncaction function, the desired ACOPOS parameter ID and the address of the task variables where the parameter value should be copied (-> read) ar e entered. After receiving feedback status value "ncOK", the next step is started. Step 2: Waiting for a response The response is received via the par ameter "...service.response.par_id". If the NC command "ncSERVICE, ncREAD" wa s executed correctly, the value 0 is en tere d here.

36

TM445

ACOPOS ACP10 Software

Special Functions

As soon as the parameter value is available at the add ress we specified, i.e. read succ essfully, the Response ID from the NC Manager is se t to the sa me value as the Request ID. If an error occurs, the value 65535 (FFFF h) is entered, the parameter could not be read. Reading and writing parameters can also be integrated in the function in a flexible manner. All information that we need for correct handling of these functions is provided in the Automation Studio help. Task: Transferring individual ACOPOS parameters Implement the function for reading individual ACOPOS parameters in your control task.

4.2

Initialization of multiple parameters on ACOPOS In addition to the ability to initialize individual parameters, the ACP10 software gives you extensive possibilities for initializing predefined parameter combinations. The initialization can be done either while booting the ACOPOS servo module, or during runtime (from the app lication task).

4.2.1 Initialization while booting ACO POS The NC deployment table is used to initialize predefined parameters while booting the ACOPOS ser vo module. As we saw already with the TM410 AsiM Basis module, value assignments can be applied to the entire pallet of ACOPOS param eter s in the ACOPOS par ameter table. This predefined table can be assigned to the NC object "real axis" in the NC deployment table. This transfers the parameter values to ACOPOS during the bootin g procedure where they are applied (initialized) by the NC operating system.

ACOPOS ACP10 Software

TM445

37

Special Functions

4.2.2 Initialization during runtime All other options involve an initialization of ACOPOS parameters during runtime, i.e. star ted by a program routine at a specific point in time. How does it work? Before (during the initialization of individual parameters in ACOPOS) we had only a single par am eter with a specific value, but now we are dealing with a number of parameters with just as ma ny values. To help with this, an intermediary has been created as a connection bet ween the service interface (...network.service.data_adr) and the configuration of ACOPOS pa ram eter s. A special data type ("ACP10DATBL_typ") is available for configuring the initialization.

Fig. 27 Configuring a data block

In the schematic above we see a simplified example of the procedure. On the right is the parameter configuration. Depending on the version, either an ACOPOS parameter table or a parameter array can be used. The "ACP10DATBL_typ" basis variable requires additional settings.

38

TM445

ACOPOS ACP10 Software

Special Functions

Types After calling up the NC action "ncACP10_PAR+ncSERVICE, ncDOWNLOAD" the pa ram eter s enter ed in an ACOPOS parameter table are individually transferred to ACOPOS and immediately initialized . The transfer takes place within the idle time task of the NC manager. Note: "Directly initialized" me ans that the parameter values are taken over immediately, and are therefore active right away. The download variant of an ACOPOS parameter table is especially useful when you need to switch back and forth betwe en multiple predefined "parameter recipes".

In the "parameter list", the parameter configuration and the value assi gnment can be easil y adjusted during runtime. There is an add itional data type for this purpo se that contains an element for the pa ram eter ID and an element for the parameter value. Using this data type, you can create an array (-> list) in the task. Entries in this "list" can then be cha nge d from the application program during run time.

Fig. 28 Data array as parame ter list

After calling up the NC action "ncPAR_LIST+ncSERVICE, ncINIT", all parameters in the parameter list, as for the ACOPOS param eter tables themselves, are transferred to ACOPOS and immediately initialized . Unlike the ACOPOS para meter tables, however, this transfer take s place within the cyclic NC manager task.

ACOPOS ACP10 Software

TM445

39

Special Functions

Note: Unlike the initialization variant, it's po ssible to change the parameters that are available, as well as their values, in the predefined ACOPOS pa ram eter tables in the app lication program.

The "parameter sequence" use s the sam e array as the param eter list". Unlike the ACOPOS pa ram eter tables or pa ram eter lists, the pa ram eter s in the parameter sequen ce are not transferred individually, but as a data block. Once transferred to ACOPOS, they are not immediately initialized, but rather saved as a "recipe". The initialization takes place independent of the data transfer, and only after the comm and "initialize parameter sequence" is run. This command can be called up either right after the transfer or at a later time. Using an index, it is also po ssible to place multiple parameter configurations together on the drive and initialize them selectively (very quickly). Note: Detailed information regarding the op eration of these functions during program execution is available, as usual, in the Automation Studio online help.

40

TM445

ACOPOS ACP10 Software

Special Functions

4.3

Message management The ACP10 software provides application-oriented message display and management. By linking a corresponding error text table (available in multiple languages), warnings or errors for the axis can be transferred for display as plain text in a multi-line character variable (two dimensional string or a structure of character elements). The structure element "mess age" in the NC data structure contains all nec es sar y parameters for this purpose. If a value is exceed ed (e.g. lag error stop limit), the corresponding value can also be determined. Message management takes place using the two NC commands "ncMESSAGE, ncTEXT" to determine the current message set "ncMESSAGE, ncACKNOWLEDGE" to acknowledge the mes sage set Notes: A complete appr oach for implementing mes sage managemen t is found in the ACP10 example task. Add itionally, the Automation Studio online help offers all of the information nee ded to operate this function. It also contains a list of all drive errors with the corresponding error numb ers and a description of the error.

ACOPOS ACP10 Software

TM445

41

Summary

5.

SUMMARY The ACP10 software provides an application-oriented and flexible user interface for creating positioning app lications for the ACOPOS ser vo drives.

Fig. 29 Summary

The object-oriented struct ure of the NC software allows targeted access of the individual comp onen ts (subgroups such as: controller, etc.) and their pa ram eter s. For this purpo se, a data struct ure is provided that contains the corresponding status and parameter data for the respective NC object. The comm and is executed by the NC Manager. After successfully completing an action ("physical process"), the corresponding status is retur ned using the NC data struct ure (entered by the NC Manager). The processes can be clearly coo rdinated in the application progr am using a step sequencer. Answers to questions regarding the app lication and implementation of the individual NC actions can be found in the Automation Studio online help or in the ACP10 example project.

42

TM445

ACOPOS ACP10 Software

Summary

Overview of training modules

TM210 The Basics of Automation Studio TM600 The Basics of Visualization TM211 Automation Studio Online Comm unication TM610 The Basics of ASiV TM213 Automation Runtime TM630 Visualization Programm ing Guide TM220 The Service Technician on the Job TM640 ASiV Alarm Syste m, Trend and Diagnostic TM223 Automation Studio Diagnostics TM670 ASiV Advanced TM230 Str uctured Software Generation TM240 Ladder Diagram (LAD) TM700 Automation Net PVI TM241 Function Block Diagram (FBD) TM710 PVI Comm unication TM246 Str uctured Text (ST) TM711 PVI DLL Programming TM250 Mem ory Manageme nt and Data Storage TM712 PVIServices TM261 Closed Loop Control with LOOPCONR TM730 PVI OPC TM400 The Basics of Motion Control TM410 The Basics of ASiM TM440 ASiM Basic Functions ASiM Multi-Axis Functions TM445 ACOPOS ACP10 Software TM446 ACOPOS Smart Process Technology TM450 ACOPOS Control Con cept and Adjustment TM460 Starting up Motors TM480 Hydraulic Drive Control TM500 The Basics of Integrated Safety Technology TM510 ASiST SafeDESIGNER TM540 ASiST SafeMC TM800 TM810 TM811 TM812 TM813 TM830 TM840 TM850 TM860 TM865 TM870 TM890 APROL System Concept APROL Set up, Configuration and Recovery APROL Runtime System TM441 APROL Operator Manageme nt APROL XML Queries and Audit Trail APROL Project Engineering APROL Parameter Management and Recipes APROL Controller Configuration and INA APROL Library Engineering APROL Library Guide Book APROL Python Programming The Basics of LINUX

ACOPOS ACP10 Sof tware

TM445

43

Summary

Back cove

44

Con ac

Web nk

Copy gh Mode numbe

TM445

n e na ona Headqua e s y

TM445TRE.25-ENG 0907 2007 by B&R. All rights reserved. All registered trademarks are the property of their respective owners. We reserve the right to make technical changes.

numbe o pages d v s b e by 4

ACOPOS ACP10 Sof ware

También podría gustarte