PowerFlexDC & 20-COMM-P Adapter with Siemens S7-315DP PLC Overall Description The purpose of this document is to provide set-up and programming details of the PowerFlex DC drive and the 20-COMM-P Profibus-DP interface using the Siemens S7-315 DP platform. All the operation detailed below assume the user is familiar with the programming of Siemens PLC s with Step7 software. Drive Control Overview To Control a drive on PROFIBUS we need to map the I/O on the Input / Output image of the PLC. The PowerFlex DC drive uses 16 bit logic control words, reference, logic status and feedback, and 32bit datalinks. The Logic Command word from the PLC contains 2 bytes of data, whereby each bit has a control significance. See User Manual 20-COMM-P Appendix C. So we can start / stop the drive by changing the relevant bits in the Logic Command word. The drive reference is a 15 bit integer with sign, so a value up to 32767 is scaled according to the [max speed] parameter of the drive. So passing a value of 16384 into the reference word results in half speed reference. A drive adapter supports up to 4 datalinks, which can be initialized by a parameter in the 20-COMM-P adapter. Each datalink passes 2 parameters to the drive AND 2 parameters from the drive. Therefore once a datalink is configured, all that needs to be done is to set which drive parameter you want the data to goto / come from. Page 1 of 7
Profibus-DP DPI PLC Output Mapping Adapter Drive Logic Command Reference Data In A1 Data In A2 Data In B1 Data In B2 Data In C1 Data In C2 Data In D1 Data In D2 The Logic status from the drive provides feedback on the operational condition of the drive. See User manual Appendix C. Again the speed feedback is scaled at 32767 for [max speed], so it is possible to see at what speed the drive is running. Profibus DP DPI PLC Adapter Drive Input Mapping Logic Status Speed Feedback Data Out A1 Data Out A2 Data Out B1 Data Out B2 Data Out C1 Data Out C2 Data Out D1 Data Out D2.Initial Set-up Set switches on the Master 20-COMM-P to a Node Address of 05. This setup assumes that the PowerFlex DC and the 20-COMM-P interface are at their default settings. Additionally it assumes that the drive is already setup and tuned for the motor connected. Note: The Parameter Access Level on each drive needs to be set to Advanced in order to access some of the parameters used in this application note. To do so, perform the following steps: 1. Select Parameter, then [Enter] 2. Select Utility, then [Enter] 3. Select Drive Memory, then [Enter] 4. Select Param Access Lvl, then [Enter] 5. Press the [Sel], select Advanced and press [Enter] Page 2 of 7
Connect Profibus DP cable plug, and screw plug fasteners home to ensure earth continuity. Note that as this is the only drive being used, the plug terminators are switched on at the drive and the PLC. Setup the following drive parameters Parameter Name Description Value 1327 [DPI P5 Select] Select the destination of the reference 1 = Speed Ref A 610 [Data In A1] Parameter number to send 660 = Accel Time 1 611 [Data In A2] Parameter number to send 662 = Decel Time 1 618 [Data Out A1] Parameter number data recieved 1351= Fault1 Code 619 [Data Out A2] Parameter number data recieved 466= AC Line Voltage 620 [Data Out B1] Parameter number data recieved 44= Speed Ref A 621 [Data Out B2] Parameter number data recieved 199 = Arm Curr % 622 [Data Out C1] Parameter number data recieved 200 = Arm Curr 623 [Data Out C2] Parameter number data recieved 234 = Fld Curr % Setup the following 20-COMM-P parameter. Parameter Name Description Value 11 [DPI I/O Config] Enabling the Datalinks xxx01111 Cycle power to the drive. Control the Drive Power up the drive and PLC, and startup the Step7 programming software. Install the GSD file A_B_0572.GSD into the hardware catalogue. Drag the 20-COMM-P elements from the hardware catalog, onto the Profibus DP master system as below. Configure the 20-COMM-P adapter as Node 5, and as the Control, ref, status and feedback are 16bit, we configure as 2 + 2 bytes for the input and output addresses 60 to 63. As the datalinks are 32 bit, we will use the 2x4 bytes, and so the adapter is configured 64-71 for DataLink A, 72-79 for DataLink B, and 80-87 for DataLink C. The main control block OB1, is used to call the different control programs FC1 & FC3. Page 3 of 7
FC1 contains the run logic, and the reference ramp generator to control the speed of the drive. The screens below are shown in monitor mode (solid line means logic = true). The logic shows the drive running in the reverse direction. See User Manual Appendix C for the significance of the logic command and status bits. Page 4 of 7
The drive is setup to have the accel and decel time on its input datalinks. The program below sets a value to DL_In (DB7). The value of 5 = 5 secs, and the value of 6 = 6secs. Use the SFC 14 (DPRD_DAT) and SFC 15 (DPWR_DAT) functions to send a block of consistent data to/from DB7 & DB8. Page 5 of 7
Page 6 of 7 Application Note
Monitoring DB7 for the values being sent to the Accel and Decel time, we can see the value of 5secs and 6 secs Monitoring the values of DB8, we can see values of Fault Code, AC Line Volts, Speed Ref A, Arm Current % and Amps, Field Current %. Notes The information above has been tested with a Siemens S7-315DP controller and Step7 v5.3 software. The PowerFlex DC drive is ver 3.003, and the 20-COMM-P is ver 1.004. Page 7 of 7