ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2)...

30
Application guide ACS355 and AC500-eCo

Transcript of ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2)...

Page 1: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Application guideACS355 and AC500-eCo

Page 2: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

List of related manuals

1) Delivered as a printed copy with the starter kit.2) Delivered on the SD memory card in the folder \PS553-DRIVES\Documentation.3) Can be accessed through the CoDeSys program. See Using the online help in CoDeSys on page 15.

Drive and PLC hardware manuals and guides Code (English)ACS355 user’s manual 3AUA0000066143 2)AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1)System description AC500 2CDC125015M0201 2)PM554 and PM564 installation instructions 2CDC125122M6801 2)AC500 online help 3)

Option manuals and guidesFMBA-01 Modbus adapter module user’s manual 3AFE68586704 1)

Page 3: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Application guide

ACS355 and AC500-eCo

2CDC125152M0201 Rev AEN

EFFECTIVE: 2011-01-21

© 2011 ABB. All Rights Reserved.

Table of contents

Page 4: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description
Page 5: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

5

Table of contents

List of related manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1. About the manual

What this chapter contains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Starter kit overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Safety instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Related manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2. Configuration

What this chapter contains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9ACS355 drive configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Installing ABB Control Builder AC500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Installing PS553-DRIVES libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Configuring communication parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Opening the example project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Installing the TK504 cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Checking the COM port of TK504 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Setting new communication parameter to COMx for TK504 . . . . . . . . . . . . . . . . . . . 13Connecting to the PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3. Customization

What this chapter contains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Getting help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Using the online help in CoDeSys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Getting started AC500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15AC500 ACS Drives Libraries topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Getting help on a specific function block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Configuring the Modbus settings of the AC500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Configuring the slave address of the drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Adding another drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Copying the program for another drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Information on LineCom1 as a global variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Creating a visualization for a copied drive program . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Using visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Controlling the drive with the visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Configuring parameters to be read from the drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Configuration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Using the read parameters in the program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Word-to-integer conversion for variables with negative values . . . . . . . . . . . . . . . 22

4. Function blocks and program structure

What this chapter contains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Function block programming overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Page 6: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

6

