ACSM1 Application Guide Fieldbus Control with FPBA-01 PROFIBUS DP Adapter Module and ABB AC500 PLC
ACSM1 Drive Manuals DRIVE HARDWARE MANUAL* ACSM1-04 Drive Modules (0.
Fieldbus Control with FPBA-01 PROFIBUS DP Adapter Module and ABB AC500 PLC Application Guide 3AUA0000049359 Rev C EN EFFECTIVE: 2010-05-03 © 2010 ABB Oy. All Rights Reserved.
Table of contents Table of contents Introduction to the manual Applicability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Purpose of the manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Contents of the manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installing the PS551-MC Motion Control Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Installing additional GSD files and libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38 Setting the drive control program parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 Setting up the communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Description of the program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Loading sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of contents
Introduction to the manual What this chapter contains This chapter describes the target audience, purpose and contents of this manual. Applicability The manual is compatible with ACSM1-04 and ACSM1-04LC drive modules of frame sizes from A to E. Safety instructions Follow the safety instruction given in ACSM1-04 Drive Modules (0.75 to 45 kW) Hardware Manual (3AFE68797543 [English]). The main instructions are repeated below.
Target audience This manual is intended for people who plan the drive application control, commission, use, and service the drive with fieldbus communication. Read the ACSM1 firmware and hardware manuals before working on the drive. You are expected to know the fundamentals of electricity, wiring and electrical components as well as drive control methods, fieldbus communication concepts and function block programming.
• ACSM1 Speed and Torque Control Program Firmware Manual (3AFE68848261 [English]) • PROFIBUS DP Adapter Module FPBA-01 User’s Manual (3AFE68573271 [English]) • User Manual for PS551-MC (Motion Control library for ABB PLC AC500) according to Technical Specification PLCopen – Technical Committee 2 – Task Force; Function Blocks for motion control • User Manual for PLC Programming with CoDeSys 2.
Introduction to the manual
Fieldbus control description What this chapter contains The chapter describes how the drive can be controlled by external devices over a communication network. System overview The drive can be connected to a fieldbus controller via a fieldbus adapter module. The adapter module is connected to drive Slot 3.
Setting up communication through a fieldbus adapter module Before configuring the drive for fieldbus control, the adapter module must be mechanically and electrically installed according to the instructions given in the User’s Manual of the appropriate fieldbus adapter module. The communication between the drive and the fieldbus adapter module is activated by setting parameter 50.01 FBA ENABLE to (1) ENABLE. The adapter-specific parameters must also be set. See the table below.
Setting for fieldbus control Parameter Function/Information TRANSMITTED DATA SELECTION 52.01 FBA DATA IN1 … 52.12 FBA DATA IN12 0 4…6 14…16 101…9999 Defines the data transmitted from drive to fieldbus controller. 53.01 FBA DATA OUT1 … 53.12 FBA DATA OUT12 0 1…3 11…13 1001…9999 Defines the data transmitted from fieldbus controller to drive. Note: If the selected data is 32 bits long, two parameters are reserved for the transmission.
The fieldbus control interface The cyclic communication between a fieldbus system and the drive consists of 16/ 32-bit input and output data words. The drive supports at the maximum the use of 12 data words (16-bit) in each direction. Data transmitted from the drive to the fieldbus controller is defined by parameters 52.01…52.12 (FBA DATA IN) and data transmitted from the fieldbus controller to the drive is defined by parameters 53.01…53.12 (FBA DATA OUT).
The Control Word and the Status Word The Control Word (CW) is the principal means of controlling the drive from a fieldbus system. The Control Word is sent by the fieldbus controller to the drive. The drive switches between its states according to the bit-coded instructions of the Control Word. The Status Word (SW) is a word containing status information, sent by the drive to the fieldbus controller.
When torque or speed reference scaling is selected (by parameter 50.04 FBA REF1 MODESEL / 50.05 FBA REF2 MODESEL), the fieldbus references are 32-bit integers. The value consists of a 16-bit integer value and a 16-bit fractional value. The speed/torque reference scaling is as follows: Reference Scaling Notes Torque reference FBA REF / 65536 (value in%) Final reference is limited by parameters 20.06 MAXIMUM TORQUE and 20.07 MINIMUM TORQUE.
State diagram The following presents the state diagram for the FBA communication profile. For other profiles, see the User’s Manual of the appropriate fieldbus adapter module. FBA Communication Profile from any state from any state (FBA CW Bits 7 = 1) Fault (FBA SW Bit 16 = 1) FAULT RUN DISABLE (FBA SW Bit 1 = 0) (FBA CW Bit 7 = 0) (FBA CW Bit 8 = 1) Par. 10.
Fieldbus control description
Starting up the FPBA-01 adapter for different communication profiles Overview This chapter presents the steps to take during the start-up of the FPBA-01 PROFIBUS DP Adapter Module with the drive. For more detailed information, see PROFIBUS DP Adapter Module FPBA-01 User’s Manual (3AFE68573271 [English]). WARNING! Follow the safety instructions given in this manual and in the hardware manual of the drive. Mechanical and electrical installation • Insert the FPBA-01 into its specified slot in the drive.
Parameter setting examples This section gives the recommended drive parameter settings for different communication profiles. For more information on the communicaton profiles used in the communication between the PROFIBUS network, the FPBA-01 module and the drive, such as the contents of the Control Word and Status Word and the state machines of the profiles, refer to PROFIBUS DP Adapter Module FPBA-01 User’s Manual (3AFE68573271 [English]): chapter Communication profiles.
PROFIdrive communication profile (Speed Control Mode) with PPO Type 1 The start/stop commands and reference are according to the PROFIdrive profile Speed Control Mode. A reference value of ±16384 (4000h) corresponds to parameter 25.02 SPEED SCALING in forward and reverse directions. Direction PZD1 PZD2 Out Control Word Speed reference In Status Word Speed actual value The table below gives the recommended drive parameter settings. Drive parameter Name Value Description 50.
ABB DRIVES communication profile (Speed/Torque Control Mode) with PPO Type 4 The start/stop commands and reference are according to the ABB DRIVES profile Speed Control Mode. When Reference 1 (REF1) is used, a reference value of ±20000 (4E20h) corresponds to the reference set by parameter 25.02 SPEED SCALING in the forward and reverse directions. When Reference 2 (REF2) is used, a reference value of ±10000 (2710h) corresponds to the reference set by parameter 32.
53.02 FBA DATA OUT2 2 Reference 1 53.03 FBA DATA OUT3 3 Reference 2 51.27 FBA PAR REFRESH REFRESH Refreshing parameter settings of the module *Read-only or automatically detected/set **Example The start sequence for the parameter example above is given below. Control Word: 47Eh (1150 decimal) => READY TO SWITCH ON 47Fh (1151 decimal) => OPERATING (Speed mode) C7Fh (3199 decimal)=> OPERATING (Torque mode).
PROFIdrive communication profile (Positioning Mode) with PPO Type 4 The start/stop commands and reference are according to the PROFIdrive profile Positioning Mode. The Position setpoint and velocity reference are defined as 32-bit integer values; both are scaled as defined by drive parameter settings.
51.05 PROFILE 4 (= PROFIdrive Positioning) Control Word according to the PROFIdrive Positioning mode 52.01 FBA DATA IN1 4* Status Word 52.02 FBA DATA IN2 15 Actual value 1 52.04 FBA DATA IN4 16 Actual value 2 53.01 FBA DATA OUT2 1* Control Word 53.02 FBA DATA OUT2 12 Reference 1 53.04 FBA DATA OUT4 13 Reference 2 51.
The velocity setpoint and actual values are scaled with the above example values as follows: 1000 / 100 = 10.00 m/s 60.10 POS SPEED UNIT Physical value 60.
Starting up fieldbus communication and programming the ABB PLC (one-drive system) What this chapter contains This chapter presents the steps to take during the start-up of the drive fieldbus control with ABB AC500 PLC and PROFIBUS DP adapter module. A system with one drive is set up. For a system where two drives are controlled simultaneously, see also chapter Starting up fieldbus communication and programming the ABB PLC (multi-axis systems), page 105.
Equipment and programs Equipment used in the examples: • ACSM1-04 demosuitcase (order code 68836808) containing two ACSM1-04AM02A5-4 drives with FPBA-01 PROFIBUS DP Adapter Modules • AC500 demosuitcase TA510-CASE: AC500 PLC *) equipped with a CPU of type PM571 and a communications module, CM572-DP, for communication over PROFIBUS DP field. Programs used in the examples: • ACSM1 Motion Control Program version UMFI1480 • ABB DriveStudio PC tool • AC500 Control Builder PS501 *).
Start-up flowchart The steps of the start-up procedure are presented below. Perform the steps from first to last. No. Task ELECTRICAL INSTALLATION 1 Connect the PC RJ-45 cable to drive terminal X7. Description / See instruction In this section, you wire the equipment used in this programming example. ACSM1-04 Drive Modules Hardware Manual (3AFE68797543 [English]) Page 34 2 Connect the PLC fieldbus master (CM572-DP) to the fieldbus adapter module (FPBA-01) of the drive.
No. 2 Task Set up the communication. Description / See instruction In this section, you configure communication between the PLC and the drive. Setting up the communication, page 45 • Create a new project, page 45 • Configure communication with the SYCON fieldbus configurator, page 50 3 Program the main program to the PLC. In this section, you program function blocks for communication and basic drive control.
No. Task Description / See instruction – – – TWO - D R I V E S Y S T E M – – – Set up the communication. Program the main program to the PLC. Program actions to the PLC program. Program the visualization. Run and test the program. In this section, you program additional function blocks for the second drive for communication and basic drive control, and program additional actions and visualizations, and run and test the program.
Connections PC: - DriveStudio - AC500 Control Builder PS501 COM ACSM1-04 6 9 8 7 5 1 2 3 4 FPBA-01 Connections for the setup in section Starting up fieldbus communication and programming the ABB PLC (multi-axis systems), page 105 Note: Both drives are followers/slaves for the communication module of the PLC.
Installing the DriveStudio PC tool Insert the DriveStudio installation CD into the CD drive of your the PC. Follow the instructions given by the installation program. For more information, see DriveStudio online Help folder DriveStudio: Installing and uninstalling. Installing the AC500 Control Builder PS501 software 1. Insert the AC500 Control Builder PS501 installation CD into the CD drive of your PC. Click the Read me first button and read the instructions. 2. Click the Installation PS501 button.
3. Click the Read me for installation button and read the instructions. 4. Click the Step 1: Installation Control Builder PS501 button. Follow the instructions. 5. Click the Step 2: Installation Fieldbus Configuration SYCON.net button. Follow the instructions. 6. Click the Installation GSD and ESD files button. Follow the instructions. 7. Click the Opt. 1: Installation CodeSys Service Tool.
Installing the PS551-MC Motion Control Library Insert the PS551-MC Motion Control Library for AC500 (code: 1SAP190600R0001) installation CD into the CD drive of your the PC. If the installation does not start automatically, double-click setup.exe.
Installing additional GSD files and libraries The GSD file DP-V0 for the FPBA-01 fieldbus adapter module (ABB0959.gsd) is included in the PS551-MC Motion Control Library CD and was installed in the previous step. The GSD files DP-V0 and DP-V1 for FPBA-01 can also be found at the manufacturer’s website. Go to www.abb.com and select Product Guide / Drives / Drive Options / Fieldbus Options. From the Please select category list, select “..FPBA - PROFIBUS (3)”.
If needed, copy additional GSD files to the following folder in your PC: C:\Program Files\Hilscher GmbH\SYCONnet\ABBPBGenericSlaveDTM\GSD.
Setting the drive control program parameters Step This section lists the ACSM1 Motion Control Program parameter settings that you need to do for successful communication with the FPBA-01 fieldbus adapter module. If needed, set also other parameters to meet the application needs. For more information on the parameters, refer to ACSM1 Motion Control Program Firmware Manual (3AFE68848270 [English]). For advice on using the DriveStudio, refer to the DriveStudio online Help. 1. Open the DriveStudio. 2.
Step Setting the drive control program parameters Starting up fieldbus communication and programming the ABB PLC (one-drive system)
Step Setting the drive control program parameters Starting up fieldbus communication and programming the ABB PLC (one-drive system)
Step Setting the drive control program parameters Starting up fieldbus communication and programming the ABB PLC (one-drive system)
Step Setting the drive control program parameters Starting up fieldbus communication and programming the ABB PLC (one-drive system)
Tool/Step Setting up the communication CoDeSys For setting up communication between the PLC and the drive, first, create a new project. After that, you can open the SYCON.net configuring tool and configure the communication. Create a new project 1. Open the AC500 Control Builder PS501 programming tool by double-clicking the icon: Installation path: C:\Program Files\3S Software\CoDeSys V2.3\Codesys.exe 2. Select from the File menu New. -> Dialog box Target settings opens. 3.
Tool/Step Setting up the communication 4. In the New POU dialog box, select as shown below. 5. -> The programming view opens. Open the Resources field by clicking its tab.
Tool/Step Setting up the communication 6. In the Resources folder, double-click PLC Configuration. 7. In the PLC Configuration dialog box, click the plus sign to open the AC500 folder.
Tool/Step 8. Setting up the communication Right-click the Couplers[FIX] folder. Select Append Subelement and CM572 External-PROFIBUS DP Master….
Tool/Step Setting up the communication 9. In the Couplers[FIX] folder, right-click the Internal - none[SLOT] file and select Replace element and PM5x1-ETH - Internal-Ethernet. 10. From the File menu, select Save as and name the project. Click Save.
CoDeSys Tool/Step Setting up the communication Configure communication with the SYCON fieldbus configurator 1. Open the project that you created. 2. Click the Resources tab to show the Resources folders. 3. Under Tools, double-click SYCON.net .
SYCON.net Tool/Step Setting up the communication 4. -> The SYCON.net tool opens: 5. From the Network menu, select the Device Catalog… command. Click the Reload button. -> PROFIBUS options appear in the ABB Oy folder. Click OK.
Tool/Step 6. Setting up the communication Drag and drop CM572-DPM on the green line. In the netConnect-Driver Parameter dialog box, select 1 for the Board no: box. This is because the CM572DP communications module is installed next to the CPU on the left-hand side in the installation example of this manual.
Tool/Step 7. Setting up the communication Drag and drop the FPBA-01 DP-V0 on the purple line.
Tool/Step Setting up the communication 8. In the netDevice field, right-click the CM572-DPM icon. Select Configuration. In the Navigation area field, click 3S Gateway Driver. Click the Gateway Configuration button. 9. In the Communication Parameters dialog box, set the communication parameters according to the serial port of your PC. See Appendix A - How to find out the serial communication parameter values of your PC?.
Tool/Step Setting up the communication 10. In the Pages Three-View, click Device Assingnment. Activate the device by ticking it. 11. In the Pages Tree-view, click Configuration / Bus Parameters. In the Bus Parameters dialog box, set the Baud Rate. If there is warning sign, click the Adjust button and set the other timing parameters.
Tool/Step 12. Setting up the communication In the Pages Tree-view, click Station Table under Configuration. Set the station address for the FPBA-01. Click the Apply button and then OK. Note: The station address here must be the same as the value of Parameter 51.02 FBA PAR2 in the drive control program. Set parameter Parameter 51.02 FBA PAR2 with DriveStudio.
Tool/Step 13. Setting up the communication Right-click the ABB Drives FPBA-01 icon connected to the purple line in the netDevice field. In the Navigation area field, click Modules in the Configuration folder. In the Available modules: box, select PPO-05. Click the Insert button and then Apply and OK.
Tool/Step 14. Setting up the communication In the Configuration folder, click Parameters. Set the values of parameters Fail Safe mode and Control-zero mode as shown below.
Tool/Step 15. Setting up the communication In the netConnect field, click PPO-5, 4PKW + 10 PZD . -> A list of inputs and outputs appears.
Tool/Step Setting up the communication 16. Name the signals. In this example configuration, Input 1 is named field_in1 and Output 1 field_out1. Note: You can name all signals here and they will be automatically in use in the Control Builder. 17. Check that the PLC is in the Stop state (Stop in the display). Note: The downloading is not possible if the PLC is in the Run state. 18. Download the communication configuration to the PLC: first, right-click the CM572DPM icon and, then click Download.
CoDeSys Tool/Step Setting up the communication 19. When the downloading is completed, right-click the CM572-DPM icon and then click Disconnect. 20. Save the project with the Save command under the File menu. 21. Close the SYCON.net tool. 22. Variables field_in1 and field_out1 are now found in the Resources sheet, under Global variables.
Starting up fieldbus communication and programming the ABB PLC (one-drive system)
Tool/Step Programming the PLC main program In this section, you program the PLC main program which contains function blocks for communication and basic drive control. For detailed function block descriptions, refer to • CoDeSys Help (Press F1 in CoDeSys software) • User Manual for PLC Programming with CoDeSys 2.
Tool/Step 3. Programming the PLC main program Select the following libraries and click Open.
Tool/Step 4. Programming the PLC main program Double-click the PS551-MC folder and select the following libraries. Click Open. Note: If you cannot see the PS551-MC folder, you have copied the motion control libraries to another folder, or you have not copied them at all.
Tool/Step 5. Programming the PLC main program In this example, the following libraries were inserted. Add function block ACSM1_ACCESS_dc ACSM1_ACCESS_dc is an interface block that converts the PLC commands to the control word format of the ACSM1. The control word is in PROFIdrive positioning mode. 1. Click the POUs tab. In the POUs field, double-click PLC_PRG(PRG). -> The Box tool for adding function blocks appears in the tool bar. Click the Box button.
Tool/Step Programming the PLC main program 2. Replace the default text AND with text acsm1_access_dc. Now, the CoDeSys program recognizes the function block and the block appearance changes automatically. 3. Name the function block access_axis1 and press Enter.
Tool/Step 4. Programming the PLC main program -> The Declare Variable assistant appears. In the Class dialog box, select VAR_GLOBAL which denotes global variables. The content of box Type is configured automatically to ACSM1_ACCESS_dc. Click OK. Note 1: If you want to call Declare Variable assistant again, click on the demanded variable and press Shift+F2. Note 2: When defining inputs, you can use help of Input assistant. Click on the demanded input and press F2. 5.
Tool/Step Programming the PLC main program 6. Configure input axis. Name it axis1 and press Enter. Class: VAR_GLOBAL. Type: AXIS_REF. Note: AXIS_REF is not configured automatically, you must type it. Click OK. 7. Select the left-hand side of input field_in. Click the Box button in the tool bar. Name the new function block ADR which denotes address. Press Enter. Repeate the same for input field_out. Note: Inputs field_in1 and field_out1 were configured with SYCON.net on page 60.
Tool/Step 8. Programming the PLC main program In this section a new program row is made before the access_axis1 block. This is because the state of input switches Off1, Off2 and Off3 must be TRUE before starting block access_axis1 when the program is run. Right-click somewhere in the blank area to open the following menu and select Network (before). -> A new programmable area (program row 0001) is made. The switches have to go to the TRUE state in the following order: Off2, Off3 and Off1.
Tool/Step Programming the PLC main program The program made so far is shown below. Right-click in the blank area and select Network (after) from the menu. Add the following blocks to the main program: MC_ReadStatus, MC_ReadActualPosition, MC_ReadAxisError, MC_Reset, MC_Power. Configuring the blocks is described below.
Tool/Step Programming the PLC main program Add function block MC_ReadStatus This function block returns in detail the status of the axis with respect to the motion currently in progress. Name the block mc_reads. Press Enter. Class: VAR; Type: MC_ReadStatus. The block must be enabled all the time -> name input Enable TRUE. Name input Axis axis1 which is already configured. Add function block MC_ReadActualPosition This function block returns the actual position. Name the block mc_readpos. Press Enter.
Tool/Step Programming the PLC main program Add function block MC_Reset This function block makes the transition from state ErrorStop to STANDSTILL by resetting all internal axis-related errors. It does not affect the output of the function block instances. Class: VAR, Type: MC_Reset. Add global variable reset_axis1 for switching purposes, because the reset block cannot be active constantly, Class: VAR_GLOBAL, Type: BOOL.
Tool/Step Programming the PLC main program The complete main program is shown here The complete program is shown below. The local variables are shown in the righthand-side top field. The global variables are shown below when the Resources field is clicked open.
Tool/Step Programming the PLC main program View of the main program rows: Starting up fieldbus communication and programming the ABB PLC (one-drive system)
Tool/Step Programming the PLC main program Starting up fieldbus communication and programming the ABB PLC (one-drive system)
Tool/Step Programming actions In this section, you program actions and add them to the PLC main program. Actions are needed for controlling the motor movement. PLCopen library offers many simple and very useful functions for the ACSM1. For detailed function block descriptions, refer to • CoDeSys Help (Press F1 in CoDeSys software) • User Manual for PLC Programming with CoDeSys 2.
Tool/Step Programming actions 2. Name the action for example velocity. Select FBD for the programming language. Click OK. 3. -> An empty programming space appears.
Tool/Step Programming actions 4. Create separate actions which are needed in the program for example homing, position_toggle, positioning, relative, stop and velocity. 5. Program the actions in the same way as you programmed the function blocks in the main program. For example, under action velocity there will be function block MC_MoveVelocity. For programming the blocks, see the next steps.
Tool/Step Programming actions Program velocity (MC_MoveVelocity) This Function Block commands a never ending controlled motion at a specific velocity. By clicking the Box tool button, insert a new box. Replace the default text AND with MC_MoveVelocity. Name the block, for example, movevelo1, Class: VAR, Type: MC_MoveVelocity. Name the Execute input velo1, Class: VAR_GLOBAL, Type: BOOL.
Tool/Step Programming actions The block in the previous picture runs axis1 constantly at velocity 200. The speed and position scaling is defined by setting drive control program parameters of group 60 POS FEEDBACK, see page 42. With the settings on page 42, a speed reference of 1000 corresponds to a speed of 1000 rpm that means 1000 motor axis rotations per minute. Program stopping (MC_Stop) This function block commands a controlled motion stop and transfers the axis to the STOPPING state.
Tool/Step Programming actions Program positiong (MC_MoveAbsolute) This function block commands a controlled motion to a specified absolute position. By clicking the Box tool button, insert a new box. Replace the default text AND with MC_MoveAbsolute. Name the block, for example, absolute1, Class: VAR, Type: MC_ MoveAbsolute. Name input Execute move_pos1, Class: VAR_GLOBAL, Type: BOOL. Define inputs Position, Velocity, Acceleration and Deceleration with numeric values.
Tool/Step Programming actions Program relative movement (MC_MoveRelative) This function block commands a controlled motion of a specified distance relative to the actual position at the time of the execution. By clicking the Box tool button, insert a new box. Replace the default text AND with MC_MoveRelative. Name the block, for example, relative1, Class: VAR, Type: MC_ MoveRelative. Name the Excecute input move_rel1, Class: VAR_GLOBAL, Type: BOOL.
Tool/Step Programming actions Program homing (MCA_Home) This function block commands the axis to perform the Search home sequence. The details of this sequence depend on the drive manufacturer and can be set by the axis parameters. The Position input is used to set the absolute position when a reference signal is detected. The execution of this function block comes to an end at the STANDSTILL state. By clicking the Box tool button, insert a new box. Replace the default text AND with MCA_Home.
Tool/Step Programming actions Starting up fieldbus communication and programming the ABB PLC (one-drive system)
Tool/Step Programming actions Row 0001 This section is the main switch. When the drive needs to be stopped, function block SEL sets the value of output pos_step to 0. Otherwise the value of output pos_step remains unchanged and the program keeps running. Row 0002 This section starts up the whole program sequence and repeats it as long as the value of input move_toggle1 is TRUE. Block trigger2 is needed for the first start-up.
Tool/Step Programming actions Call the actions into the main program To activate the actions that you created, call them into the main program: • In the POUs field, double-click PLC_PRG(PRG). • Right-click and select Network (after) from the opening menu. • Click the Box tool button and name the appearing box homing. • Repeat the procedure for the other actions and give the boxes the same names as in the configuring steps before. See the next page for the program rows.
Tool/Step Programming actions The action boxes are shown at the end of the main program as follows.
CoDeSys Tool/Step Programming visualizations In this section, you program visualizations. By visualizations, you create the user interface for the PLC program: buttons, switches and indicators for measuring, viewing and controlling the movement. The PS551-MC Motion Control Library for ABB PLC AC500 also contains ready-made visualization elements for the ACSM1, for example, the ACSM1 MainControlWord and Axis StateMachine.
Tool/Step Programming visualizations Create an empty visualization field Click the Visualization tab. Right-click the Visualizations folder. From the menu opening, select Add Object…. Name the New Visualization, for example, visu1 and click OK.
Tool/Step Programming visualizations Create buttons Create buttons for the needed switches, for example, for each global variable: In our example, buttons are made for off1_3, enable_axis1, reset_axis1, velo1, stop_axis1, move_pos1, move_home_axis1, move_rel1 and move_toggle1. How to create and configure a button 1. In the upper tool bar, click the OK button and drag with the cursor a rectangle in visualization field.
Tool/Step Programming visualizations 2. Configure the button as follows. Right-click the button. From the menu opening, select Configure. 3. In the Category: dialog box, select Text. To the Text Content: dialog box, write the name for the button, for example, Off1_3 which indicates the action the button will perform.
Tool/Step 4. Programming visualizations In the Category: dialog box, select Input. Under Input, tick Toggle variable and write the name of the input to the dialog box, in this case global variable off1_3. Click OK. Note: When defining inputs, you can use help of Input assistant. Click on Toggle variable field and press F2. Now, you have created a button with which you can switch the value of global variable off1_3 between FALSE and TRUE.
Tool/Step 5. Programming visualizations After making all buttons, the visualization field looks like this. Table below indicates the buttons and variables to which the buttons must be toggled.
Tool/Step Programming visualizations Create indicators 1. In the upper tool bar, click the Bar display button and drag with the cursor a bar in visualization field. -> Configure bar display dialog box opens. Click the Varible/ Scale button. 2. Set the scale. Write the name of the indicated variable (actual_pos_axis1 in this case) in the Variable: box. Click OK and OK. -> The indicator has been created.
Tool/Step Programming visualizations Create visuaization elements 1. Visualization elements are ready-made visualization components. In the upper tool bar, click the Visualization button and with the cursor drag a rectangle in the visualization field. In the opening Select Visualization dialog box, select the visualization, MC_VISU_ACSM1_mcw, in this case. Click OK.
Tool/Step 2. Programming visualizations Double-click the created element. In the Visualization dialog box that opens, click the Placeholder… button. In the Replace placeholders dialog box, write .access_axis1 to the Replacement field. This points to the access_axis1 function block. Click OK and OK.
Tool/Step 3. Programming visualizations Add other elements in the same way as described above. Note: In the Replacement field, write .access_axis1 for the ACSM1 main control word and main status word visualizations. Write .axis1 for the Axis actual values and Axis state machine values visualizations. The replacement points always to the values that the visualization is presenting. Here is an example of the finished visualization.
Tool/Step Running and testing the program CoDeSys In this section, you download the program to the PLC. Thereafter, you can run the program and test it. Load the program to the controller 1. Turn the drive on with the I/O switch of the demosuitcase. 2. Turn the PLC on with the on/off switch in its demosuitcase. For the location of the on/off switch, refer to the photo on page 34.
Tool/Step Running and testing the program 3. From the Online menu, select Communication Parameters…. Check that the communication parameters correspond to the serial port of your PC (see Appendix A - How to find out the serial communication parameter values of your PC?). 4. Open the AC500 Control Builder PS501 programming tool by double-clicking the CoDeSys icon in the desktop of your computer. 5. Click the Visualization tab.
Tool/Step 6. Running and testing the program From the Online menu, click Login. The program asks you to download the program to the controller. Click Yes. If you get a communication error message, Check the cables and connections. From the Online menu, select Communication Parameters… and remove irrelevant communication parameters. Configure the communication with the SYCON.net again and download the configuration as described above.
Tool/Step Running and testing the program Test the program 1. Start the drive by clicking the Off1_3 button and, after that, the Enable button. -> The drive should start and the values of the first six ACSM1 MainControlWord bits should change to TRUE.
Tool/Step 2. Running and testing the program Test the other actions that you have made by clicking the action buttons. Velocity 1 is running in the following picture.
Starting up fieldbus communication and programming the ABB PLC (one-drive system)
Starting up fieldbus communication and programming the ABB PLC (multi-axis systems) What this chapter contains This chapter presents the additional steps compared to the ones in the previous chapter that you must take during the start-up of the drive fieldbus control with ABB AC500 PLC and PROFIBUS DP adapter module in a multi-axis system. A system with two drives is set up here.
CoDeSys Tool/Step Setting up the communication Configure communication with the SYCON fieldbus configurator 1. Open the project that you created. 2. Click the Resources tab to show the Resources folders. 3. Under Tools, double-click SYCON.net .
SYCON.net Tool/Step Setting up the communication 4. -> The SYCON.net tool opens: 5. From the Network menu, select the Device Catalog… command. Click the Reload button. -> PROFIBUS options appear in the ABB Oy folder. Click OK.
Tool/Step Setting up the communication 6. Drag and drop CM572-DPM on the green line. In the netConnect-Driver Parameter dialog box, select 1 for the Board no: box. This is because the CM572DP communications module is installed next to the CPU on the left-hand side in the installation example of this manual. 7. Drag and drop the FPBA-01 DP-V0 two times on the purple line.
Tool/Step Setting up the communication 8. In the netDevice field, right-click the CM572-DPM icon. Select Configuration. In the Navigation area field, click 3S Gateway Driver. Click the Gateway Communication button. 9. In the Communication Parameters dialog box, set the communication parameters according to the serial port of your PC. See Appendix A - How to find out the serial communication parameter values of your PC?.
Tool/Step Setting up the communication 10. In the Pages Three-View, click Device Assignment. Activate the device by ticking it. 11. In the Pages Tree-view, click Configuration / Bus Parameters. In the Bus Parameters dialog box, set the Boud Rate. If there is warning sign, click the Adjust button and set the other timing parameters.
Tool/Step 12. Setting up the communication In the Pages Tree-view, click Station Table under Configuration. Set the station address for the FPBA-01 fieldbus adapter modules. Click the Apply button and then OK. Note: The station addresses here must be the same as the value of Parameter 51.02 FBA PAR2 in the drive control program. Set parameter Parameter 51.02 FBA PAR2 with DriveStudio.
Tool/Step 13. Setting up the communication Right-click the ABB Drives FPBA-01 icon connected to the purple line in the netDevice field. In the Navigation area field, click Modules in the Configuration folder. In the Available modules: box, select PPO-05. Click the Insert button and then Apply and OK. Do this for the both FPBA-01 units.
Tool/Step 14. Setting up the communication In the Configuration folder, click Parameters. Set the values of parameters Fail Safe mode and Control-zero mode as shown below.
Tool/Step 15. Setting up the communication In the netConnect field, click PPO-5, 4PKW + 10 PZD . -> A list of inputs and outputs appears. Name the signals. In this example configuration, Input_1 is named field_in1 and Output_1 field_out1. Note: You can name all signals here and they will be automatically in use in the Control Builder. 16. Name the signals in the same way for the second drive: Input_1 for field_in2 and Output_1 field_out2.
Tool/Step 17. Setting up the communication Check that the PLC is in the Stop state (Stop in the display). Note: The downloading is not possible if the PLC is in the Run state. 18. Download the communication configuration to the PLC: first, right-click the CM572DPM icon and, then click Download. 19. When the downloading is completed, right-click the CM572-DPM icon and then click Disconnect. 20. Save the project with the Save command from the File menu. 21. Close the SYCON.net tool.
Tool/Step Programming the PLC main program Programming of the PLC main program is described earlier in this manual beginning from page 63. For a system with two drives, program similar function blocks for both drives. In this case, main program for both drives is programmed inside actions, this is done to achieve more clear presentation of the program. Note: Name every function block uniquely, otherwise the program will not work correctly. A list of the Local variables is shown below.
Tool/Step Programming the PLC main program A list of the Global variables is shown below.
Tool/Step Programming the PLC main program The finished main program is shown below.
Tool/Step Programming the PLC main program Starting up fieldbus communication and programming the ABB PLC (multi-axis system)
Tool/Step Programming actions Programming of the actions is described earlier in this manual beginning from page 77. For a system with two drives, program similar actions for the both axes: axis1 and axis2.
Tool/Step Programming actions The program shown below controls a two-axis toggle movement. For a description of the toggle movement, refer to section Program toggling between two positions, page 84.
Tool/Step Programming actions Add the action block toggle_movement to the main program.
Tool/Step Programming visualizations Programming of the visualizations is described earlier in this manual beginning from page 89. An example visualization is shown below.
CoDeSys Tool/Step Running and testing the program Load and test the program as described earlier in this manual beginning from page 99. Clicking order: Click first both Off1_3 buttons and the both Enable buttons. -> The drives should start. Click the Toggle move button. -> The toggle movement should start.
Example program for a two-axis loading machine What this chapter contains This chapter presents an example sequence program which controls a loading machine with two axes. Description of the machine The machine loads boxes. The first axis loads ten items to each box and the second axis moves the filled boxes forward on a conveyor. Diagram of the system Description of the program Loading sequence The first axis toggles between positions 50 and 0.
Program The program for the toggle movement control is shown below.
Example program for a two-axis loading machine
Example program for a two-axis loading machine
Appendix A - How to find out the serial communication parameter values of your PC? What this chapter contains This chapter instructs how to find out the serial communication parameter values of your PC. Tool/Step Go to Windows Control Panel and click the System icon. Microsoft Windows 1.
Tool/Step How to find out the serial communication parameter values of your PC? 2. Click the Hardware tab and then the Device Manager button. 3. In the Ports (COM & LPT) folder, click Communications Port, which is connected to AC500, in this case port (COM1).
Tool/Step 4. How to find out the serial communication parameter values of your PC? The communication port settings are shown.
Appendix A - How to find out the serial communication parameter values of your PC?
Further information Product and service inquiries Address any inquiries about the product to your local ABB representative, quoting the type designation and serial number of the unit in question. A listing of ABB sales, support and service contacts can be found by navigating to www.abb.com/drives and selecting Sales, Support and Service network. Product training For information on ABB product training, navigate to www.abb.com/drives and select Training courses.
3AUA0000049359 Rev C / EN EFFECTIVE: 2010-05-03 ABB Oy Drives P.O. Box 184 FI-00381 HELSINKI FINLAND Telephone +358 10 22 11 Fax +358 10 22 22681 www.abb.com/drives ABB Inc. Automation Technologies Drives & Motors 16250 West Glendale Drive New Berlin, WI 53151 USA Telephone 262 785-3200 1-800-HELP-365 Fax 262 780-5135 www.abb.com/drives ABB Beijing Drive Systems Co. Ltd. No. 1, Block D, A-10 Jiuxianqiao Beilu Chaoyang District Beijing, P.R.