Академический Документы
Профессиональный Документы
Культура Документы
Table of Contents
HOL The Value of Connected Components .............................................................................. 3
Table of Contents ........................................................................................................................................ 3 What is Connected Components? ............................................................................................................ 5 About This Hands-On Lab .......................................................................................................................... 6 Before You Begin ........................................................................................................................................ 7 Lab Materials ............................................................................................................................................... 8 Document Conventions .............................................................................................................................. 9
Using the CCBB Files to Control a Drive over Modbus (65 mins) ................................................ 10
About This Lab .......................................................................................................................................... 10 Downloading the CCBB program to the MicroLogix ............................................................................. 11 Setting up the PowerFlex 4M drive ......................................................................................................... 14 Testing the Speed Control Functionality with the User Program ........................................................ 18 System Validation and Application Tips................................................................................................. 22 Importing the Control Program from a Library File ............................................................................... 23 Downloading the HMI Screens to PanelView Component .................................................................... 27 Configuring & Validating PanelView to MicroLogix Communications ................................................ 33 Adding Security to your PVc application. .............................................................................................. 34 Testing the Speed Control Functionality with PVc ................................................................................ 40 Using the High Speed Counter for motor feedback .............................................................................. 46 Operating the Car Wash ........................................................................................................................... 49
Appendix A : Description of Document Changes ......................................................................... 51 Appendix B : Controlling PowerFlex Drives on Modbus RTU with Explicit Messages................ 51
3 of 72
Overall Description ................................................................................................................................... 51 Background ............................................................................................................................................... 51 Limitations ................................................................................................................................................. 52 Changing a drive parameter with an explicit message ......................................................................... 53
Appendix C : Parameter Backup and Restore for PowerFlex 4-class Drives .............................. 55
Drive Parameter Backup and Restore (PB&R) Capability ..................................................................... 55 Using the PB&R functionality .................................................................................................................. 60
Appendix D : Overview of the Screens Used in the Car Wash Application. ................................ 66 Appendix E : Flow Diagrams of Car Wash Application. ............................................................... 71
4 of 72
5 of 72
6 of 72
This lab is based on the concept of a car wash application. See Appendix C and D for the different steps in the car wash application and the different screens that are going to be used. The graphics used for speed control are based on the displays from the Connected Components Building Blocks.
Before you begin this Hands-On Lab, please be sure to close any applications that are currently running. To complete this lab, a general familiarity of computers, programmable controllers, I/O and automation software is recommended but not essential.
7 of 72
Lab Materials
We have provided you with the following equipment that will allow you to complete this lab.
8 of 72
Drive_ControlML1400_PF4Class-EN-DRV_CTRL-C0-0x.rss. * MicroLogix Speed Control from CC CD/DVD CarWash.cha - PanelView Component Speed Control Car Wash application file PB&R_ML1100_PF4M-EN-PBR_PF4M-C0_0x.SLC * MicroLogix Backup & Restore program from CCBB DVD.
* the last letter of the file may change due to CC DVD release updates.
Document Conventions
Throughout this workbook, we have used the following conventions to help guide you through the lab materials.
Indicates:
Any item or button that you must : - Click on, or a menu name from which you must choose an option or command. This will be an actual name of an item that you see on your screen or in an example. - Type in the specified field. This is information that you must supply based on your application (e.g., a variable).
The text that appears inside of this gray box is supplemental information regarding the lab materials, but not information that is required reading in order for you to complete the lab exercises. The text that follows this symbol may provide you with helpful hints that can make it easier for you to use this product. Most often, authors use this Tip Text style for important information they want their students to see.
Note: If the mouse button is not specified in the text, you should click on the left mouse button.
9 of 72
Using the CCBB Files to Control a Drive over Modbus (65 mins)
10 of 72
11 of 72
12 of 72
8. The following screen should now show your processor type as MicroLogix 1400. Close this I/O configuration screen.
This shows how easy it is to read the I/O configuration of a MicroLogix processor. All connected modules are now uploaded. Normally you need to setup the modules for your process. The MicroLogix 1400 controller can be expanded with 7 I/O modules for a maximum of 256 discrete I/O
13 of 72
9. Now save this file. We will use it later on after having set the drive parameters to allow proper Modbus RTU communications. 10. Although the CCBB program contains the core of our control program, we need to modify the program so that we can use it for our car wash application. We also need to configure the PF4M drive to be able to receive start and stop commands, as well as the speed reference value, from the PLC using Modbus RTU.
Assumptions
This lab will provide step-by-step instructions for the PowerFlex 4M drive only, however the procedure is very similar for PowerFlex 4, 40 and 400 drives. This lab will specify the minimum number of parameters that need to be changed from the factory default settings in order to establish communications with the MicroLogix controller. For an actual machine application, there may be other drive parameters that need to be adjusted as well.
14 of 72
Key Esc
Name Escape
Description Back one step in programming menu. Cancel a change to a parameter value and exit Program Mode. Advance one step in programming menu. Select a digit when viewing parameter value. Scroll through groups and parameters. Increase/decrease the value of a flashing digit.
Sel
Select
Enter
11. If the displays shows anything different than 0.0, press the Esc key (multiple times if necessary) until the display shows 0.0. 12. Press the Sel key once the leftmost alphanumeric value displayed should be flashing. 13. Press the Up Arrow or Down Arrow key until the leftmost alphanumeric value displayed is a flashing P. Press the Enter key. Now the P stops flashing and the rightmost numeric character is flashing. 14. Press the Up Arrow or Down Arrow key until P112 is displayed. 15. Press the Enter key and a 0 will be displayed as the current value of parameter P112. 16. Press the Enter key again and 0 begins flashing. Press the Up Arrow key to adjust the value to 1 and press the Enter key to enable the default settings. This parameter resets Drive Parameter Set to Default. 17. The display will flash F048 and the red FAULT LED will flash also. This fault indicates that the drive parameters have been reset to factory default. Press the Red Stop Button to clear the fault. Power cycle the drive by switching the Motor Power switch to 190E until the drive display goes blank, then switching it back to DRIVE.
Make sure that Motor Power Drive switch is in the LEFT position.
18. Since both green LEDs on the front of the drive are on, verify that you can: Start the drive by pushing the Green Start Button (if the drive doesnt start and the display still reads 0.0, try rotating the speed potentiometer clockwise). Then verify that you can stop the drive by pushing the Red Stop Button (note that the drive does not stop immediately, but decelerates at a configured rate to zero). Start the drive again and verify that once the drive is done accelerating, the speed potentiometer can be used to speed up or slow down the drive. Now stop the drive by pressing the Red Stop Button.
15 of 72
Modbus network node address. The factory default node address is 100. The Speed Control Building Block allocates Modbus addresses from 1-16. It is assumed that the drives will be addressed consecutively starting with address 1. The table below documents the drive Modbus node address parameter numbers and the Value to which it has to be set for this lab.
Drive Type
Modbus Node Address Parameter Number C303 A104 A104 A104 C104
To change the Modbus node address for the PowerFlex 4M drive, perform the following steps. 19. Press the Esc key (multiple times if necessary) until the display shows 0.0. 20. Press the Sel key once the leftmost alphanumeric value displayed should be flashing. 21. Press the Up Arrow or Down Arrow key until the leftmost alphanumeric value displayed is a flashing C. Press the Enter key. Now the C stops flashing and the rightmost numeric character is flashing. 22. Press the Up Arrow or Down Arrow key until C303 is displayed. 23. Press the Enter key and the current value of parameter C303 will be displayed, which by default is 100. 24. Press the Enter key again and 100 begins flashing. Press the Down Arrow key to adjust the value to Modbus node address 001 and then press the Enter key to accept this value. The other drive parameters that need to be changed from factory default, to allow the MicroLogix controller to control the drive are the Start Source and Speed Reference parameters. By default, this pair of parameters is set to 0 meaning Keypad control.
16 of 72
The table below documents the drive Start Source and Speed Reference parameters.
Drive Type
P036 P036
5 5
P038 P038
5 5
P036
P038
P036
P038
25. Press the Esc key (multiple times if necessary) until the display shows 0.0. 26. Press the Sel key once the leftmost alphanumeric value displayed should be flashing. 27. Press the Up Arrow or Down Arrow key until the leftmost alphanumeric value displayed is a flashing P. Press the Enter key. Now the P stops flashing and the rightmost numeric character is flashing. 28. Press the Up Arrow or Down Arrow key until P106 is displayed. 29. Press the Enter key and the current value of parameter P106 will be displayed, which by default is 0. 30. Press the Enter key again and 0 begins flashing. Press the Up Arrow key multiple times to adjust the value to 5 and then press the Enter key to accept this value. (5 should not be flashing any longer) Notice that the green LED next to the green Start button on the drive is now off. 31. Press the Esc key and P106 should be displayed (with the 6 flashing). Press the Up Arrow key twice so that P108 is displayed (with the 8 flashing). 32. Press the Enter key and the current value of parameter P108 will be displayed. The value of 0 means Keypad. 33. Press the Enter key again and 0 begins flashing. Press the Up Arrow key multiple times to adjust the value to 5 and then press the Enter key to accept this value. (5 should not be flashing any longer) Notice that the green LED next to the Speed Potentiometer on the drive is now off. 34. Press the Esc key multiple times until 0.0 is displayed. 35. Power cycle the drive, as only after power cycling will your drive be configured to be controlled by Modbus RTU communication commands initiated from the MicroLogix controller.
17 of 72
36. Return to your RSLogix 500/Micro programming software, and double click on the USER_PRGRM routine in the Program Files tree. 37. The original program from the CCBB DVD uses digital inputs that are not wired as per your Demobox, so we need to modify the program to use our Demobox inputs. Double-click on the XIC instruction on rung 0000 (Reset Machine) and instead of the current bit use I:0/17 and then adjust the current description name to Reset Machine. 38. Now, go to the Start Machine XIC instruction on rung 0001, change the currently used bit to I:0/12, and re-assign the description My Start to this bit.
18 of 72
39. Now do the same for Stop Machine input on Rung 0002. Change it to I:0/14 and use My Stop as the description.
40. Right click on the left side of rung 0002, and select Append Rung, then from the Instruction Menu, drag and drop a MOV instruction onto our new rung 0003.
41. Type in the data for the Source as N7:0, and the Dest. as B246:53, so the instruction looks as below. This instruction will allow us to set the required speed in N7:0.
42. Now double-click on the LAD 2 MAIN routine in the Program Files tree. Select Rung 0000 XIC instruction and delete it. We do not need to condition this program execution during this lab.
44. Lets download the program to the PLC. From Comms menu select the System Comms, then select the MicroLogix 1400 at address 192.168.1.2. Now click the Download button
19 of 72
45. The download procedure will then ask if you want to add any revision notes. In this case we dont need any notes so click the OK button
20 of 72
50. Your screen should now look like this, with the PLC status shown in green in Remote_Run.
21 of 72
58. Double click on the Data File N7 INTEGER and change the value of N7:0 (in range 0-600). Use Base DI12 button to start the drive, and Base DI14 button to stop the drive. Observe the speed of the drive on its display.
22 of 72
Modbus Control of Drives Although Modbus control of PowerFlex 4 class drives is cost effective, tests have shown that with the default communications, it takes approximately 50ms to get a status update from a PowerFlex4M enabled drive. This means that the time to communicate with further drives is cumulative, with 16 PowerFlex4M drives taking 800ms. Therefore it is important to review any installation with regard to response time and Health & Safety implications. For More Dynamic Response Controlling drives on Modbus is better suited to installations that do not need dynamic control of equipment. However starting and stopping a drive is usually more important than controlling the speed reference, which may not change for hours at a time. Therefore for some critical installations, PowerFlex drives could be started / stopped via their digital inputs, with the reference still coming via a message over Modbus. Alternatively PowerFlex 4 class drives have the facility for a broadcast Message over Modbus RTU, which could be setup for all the drives to be started / stopped together, or could be setup for all the drives to be sent a common speed reference. This cuts down on the number of Messages and the response time. Further information is detailed in Appendix B.
60. Go offline with your RSLogix500 software, and select Program Files on your project configuration tree, and right click to select New. 61. Create Program File Number 4 called CARWASH below, and click OK.
now
23 of 72
64. Select the file CARWASH.SLC from the Connected Components folder. You will need to browse to the My Documents\Connected Components folder and click Open.
24 of 72
65. Make sure that Import SLC Format options as below and click OK.
66. Click the Verify Project icon should now look as follows.
at the top of the screen to accept all the changes. The program
25 of 72
67. Select the LAD 2 MAIN and insert the rung to jump to subroutine 4 (our CARWASH program) as rung 1.
68. Now we need to interface the imported Car Wash program with the existing drive interface provided by the CCBB. Double-click on USER_PRGRM program to open it. 69. Apply the following rung-in conditions to rungs 0001, 0002 and 0003 to disable manual drive control while the Car Wash is running:
70. Verify the project using the icon 71. Now save the file.
26 of 72
73. Double click on the Mozilla Firefox icon , and type in 192.168.1.4 for the IP address of the PanelView Component into the browser bar. Web browser will establish a connection to the HMI, and load the dashboard. Please be patient as it takes a while..
The preferred web browsers for PanelView Component are MS Internet Explorer 7.0 and Mozilla FireFox 3.0.
74. Select the File Transfer button on the Dashboard
As you can see at the bottom of the screen, the PanelView Component has the web interface in 8 preconfigured languages. English, Portuguese, French, Italian, German, Spanish, Chinese and Korean. 75. Select the New Transfer button to open the File Transfer Wizard
27 of 72
76. Select the My Computer button to open the File Transfer Wizard, and then click the Next button.
77. Select the Application button, and then the Next button
This technique can be used for transferring multiple application components from the terminal as well. Notice the options found on the file transfer wizard below:
28 of 72
A User Defined Object created in one application can be used in any other application loaded on that terminal because the object is saved directly on the terminal. If, however you want to use the same UDO on a different terminal, you can transfer that object using the File Transfer Wizard above. Images and Recipes can be transferred to and from an application terminal without opening the editing software. A Terminal User can also be transferred from terminal to terminal. This option does not include the users found in the applications.
All files can be transferred either straight to/from the PC or terminal, or through SD card (6 and 10 terminals only) or USB memory stick.
29 of 72
79. Browse to C:\My Documents\Connected Components, and select the file CarWash.cha and click Open.
30 of 72
81. Click the Transfer button and the file will be downloaded. If you get the following screen, then click OK.
31 of 72
82. The web browser will now return to the File Transfer screen - click Dashboard. The application file is now loaded in the PVc internal memory the browser screen should appear similar to below. Contact the instructor now if it doesnt.
The application you just downloaded contains the same Speed displays as in the Connected Components Building Block Application on the DVD, but has been modified to include the Car Wash application. In the next section of this Lab you will get familiar with the Speed Control application and will build it into the full Car Wash application.
32 of 72
83. Select the CarWash application name in the PVc Dashboard screen and then click Edit. (It takes some time to load this quite complex application.) 84. If you get the following error message,
85. then click OK, click the Firefox Options button and click Allow popups for 192.168.1.4.
86. You will need to click Edit again from the Dashboard screen.
As you can see, you dont need to install any extra software to create or edit a PanelView Component application. Its built-in to the operator panel. Ideal for field modifications by service reps or engineers - View on terminal as you build - Design time automatically matches the PanelView firmware - Showing up with the wrong software is no longer a problem - Updating software for multiple people who only need occasional use is eliminated
33 of 72
87. Click on the Communication tab once the Edit window opens.
88. Verify that the controller type says MicroLogix 1400 and modify the IP Address to 192.168.1.2 if necessary.
Firmware revs for PVc can be downloaded from http://www.ab.com/eoi/graphicterminals/panelviewcomponent.html . Here you can also download, help files, fonts, emulator, objects, graphics, . . Note also that PVc provides a lot of multivendor drivers Including GE, Mitsubishi, Omron, Siemens, Modbus,
34 of 72
89. Click on the Security tab at the top of the PanelView Explorer window
a. Notice the additional settings that can be utilized thought the security window.
c. Rights that allow users access to specific screens and actions can be added and deleted here.
A right is a permission given to a user. For example, permission to navigate to a particular screen. 91. Type Administrator in the newly created Right field.
92. Add another Right by clicking on the Add Right button. 93. Type Operator in the newly created Right field.
35 of 72
95. When the Add User dialog appears, type the following information into the fields. a. Type Andy as the User Name.
c. Click Add to accept the changes and close the dialog box.
96. Add another User by repeating the previous two steps above. 97. Type David as the username and david as the password. 98. Verify that Andy has the box under the new rights Administrator and Operator checked and that David has the box under the new rights Operator checked. This will give the new users access to those rights, or permissions. 99. Make sure that the new rights Administrator and Operator are UN-checked for All Users
In this application everybody (All Users) will have design writes. At least one user must have design rights if you want to allow updates to the application. If no user is assigned this right, no one will be able to edit the application. Initially, all users have design rights to an application. This means anyone can edit the application without logging in. 100. Click on the Screens tab. 101. Click on screen 31 Drive network under the Screens List to open the Drive screen.
36 of 72
103. Click the drop down list under Access Rights and choose OPERATOR if not selected.
104. Go back to the Screens List and choose the 60 Admin Screen. 105. Under the Screen tab, click the drop down list for Access Rights and click Administrator.
You have now finished creating security around two of the displays. In order for a user to navigate to the Administration screen, the user must be logged in as Andy. Andy is the only user with access to Admin rights. In order to navigate to the Drive screen, the user must also be logged in as David or Andy, because both have access to Operator rights. Below is a list of the screens and their rights. The rights for the screens below are already done for you.
Screen name 1 Drive status 31 Drive Network 32 Fault screen 45 Selection Editor
37 of 72
* The security screen contains a button ($SysSecurityDisable) to enable or disable security. If you put this button on an unsecured screen you will get a warning from the application validator.
You can secure any screen in an application but the startup screen. If you do this you will get an error message which means that you cannot complete the validation of the application. You must remove the security and re-validate.
106.
The validation process checks for errors and warnings. The application communicates with the connected terminal to perform the validation. If the validation passes, the Validation Results dialog displays: No errors or warnings to report If the validation does not pass, the Validation Results dialog opens. Each result has an ID, Type, and Message. ID - A unique number the application assigns to the object. You can sort this field in ascending or descending order by clicking the up or down arrow in the header. Type - The type of message is an Error or Warning. You can sort this field in ascending or descending order by clicking the up or down arrow in the header. Message - Text describing the cause of the message. For a screen validation, the message shows the name of the object in error, the problem, and the screen location.
38 of 72
This is an example of the error messages that you can get from the Application Validator:
In this lab the result of the validation should look like this:
Remark: You may get a warning about a pen that doesnt have a data point defined. This is because trending still needs to be configured. If this is not the case then contact one of the instructors.
108. At the Dashboard screen select the CarWash application and click Run.
An Application will only run if the column Valid says Yes. If it doesnt say that, it means that you need to run the application validator to check the application.
39 of 72
110. Once you clicked on the screen the security login is shown. For the configuration screens we need at least Operator rights. So login as David with password david. 111. The HMI application loads the Network Overview screen. If the PowerFlex4M drive is showing disabled for Drive#1, press the #1 Disabled button to enable it
Once the PVc terminal is successfully communicating with the MicroLogix, you may observe a drive status other than Disabled or Ready. The other possibilities are Running, No Comms and Faulted. Running: Indicates that the drive has been started
40 of 72
Indicates that the drive is not responding to communication attempts from the Indicates that the drive is currently faulted
The original speed HMI application has been translated into English, Portuguese, French, Italian, German, Spanish, Czech and Polish. For this lab only English, Danish and Czech are selected.
112. As we only have one drive at Modbus address 1, we only show Drive#1. The rest of the drives have been removed but are available in the original application. Press the Drive #1 button.
41 of 72
The indicators on the left-hand side show whether the drive is Ready to run (not faulted), Active (running) or not, whether the direction is Forward or Reverse and whether it is running at the reference frequency (At Ref). The numeric displays in the middle show the Output Current in amps, the Output Voltage in volts, the PLC reference frequency in hertz and the actual frequency in hertz.
113. The Drive #1 screen shown below details the control in Program mode. i.e. the drive would be controlled via start and stop commands from the user program in the PLC. Press the Program button so that commands can be given from the HMI.
114. Press the HMI Ref button, and input a value of 25.00. Notice that the hertz value entered and hertz value displayed shows two digits to the right of the decimal point. Although the PowerFlex 4M (along with the 4 and 40) drive only supports one digit to the right of the decimal point for hertz, the PowerFlex 40P and 400 drives both support two digits to the right of the decimal point. You must always enter in two digits to the right of the decimal point because this Speed Control screen is designed to support any of the PowerFlex 4-class drives.
42 of 72
115. Now press the Start button and observe the HMI and drive at 25Hz. Play around with the controls to understand how they work. Note that the Jog button will only function with the drive stopped. 116. Next, verify that when the RJ45 network cable is unplugged from the drive that the Lost Communication to Device message flashes at the top of the screen.
117. Plug the RJ45 connector back in and the Lost Communication to Device message will automatically go away. 118. Verify that F081 fault code flashes on the drive display. 119. The PVc screen will have the fault code flashing in a banner near the top of the screen that says F81 Comm Loss.
43 of 72
120. Press the F81 Comm Loss banner and a new screen will appear that gives the Fault Type, Description & recommended Action. This screen provides the same information and troubleshooting tips for that particular fault as found in the drive user manual!
121. As with the other screens, press the X button in the upper right-hand corner to go back to the last screen. 122. In order to clear the fault, press the Clear Fault button. After doing so the fault should clear as indicated by the fault display button disappearing, along with the Clear Fault button. 123. Notice that while in Operator mode, there is no X button in the upper right-hand corner of the screen. In order to navigate back to the Network Overview, you must first switch the screen mode to Program. 124. If you havent done so already, switch the screen back to Program mode by pressing the Operator button. The button label should now be Program. Press the X button in the upper right-hand corner of the screen to return back to the Network Overview screen.
You now have been testing the PF4M screens that come with the Connected Components Building Block for Speed control. What if you dont have a PanelView Component or you want to do some modifications offline?
44 of 72
For Offline modifications, we offer two options: 1) Emulator: Virtual PanelView Component on PC (development environment exactly like a real terminal) 2) PVc DesignStation (offers the best development performance) Both are available for free download from: http://www.ab.com/eoi/graphicterminals/panelviewcomponent.html
45 of 72
125. Now we need to go offline, so select the down arrow next to the green REMOTE RUN and select Go Offline 126. Double click the I/O Configuration on the project tree, and select the MicroLogix 1400 Series A in slot 0. Now click on the Adv. Config button
46 of 72
127. Once the I/O Configuration screen pops up, select the Embedded I/O Configuration tab, and change the Input Filter for Inputs 0+1 to a value of 2 mS. Click Apply and OK, and close the I/O Configuration screen.
47 of 72
128. Double click on the Function Files from the project tree, and select the HSC tab and expand the HSC:0 by clicking on the +. You will need to resize the window to see all the tags. Modify the tag values as shown.
The High Speed Counter needs a Program File routine allocated, and in this hands-on lab we have specified HSC:0.PFN = 3. Therefore we need to create the Program File routine 3.
48 of 72
129. Go to the Project tree and right click the Program Files and select New.
130. Enter 3 into the program file Number, and HSC into the Name, and click OK
The Program File routine 3 doesnt require any code / ladder logic to enable the HSC to work but we will use it to interact with the Car Wash program. 131. Double-click on the LAD 3 HSC program. Enter the following rung of code:
This program file will be executed once the High Preset of HSC:0 will be reached. 132. Click the Verify Project icon as before. Download to the PLC as before, and go online.
49 of 72
133. You should now be online with your MicroLogix 1400 controller. If not, download the program created in the previous section and go online. 134. The PanelView Component application should be loaded in the terminal and running. If this is not the case, connect to the terminal using your web browser, select the CarWash application and click on the RUN button. 135. From the main screen of the PVC application select the Start Car Wash screen.
136. On the Program Selection screen highlight the Normal_Clean program using the scrolling buttons and select it with the Enter button. 137. Next press the Download button. Once the indicator below changes from IDLE to Download Completed and turns green you know that the recipe was successfully loaded into the controller memory. 138. Having the recipe downloaded we can proceed to the Status screen and operate the Car Wash. Press the Car Wash button in the bottom right corner. 139. Now you can operate your Car Wash. Press the Start button to start a new cycle and observe consecutive steps. You can Stop the cycle at any time and resume by pressing the Start button again. Its also possible to restart a cycle at any time. Notice that the brushes are simulated by an AC motor while the dryer is simulated by the fan, both located in your demobox.
The detailed algorithm of the Car Wash is presented in Appendix E of this lab book.
50 of 72
HANDS-ON DOCS
:0/15CCBW01ENv1.0doc CCBW01ENv1.1doc CCBWo1ENv2.0.doc RA-12L03_Connected_Components.doc
Original document 1st March 2009 Lab structure reshaped 29th October 2009 Adjusted to run with PVc FW rev 1.2 and current CCDVD (may 2010) + fixed mistakes Modified lab for use in 2012 RAOTM and CCOT
DESCRIPTION OF CHANGES
PAGE
Overall Description
This application note provides some guidelines for controlling PowerFlex drives on Modbus RTU using explicit messages. This application note details a MicroLogix 1100 PLC being used as the controller, but the guidelines can also be used with other controllers capable of Modbus RTU. This lab takes approximately 15 minutes.
Background
51 of 72
As Modbus RTU is built into all PowerFlex 4 class drives, controlling a drive on Modbus RTU provides one of the most cost effective methods of control. The MicroLogix 1100 PLC when used as a Modbus RTU master, communicates with only one drive at a time, using explicit messages. This means that with more drives on the network, the longer it takes to communicate with all the drives. When explicit messages are used for control, it is important to understand how a message instruction works, and the risks and associated limitations when used. A message instruction is configured as part of the ladder logic in the user program. When the ladder logic is processed and the message instruction is enabled, the contents of the message instruction are passed to one of the free communication buffers (ML1100 has 4 buffers), or the message queue if the buffers are all used. The message instruction will then be executed when the ladder completes, within the service communication interval. If the destination drive receives the data correctly, then it issues an ACK, and the message instruction completes and releases the buffer for further use. To control a PowerFlex 4 class drive, the PLC needs to send a Message write instruction, for the Logic control and the Speed Reference. To get the status of a PowerFlex 4 class drive, the PLC needs to send a further Message read instruction, for the Logic Status and the Speed Feedback.
Although the specification of Modbus RTU allows for a maximum of 247 nodes, divided into a maximum segment size of 32 nodes, in practice the number of drives that can be controlled is significantly less than 31, as co-ordinating the number of messages becomes difficult. So as further drives are added, each message needs to be sequential to the last, and so the time response to the control word is cumulative. Therefore it is important to review any installation with regard to response time and Health & Safety implications. The limitations are detailed below:
Limitations
Most PLCs have a real time scheduler to control the program and normal I/O, with messages being unscheduled at the end of the ladder logic (service interval). This means that real time scheduler often interupts the message handler, and so messages have no priority. Therefore a message may be be updated within 1 to many program scans, which means that it is difficult to determine how long the drive will take to start / stop when the command is given. Therefore all equipment used in this manner, should be subject to a risk assessment, taking into account the mechanical and electrical implementation. PLCs typically have a limited number of communication buffers / queue size (refer to PLC user manuals for max buffers ML1100 has 4). If the message buffers and the queue are both full, messages will be executed at random or even lost. In addition, the Message instruction requires an ACKnowledgement response from the drive, before the Message instruction is complete. As further drives are added, they will need additional explicit messages for control. Therefore it is important these messages have their ACK, before moving to the next message. So the messages need to be carefully sequenced / managed within the program, if messages are not to be lost. This will limit the number of drives that can be connected on Modbus. Modbus RTU uses the serial physical layer RS485 which is capable of in excess of 1000 m. However tests have shown that small drives using fast IGBTs produce significant electrical noise and interference. This noise / interference is picked up in the RS485 cabling, and may result in the drive dropping off the network, or indeterminate behavior. Therefore any installation should follow the good practice guidelines outlined in GMC-RM001A-EN-P, routing the Modbus cable well away from the drive and other cabling. Experience has shown that Modbus cabling should be kept to a minimum. i.e. within a cabinet.
52 of 72
To check for loss of communications, a time-out value (parameter in seconds) can be setup in the drive to issue a drive fault. This needs to be set to a value, in excess of that taken to message the maximum number of drives, and so needs to be in the order of seconds. Controlling drives on Modbus is better suited to installations that do not need dynamic control of equipment. Usually starting and stopping a drive is more important than controlling the speed reference, which may not change for hours at a time. Therefore for some critical installations, PowerFlex drives could be started / stopped via their digital inputs, with the reference still coming via a message over Modbus. Alternatively PowerFlex 4 class drives have the facility for a broadcast Message over Modbus RTU, which could be setup for all the drives to be started /stopped together, or could be setup for all the drives to be sent a common speed reference. This cuts down on the number of Messages and the response time of each drive. Although Modbus control of PowerFlex 4 class drives is cost effective, the items above effectively limit the number of drives that can be controlled. Tests have shown that with the default communications, it takes approximately 50ms to get a status update from each enabled drive. The PowerFlex40P requires 100ms as 2 read requests are made. This means that the time to communicate with further drives is cumulative, with 16 PowerFlex4M drives taking 800ms. Therefore it is important to review any installation with regard to response time and Health & Safety implications. For an alternative / more dynamic method of control, or for a larger number of drives, PowerFlex drives can use implicit I/O control. This method of control creates a connection to the drive as part of the real time I/O control of the PLC. This method of control is used with the ControlLogix / CompactLogix PLCs, with EtherNet/IP providing the easiest and most integrated form of implicit I/O control for a PowerFlex drives. Typically this could be around 30 drives in CompactLogix and 60 120 in ControlLogix..
The programming software RSLogix5000 v16.x and above for ControlLogix / CompactLogix, contains integrated profiles for PowerFlex drives that with a few clicks of the mouse create all control tags automatically and an implicit I/O connection at the specified Requested Packet Interval to control the drive. This connection is monitored at both ends to ensure that the PLC and drive are communicating. A watchdog will generate a drive fault if the drive doesnt respond in the order of 100ms. As the drives are connected on EtherNet/IP, all their parameters are visible across web / internet, making remote diagnostics feasible. Therefore using fieldbus in conjunction with ControlLogix / CompactLogix, provides an easier, much more dynamic, deterministic and secure method of controlling drives.
1. Go offline with your processor, and in the Data Files area of the Project tree, select MG243 DC MSGS file and right click to select Properties
53 of 72
2. Change the number of Elements to 9 and click OK. This provides an additional MSG instruction MG243:8 for use in our program.
3. Add a line of program in the USER_PRGPR program as shown below, specifying the MSG instruction being MG243:8.
4. Double click on the Setup Screen text of the MSG instruction, and enter the information in the MSG setup below:
The MSG instruction is configured to send Multiple Registers starting from N7:3, and the size is 2 elements of 16 bit. The register will be sent to the Target Device Slave Node address 1, to parameters
54 of 72
starting at 110. Modbus RTU uses the Direct Access method to communicate with the drive whereby 41000 is the base address of the parameters. i.e. Modbus Address = 41000 + (Drive Parameter # - 1) Therefore the above is accessing Parameter 109 and 110, so from the PowerFlex4M user manual 22FUM001x-EN_E P109 [Accel Time 1] = values in 0.1 secs P110 [Decel Time 1] = values in 0.1 secs
5. Click the Verify Project icon as before. Download to the PLC as before, and go online. Double click of the N7 - INTEGER file, and double click N7:3 and N7:4 to change the values. i.e. 5 = 0.5 sec. Put the value of 400 to N7:0 as drive speed reference.
6. Start the drive using pushbutton DI12 ( notice that its just a temporary start command, as soon as you will release the pushbutton the drive will stop. Notice the acceleration and deceleration rate. Now operate the digital input on the demo box DI15 to send the MSG to the drive. The MSG output DN should turn green indicating that the MSG instruction was successful. Now start the drive again to observe the influence of the changed parameters. 7. Now save this file to your Desktop.
55 of 72
the RSLogix 500 programming software while online with the MicroLogix. This lab takes approximately 15 minutes.
Assumptions
Before importing the PB&R routine, be sure to confirm all of the following: All drives are PowerFlex 4-class drives (PowerFlex 4M, 4, 40, 40P and/or 400). All drives are networked together with the MicroLogix using RS-485 serial Modbus RTU. The MicroLogix must be the Modbus master on the network. The Modbus communication parameters for all devices are set to 9600 baud, 8 data bits, no parity bit and 1 stop bit, which is the factory default settings for PF4-class drives. All drive node addresses fall within the range of 1-16. No node address 100 exists on network-this is reserved for the device restore functionality, since this is the factory default node address for PF4-class drives. Recipe files 0-6 and recipe number 0-16 are available to be used. Program files #242-255 and data table files #248-255 are available to be used. Enough unused data table and program memory is available.
56 of 72
3. Click Open. 4. Verify that the following screen appears and after selecting the options as shown, click OK.
57 of 72
6. The operation will automatically start to progress through windows. Once the progress stops you will get a series of warning screens that are similar to what is shown below; click Yes to all.
in the toolbar.
If you get the following errors after attempting to verify the file:
it is due to the fact that there was a processor mismatch between the Drive Control program file and the PB&R program file (MicroLogix 1100 vs. MicroLogix 1400).
8. To correct this, double click on Controller Properties, change the Processor Type to MicroLogix 1100 Series A, click Apply and then OK to confirm the processor type change. 9. Next, change it back to the MicroLogix 1400 Series A, click Apply and then OK. 10. Click on I/O Configuration,
58 of 72
11. Click on the Read I/O Config button, the configuration will be read, and the project should have verified with no errors.
13. Once the download has completed, a dialog box will appear to ask what mode the MicroLogix 1400 should be placed in. Click Yes to place the MicroLogix 1400 in Run mode.
14. A dialog box will appear asking if you want to go Online, click No.
59 of 72
15. Now save this file to your Desktop. As the drive has probably faulted with a display of F071, you will need to reset the fault. Press the Red Stop button on the drive.
19. Click OK for User Displ(ay). 20. Use the Up Arrow pad to increase the displayed value from +00000 to +00001 for Backup and press OK. 21. On the following screen use the Up Arrow pad to increase the displayed value up to the node number of the drive to be backed up. For this lab the node address will be 1, then press the OK button to launch the Drive Parameters Backup.
You have the option of selecting nodes 1-16 if additional drives were connected.
60 of 72
22. The LCD display will give a message Good Backup for Node #1 ESC to Retrn. If you do not see this message, notify your instructor. 23. Press ESC once to return to the main PB&R screen.
Before restoring the drive parameters, the drive must be returned back to factory defaults. Go back to Lab 2 and repeat steps 14 - 21. Then power cycle the drive completely off and then back on.
24. Check that the drive is back at factory defaults settings by verifying that the green LEDs close to the start button and the one close to the speed potentiometer are both on.
Follow these steps to utilize the LCD User Display on the front of the MicroLogix to restore parameters to a drive after previously using the PB&R function to backup that drives parameters. 25. On the MicroLogix LCD display, use the Up Arrow pad to increase the displayed value from +00000 to +00002 for Restore and press OK. 26. On the following screen use the Up Arrow pad to increase the displayed value up to the node number of the drive to be backed up. For this lab the node address will be 1, then press the Ok button to launch the Drive Parameters Restore 27. You have the option of selecting nodes 1-16 if additional drives were connected. 28. The LCD display will give a message Good Restore Pwr Cycl #1 ESC to Retrn. If you do not see this message, notify your instructor. 29. Check that the drive parameters were restored by verifying that the green drive LEDs by the start button and speed potentiometer are now both off. 30. Power cycle the drive for the restored node address to take effect. 31. Press ESC once to return to the main PB&R screen on the MicroLogix. 32. To exit out of the PB&R main screen, press and hold ESC for several seconds.
61 of 72
34. On the left-hand side click the Data Views folder, then the subheading Data Views.
35. Enter in the User Name administrator and the password of either ml1100 for a MicroLogix 1100 or ml1400 for a MicroLogix 1400. Click OK. The following screen will appear.
62 of 72
36. Click on File Name N255 near the bottom. 37. For backup, double click on N255:0 and enter the node number of the drive to be backed up. In this lab your node address is still 1.
63 of 72
38. After entering 1 in the N255:0 address, press Enter on the PC keypad. The following screen will appear, click OK.
40. Click the Update button on the webpage. 41. Upon completion of the backup the value of N255:0 will return back to 0.
Before restoring the drive parameters, the drive must be returned back to factory defaults. Go back to Lab 2 and repeat steps 14 - 21. Then power cycle the drive.
42. Check that the drive is at factory defaults by verifying that the green drive LEDs by the start button and speed potentiometer are both on.
Follow these steps to utilize the MicroLogix web server to restore parameters to a drive after previously using the PB&R function to backup that drives parameters. 43. For Restore, double click on N255:255 and enter the node number of the drive to be backed up. In this lab your node address is still 1.
64 of 72
44. After entering 1 in the N255:255 address, press Enter on the PC keypad. The following screen will appear, click OK.
46. Click the Update button on the webpage. 47. Upon completion of the backup the value of N255:255 will return back to 0. 48. Check that the drive parameters were restored by verifying that the green drive LEDs by the start button and speed potentiometer are now both off.
After performing the Restore function, you must power cycle the drive for the restored node address to take effect.
65 of 72
Main
Go through the Car wash screens.
Administration screen : Security, Language switching, date&time, PVc diagnostics, go to PVc configuration screen.
Program Selection
Recipe screen, Use the enter key at the end to select the recipe
Download the selected recipe to the controller. Upload the values from the controller in the selected recipe. Status of download/upload. Go to the screen to edit the recipe Go to the Car Wash status screen to start the car wash.
66 of 72
Selection editor
Recipe screen, Use the enter key at the end to select the recipe. Use the restore button to read the data from the recipe file and put it in the table below. The recipe table show the data from the selected recipe (Recipe) and show the values in the controller (Current). Use arrow keys to select and enter to modify an ingredient. The save button will save the changed values to the recipe in the PVc.
Status tags
Adding Water
Adding Wax
Brushes Running
Adding Soap
Dryer Running
67 of 72
Drive Network
Show the status of the drive
Opens drive screen towith take3 Real-time trend object manual control over the drive. pens defined.
Drive Status
Shows the last fault message. If you click on this message you go to the Fault screen..
Status of the drive Enter a speed frequency for the drive Take manual control over the drive or let the controller be the master.
68 of 72
Fault screen
Shows the fault message, a description and also so action point to solve the fault.
Administrator Screen
69 of 72
Language Switching
Select the language you want to use. This system tag show the current language number. 1033 equal English (US), 1029 Czech and 1030 Danish.
Current date, time and value show that the language switching automatically uses the language setting for values, date and time.
Security
Current user and his rights. For example User : Andy and Right: adminsitrator Disable the security in your application. MUST be on a secured display.
Login, Logout and change password button are standard button in the library.
70 of 72
IDLE Start Add Water Add Soap Wait x time Start Brushes Stop Soap Wait X turns
Reset
Wax wanted?
Yes
No Wait x TIme Stop Wax Stop Water Start Dryer Wait x Time Stop Dryer
Add Wax
71 of 72
72 of 72