Program structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Main program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24PRG_Drive1 program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24DriveRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Main components of the example program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Modbus RTU communication function block (FB_COM) . . . . . . . . . . . . . . . . . . . . . 25Basic control block (FB_BASIC CONTROL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Speed reference generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Other control blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26ACS_CTRL_ABB_DRV_PROFILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26ACS_DRIVES_CTRL_ENG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Page 7: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

About the manual 7

1About the manual

What this chapter containsThe chapter describes the contents of the manual. It also contains information on the compatibility, safety and intended reader.

Starter kit overviewThe ACS355 and AC500-eCo starter kit is designed for controlling up to seven ACS355 drives connected through a Modbus link. The maximum total length of the Modbus link is 50 meters (160 feet).

CompatibilityThis manual is intended to be used with the ACS355 and AC500-eCo starter kit.

Safety instructionsFollow all safety instructions delivered with the starter kit:• Read the complete safety instructions for the ACS355 drive before you install,

commission or use the drive. The complete safety instructions are given at the beginning of the ACS355 user’s manual (3AUA0000066143 [English]).

• Read all safety instructions of the AC500-eCo PLC. See System description AC500 (2CDC125015M0201 [English]) or the online help in CoDeSys (Help > Contents > Target System > AC500 / S500 > Introduction > Overview > Regulations).

ReaderThe manual is intended for people responsible for configuring and using the starter kit.

Page 8: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

8 About the manual

ContentsThe manual consists of the following chapters:• Configuration describes how to install and configure the software needed for using the

ACS355 drive with the AC500-eCo PLC.• Customization describes optional configuration and customization options.• Function blocks and program structure describes the principles of ACS Drives

Libraries function blocks and the structure of the example program.

Related manualsIn addition to this manual, the delivery includes the following manuals:• Quick installation guide which describes the mechanical and electrical installation of

the starter kit.• ACS355 user’s manual which describes the ACS355 drive.• System description AC500 which contains the safety instructions for the AC500-eCo

PLC.• PM554 and PM564 installation instructions which describes the installation of the

AC500-eCo PLC.• The online help in the CoDeSys program (see Using the online help in CoDeSys on

page 15.)• FMBA-01 user’s manual which describes the FMBA-01 Modbus adapter module.

For a complete list of related manuals, see the inside of the front cover.

Page 9: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Configuration 9

2Configuration

What this chapter containsThis chapter describes how to install ABB PS501 Control Builder on your computer, and how to configure the ACS355 drive and AC500-eCo PLC for use.

The instructions in this chapter are intended to be used after the mechanical and electrical installation has been completed, as explained in AC500-eCo and ACS355 quick installation guide.

Instructions for optional configuration and customization are given in chapter Customization.

Page 10: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

10 Configuration

ACS355 drive configurationThe AC500 Modbus application macro makes the necessary changes to parameter default values for use in the starter kit. To activate the macro, set parameter 9902 APPLIC MACRO to AC500 MODBUS (10) as shown below. The macro is available in ACS355 drives with software version 503C or above.

The AC500 Modbus application macro default drive parameters correspond to the ABB standard macro for ACS355, with the following changes:

Step Action Display1. Go to the Main menu by pressing if you are in the

Output mode, otherwise by pressing repeatedly until you get to the Main menu.

2. Go to the Parameters mode by selecting PARAMETERS on the menu with keys and , and pressing

.

3. Select the appropriate parameter group with keys and .

Press .

4. Select the appropriate parameter with keys and . The current value of the parameter is shown

below the selected parameter.

Press .

5. Specify a new value for the parameter with keys and .Pressing the key once increments or decrements the value. Holding the key down changes the value faster. Pressing the keys simultaneously replaces the displayed value with the default value.

6. • To save the new value, press .• To cancel the new value and keep the original, press

.

Parameter Name Value

1001 EXT1 COMMANDS COMM (10)

1102 EXT1/EXT2 SEL COMM (8)

1103 REF1 SEL COMM (8)

1604 FAULT RESET SEL COMM (8)

MENU

EXIT

PARAMETERSASSISTANTSCHANGED PAREXIT ENTER00:00

LOC MAIN MENU 1

ENTER

01 OPERATING DATA03 FB ACTUAL SIGNALS04 FAULT HISTORY10 START/STOP/DIR11 REFERENCE SELECTEXIT SEL00:00

LOC PAR GROUPS 01

99 START-UP DATA01 OPERATING DATA03 FB ACTUAL SIGNALS04 FAULT HISTORY10 START/STOP/DIREXIT SEL00:00

LOC PAR GROUPS 99

SEL

9901 LANGUAGE

ENGLISH9902 APPLIC MACRO9903 MOTOR TYPE9904 MOTOR CTRL MODEEXIT EDIT00:00

LOC PARAMETERS

9901 LANGUAGE9902 APPLIC MACRO

ABB STANDARD9903 MOTOR TYPE9904 MOTOR CTRL MODEEXIT EDIT00:00

LOC PARAMETERS

EDIT

9902 APPLIC MACRO

CANCEL SAVE00:00

PAR EDIT

[1]ABB STANDARD

LOC

9902 APPLIC MACRO

PAR EDIT

CANCEL SAVE00:00

LOC

[10]AC500 MODBUS

SAVE

CANCEL

9901 LANGUAGE9902 APPLIC MACRO

3-WIRE9903 MOTOR TYPE9904 MOTOR CTRL MODEEXIT EDIT00:00

LOC PARAMETERS

AC500 MODBUS

Page 11: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Configuration 11

Installing ABB Control Builder AC500This section describes how to install the Control Builder and a driver for the TK503/504 cable.

Note: For more information on the cable driver installation, see \CD_AC500\Driver\TK503_TK504\TK503_TK504_Driver_Installation.pdf on the installation CD.

1. Insert the installation CD of ABB PS501 Control Builder.

The CD automatically starts the installation program. A new window opens.

2. Click Installation PS501.

The installation begins.

3. Follow the steps in the installation wizard.

Once the installation is finished, you return to the main menu.

4. Click Tools.

5. Click TK503 + TK504 cable driver.The TK503_TK504 programming cable Driver Installer window opens.

6. Click Install.

The installation begins.

Installing PS553-DRIVES librariesNote: ABB PS501 Control Builder must be installed first.

1. Remove the SD memory card from the AC500-eCo and insert it in the memory card reader of the PC.

2. In the root directory of the SD memory card, open setup.exe.

3. Follow the steps of the setup wizard.

Libraries, examples and the online help are copied to the hard drive of the PC.

2201 ACC/DEC 1/2 SEL NOT SEL (0)

3018 COMM FAULT FUNC FAULT (1)

5302 EFB STATION ID 2

5303 EFB BAUD RATE 19.2 kbit/s (192)

5304 EFB PARITY 8 NONE 1 (1)

5305 EFB CTRL PROFILE ABB DRV FULL (2)

5310 EFB PAR 10 101

5311 EFB PAR 11 303

5312 EFB PAR 12 305

9802 COMM PROT SEL STD MODBUS (1)

2

Page 12: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

12 Configuration

Configuring communication parametersThe below instructions demonstrate how to configure communication parameters with the example project.

Opening the example project1. In the Windows Start menu, open the CoDeSys programming tool by clicking

Programs > 3S Software > CoDeSys V2.3 > CoDeSys V2.3.

The CoDesys program opens.

2. Click File > Open.

3. Browse to the folder C:\Program Files\ABB\ABB Configurator\Projects\Examples\Drives_PS553-DRIVES\ ACS355_PM554_ModbusRTU\ and open ACS355_PM554_ModbusRTU.pro.

A dialog opens, asking if you want to save the current (empty) project.

4. Click No.

The project opens and the PLC_VISU window and the PRG_DRIVE1 window are displayed.

Installing the TK504 cablePlug the TK504 cable in a USB port on the PC.

An installation wizard for the TK504 cable opens. Follow the instructions in the wizard to automatically install the cable.

Page 13: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Configuration 13

Checking the COM port of TK5041. In Windows Start menu, go to Settings >

Control Panel > System.

2. Select the Hardware tab and click Device Manager.

3. Expand Ports (COM & LPT) and check to which COM port TK503_504 programming cable is assigned. The COM port is shown in parentheses.

Setting new communication parameter to COMx for TK504

1. In CoDeSys, click Online > Communication Parameters….

The Communication Parameters window opens.

2. Click New ….

The Communication Parameters: New Channel window opens.

3. In the Name field, enter a name corresponding the COM port, such as “COM7”.

4. In the Device field, select Serial (RS232).5. Click OK to close the window.

6. Change the following values:• Port: [the corresponding COM port]• Baudrate: 19200• Motorola byteorder: Yes

7. Click OK to exit.

Connecting to the PLCClick Online > Login.

2

3

2

5

4

3

6

7

Page 14: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

14 Configuration

The status of the function blocks is displayed.

Page 15: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Customization 15

3Customization

What this chapter containsThis chapter describes how to add more drives, customize the program further in CoDeSys and work with visualizations.

Getting helpUsing the online help in CoDeSys

To open the online help, click Help > Contents….

See the sections below for more detailed information on AC500 help topics.

Getting started AC500In the Contents tab, expand Target System > AC500 / S500 > Introduction > Getting Started and open Getting started AC500.

AC500 ACS Drives Libraries topicsIn the Contents tab, expand Target System > AC500 / S500 > ACS Drives Libraries.

Under ACS Drives Libraries you can see the help topics related to the ACS Drives Libraries.

Page 16: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

16 Customization

Getting help on a specific function blockIn CoDeSys, select the title of the function block and press F1.

The library view also contains information on the function blocks and their inputs and outputs. Press Alt + Enter to enter the library view.

Configuring the Modbus settings of the AC500You can change the Modbus settings, but they have to be identical in the drive and the AC500.

1. In CoDeSys, in the left pane, select the Resources tab.

2. Click PLC Configuration.

3. In the middle pane, under AC500, expand Interfaces[FIX].4. Click COM1 - MODBUS[SLOT].

5. In the right pane (Module parameters), configure the following parameters:

Note: For AC500 PLCs with firmware version 2.0 or higher, use ABB Control Builder to set up the bus parameters. To open ABB Control Builder, go to the Windows Start menu and open Programs > ABB > ABB Control Builder.

Name Value

RTS control telegram

Baudrate (same as in the drive)

Parity (same as in the drive)

Data bits (same as in the drive)

Stop bits (same as in the drive)

Operation mode Master

Address 0

3

1

2

5

Page 17: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Customization 17

Configuring the slave address of the driveThe default slave address of the drive is 2, but if several drives are used, the address must be unique in each drive.

On the drive side, you can choose the slave address in ACS3xx drives with parameter 53.02 EFB STATION ID. You can use the control panel for changing the parameter value. For instructions, see chapter Control panels in ACS355 user’s manual (3AUA0000066143 [English]).

To configure the slave address in CoDeSys, follow the instructions below:

1. In CoDeSys, in the left pane, select the POUs tab.

2. Click PRG_Drive1 (PRG).

3. In the modbus RTU communication function block, change SLAVE to match the Modbus slave number.

For the update to take effect, follow the steps below:

4. Click Project > Rebuild all.5. Click Online > Login.

Adding another driveThe below instructions detail how to copy the program and the visualizations for another drive. The below image shows what the structure of the function blocks looks like when there are multiple drives.

3

Page 18: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

18 Customization

Copying the program for another driveThe instructions below outline how to copy the program of a drive in CoDeSys for a second drive.

1. In the left pane, in the POUs tab, right-click PRG_Drive1 (PRG) and click Copy Object.

A Copy Object dialog opens.

2. Change the name if necessary and click OK.

The new drive program appears in the POUs tab.

3. Double-click the new drive in the POUs tab.

4. In the modbus RTU communication function block, change the SLAVE number to match that of the new drive.

5. In the POUs tab, double-click PLC_PRG (PRG).

6. Right-click the gray bar with 0001 on it (see the picture) and click Copy.

7. Right-click again and click Paste.

The copied instance of the program appears below the first one.

8. Double-click the name of the new block and change it to PRG_Drive2.

9. Click Project > Rebuild all.10. Click Online > Login.

11. Click Online > Create boot project.

Information on LineCom1 as a global variableThe LineCom1 variable, which must be connected to all LINE_TOKEN inputs of all ACS3XX_COM_MOD_RTU function blocks in all programs, must be declared as a global variable. This is already done in the example program and can be seen below:

1

2

3

4

8

5

6

Page 19: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Customization 19

1. Open the Resources tab.

2. Select Global_Variables.

3. See declaration of LineCom1 of type ACS_MOD_TOKEN_TYPE.

Creating a visualization for a copied drive programYou can copy the visual elements of a drive for another drive to enable monitoring each drive through the visualization.

1. Open the Visualization tab and double-click the PLC_VISU element to open the visualization.

2. Copy-paste the elements of the first drive (ie, right-click and Copy, then right-click and Paste each of them).

3. Arrange the copied elements, for example, next to the original ones.

4. Double-click a copied element.

5. With Category: Visualization selected, click Placeholder….

The Replace placeholders window opens.

6. In the Replacement tab, change the name, eg PRG Drive2 FB BASIC CONTROL.

7. Click OK and OK to accept the changes.

8. Repeat the previous steps for other copied elements.

1

2

3

6

5

4

7

Page 20: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

20 Customization

Using visualizationsThe visualization of a project can be used to monitor states in the function blocks, and errors and actual values. See the image below.

Controlling the drive with the visualizationTo use the visualization to control the drive, disconnect all inputs of the function block to be controlled with the visualization in the program.

For example, to control START, STOP_COAST, RESET and SPEED_REF through the visualization, disconnect them from the FB_BASIC_CONTROL function block.

Once disconnected, you can set the input values directly in the visualization element. In this example, START, STOP_COAST, RESET and SPEED_REF can be set through the visualization.

Page 21: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Customization 21

Configuring parameters to be read from the driveThe ACS3XX_COM_MOD_RTU function block can read up to 8 parameters from the ACS3xx drive.

The ACS3xx drive parameters 53.10…53.17 determine which parameters are read from the drive. Give the values in the format XXYY, where XX is the parameter group and YY is the parameter index of the parameter to be read. For example, the value 104 corresponds to parameter 01.04 CURRENT.

Set parameter 53.10 to either 101 (calculated motor speed) or 103 (calculated drive output frequency). You can freely choose which parameters to map to parameters 53.11…53.17.

For instructions on how to set parameter values, see ACS355 user’s manual (3AUA0000066143 [English]).

If more than three parameters are configured to be read, change the value of NVAR_READ in the ACS3XX_COM_MOD_RTU function block as instructed below.

1. In CoDeSys, go offline by clicking Online > Logout.2. In the ACS3XX_COM_MOD_RTU function

block, change the value of NVAR_READ to correspond to the number of parameters read + 1 (the number includes the status word).

3. Go back online by clicking Online > Login.

An Online Change dialog opens.

4. Click Yes.

The visualization is updated to reflect the changes made.

5. To keep the changes for the next reboot, click Online > Create boot project.

Configuration exampleIn this example, six parameters are configured to be read from an ACS355 drive by the function block. The following values are given to parameters 53.10…53.16:

Parameter set in the drive

Value Parameter read from the drive

Function

53.10 101 01.01 SPEED & DIR Calculated motor speed in rpm. A negative value indicates reverse direction.

53.11 104 01.04 CURRENT Measured motor current (1 = 0.1 A).

53.12 305 03.05 FAULT WORD 1 A 16-bit data word that indicates faults in the drive.

53.13 110 01.10 DRIVE TEMP Measured IGBT temperature in (1 = 0.1 °C).

53.14 114 01.14 RUN TIME (R) Elapsed drive running time in hours.

53.15 105 01.05 TORQUE Ratio of calculated motor torque to the motor nomi-nal torque (1 = 0.1% of the nominal torque).

Page 22: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

22 Customization

The value of the NVAR_READ input is changed accordingly. Because there are six parameters to be read (plus one for the status word), NVAR_READ is changed to 7 as instructed above. Once the program is back online, the visualization changes to show the values of the parameters read from the drive:

Using the read parameters in the programThe parameters read from the drive appear as variables named awACT_PARAMETERS[1…9] in CoDeSys. The first index in the array corresponds to the status word, and indexes 2…9 correspond to the parameters mapped to be read. For example, if parameter 53.13 is set to 110 (01.10 DRIVE TEMP), awACT_PARAMETERS[5] gets the value of the parameter.

Word-to-integer conversion for variables with negative valuesThe data type (word) of the READ_VALUE output values in the ACS3XX_COM_MOD_RTU function block permits only non-negative values, but it is possible to use a word-to-integer conversion to enable also negative values. In the following example, awACT_PARAMETERS[7] is converted to a new variable, iTorque which represents the torque and direction of motor rotation.

Declare the iTorque variable as integer:

iTorque: INT;

The value is then converted into an integer as shown below. The negative value represents reverse direction in this example.

Page 23: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Function blocks and program structure 23

4Function blocks and program structure

What this chapter containsThis chapter presents an overview of the function blocks of the ACS Drives Libraries.

Function block programming overviewThe main advantage of using function blocks is that it is easy to control drives and there is no need to master the details of the ABB Drives profile.

Function block programming also allows for a modular design and customization for the requirements of the application in question. The ACS Drives Base Library in the starter kit features several types of control blocks, for both basic and advanced applications.

Page 24: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

24 Function blocks and program structure

Program structureMain program

In the example project, the main program is named PLC_PRG. The main program includes a call to PRG_Drive1 (see below). If there are multiple drives, add a program for each additional drive (see Adding another drive on page 17).

PRG_Drive1 program PRG_Drive1 contains the function blocks for the drive. The image below shows the main components of PRG_Drive1 (FB_COM, FB_BASIC_CONTROL and speed reference) and their functions.

Page 25: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Function blocks and program structure 25

DriveRefThe DriveRef (DRIVE_DATA) variable must be connected to all function blocks of the drive to exchange data.

Main components of the example programModbus RTU communication function block (FB_COM)

FB_COM is a communication function block for Modbus RTU. It controls the communication to the drive and cyclically reads the status word, actual speed, and up to seven more parameters from the drive. When there are changes in the control word or the speed reference values, the function block writes the new values in the drive.

Refer to the online help for a detailed description of the function block and its inputs and outputs. For additional instructions, see the below sections in this manual:• You can set the slave address as described in Configuring the slave address of the

drive on page 17.• If more than one drive is used, the LineCom1 variable in the LINE_TOKEN input must

be declared as global. See Information on LineCom1 as a global variable on page 18.• For a description of the DRIVE_DATA variable DriveRef, see DriveRef on page 25.• If more parameters are to be read from the drive, adjust NVAR_READ and set the

parameters (53.10…53.17) in the drive. See Configuring parameters to be read from the drive on page 21.

Basic control block (FB_BASIC CONTROL)The FB_BASIC_CONTROL function block is used for basic control of the drive, including speed scaling of the actual speed and reference value to rpm or 0.1 Hz.

The FB_BASIC CONTROL function block is the default control block in the example project. It is interchangeable with the function blocks presented in Other control blocks below. A drive may have one active control block.

See the online help for detailed information on the inputs and outputs of the function block. See Using the online help in CoDeSys on page 15 for information on the use of the online help.

The function block functions only with the ABB Drives profile.

Page 26: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

26 Function blocks and program structure

Speed reference generationIn the example program, speed reference is generated according to the dip switches (DI_FASTER, DI_SLOWER and DI_REVERS) and the maximum reference limit.

The maximum reference limit is read from the drive parameter 11.05 (REF1 MAX) at the first start of the ACS3XX_DRIVES_CTRL_BASIC function block and is stored in config.iRefScaleMax, a sub-element of the DriveRef variable.

The limit depends on the selected motor control mode. There are two possible motor control modes, detailed below. Drive parameter 99.04 Motor Control Mode determines the mode used.• Scalar mode: The default mode is the scalar mode. The default value for the drive

parameter REF1 MAX is 500 (which corresponds to 50 Hz).• Vector mode: In the vector mode, the drive paramter REF1 MAX is set to the

maximum speed given in rpm, eg 1500.

If you change the motor control mode, the scaling parameter has to be read again by reseting EN of ACS3XX_DRIVES_CTRL_BASIC. This can be done by powering off and on again the 24V DC of the AC500.

DI_FASTER, DI_SLOWER and DI_REVERS are used in the example project as shown in the below image. See the quick installation guide for the dip switch settings in the ACS355 and AC500-eCo starter kit.

Other control blocksYou can use the following two control blocks as alternatives for the basic control block.

ACS_CTRL_ABB_DRV_PROFILEIf advanced control is needed, the ACS_DRIVES_CTRL_STANDARD function block can be used instead of the FB_BASIC_CONTROL function block. Refer to the online help for a detailed description of the function block.

Page 27: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Function blocks and program structure 27

ACS_DRIVES_CTRL_ENGFor system applications, the engineering block ACS_DRIVES_CTRL_ENG can be used. Refer to the online help for a detailed description of the function block.

Page 28: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

28 Function blocks and program structure

Page 29: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description
Page 30: ACS355 and AC500-eCo application guide - Logic Control · ACS355 user’s manual 3AUA0000066143 2) AC500-eCo and ACS355 quick installation guide 2CDC125145M0201 1) System description

Ord

er n

umbe

r 2C

DC

125

152

M02

01

Contact us

ABB STOTZ-KONTAKT GmbHP.O. Box 10168069006 Heidelberg, GermanyTelephone +49 (0) 6221 701-0Fax +49 (0) 6221 701-240E-Mail [email protected]

www.abb.com/plc

ABB OyDrivesP.O. Box 184FI-00381 HELSINKIFINLANDTelephone +358 10 22 11Fax +358 10 22 22681www.abb.com/drives

Note:We reserve the right to make technical changes or modify the contents of this document without prior notice. With regard to purchase orders, the agreed particulars shall prevail. ABB AG does not accept any responsibility whatsoever for potential errors or possible lack of information in this document.We reserve all rights in this document and in the subject matter and illustrations contained therein. Any reproduction, disclosure to third parties or utilization of its contents – in whole or in parts – is forbidden without prior written consent of ABB AG.

Copyright© 2011 ABBAll rights reserved