servo control, 1 controlling the servo drive linear guide is equipped with a brushless ac motor, not...
TRANSCRIPT
© Festo Didactic 86692-20 1
Servo control in flexible manufacturing systems
Servo, as in servomechanism, comes from the Latin word servus meaning slave. This etymological interpretation is not that far from the truth since a servomechanism is a mechanism driven by a feedback signal. That is, a system that corrects the performance of a mechanism using an error-sensing device providing feedback to a controller. In this meaning, the mechanism is truly a slave to the feedback signal.
Servo control applications are common to most manufacturing processes. Adding a servo control feature to the FMS allows us to extend the study of flexible manufacturing.
The Part Feeder/Linear Guide servo system provided with the Flexible Manufacturing System (Advanced Applications) is a position servomechanism. It allows the user to accurately position the Part Feeder on the Linear Guide. Such a position servomechanism has the following components: a controller/amplifier, a motor/load, and a position sensor. These components form what is called a self-regulating feedback system. It is a feedback system because the information collected by the position sensor is fed back to the controller. It is a self-regulating system because the controller analyzes the collected information and uses it to correct the position of the motor/load. Figure 1 shows a simple position servomechanism.
Figure 1. Position servomechanism.
Controlling the Servo Drive
Information Job Sheet 1
Servo drive
Servo motor Load
Encoder
Job Sheet 1 – Controlling the Servo Drive
2 © Festo Didactic 86692-20
Servo motors
Motors are machines that convert electricity to mechanical power. The first electrical motor was designed by the English chemist and physicist Michael Faraday (Figure 2).
Figure 2. Michael Faraday (1791-1867), portrayed by Thomas Phillips (1842).
There are different types of servo motors and the choice of the type of motor depends on the type of application. Brushed dc motors, ac or dc brushless motors, ac synchronous motors, induction motors, or variable reluctance motors are usually used in servomechanism systems. Some of these motors are described below.
Brushed dc motors
Brushed dc motors are the most common type of servo motors. This type of motor has three main parts: a stator, a rotor, and a commutator. The stator is the fixed part of the motor; it contains permanent magnets producing the magnetic field required for the operation of the motor. The rotor is the moving part of the motor; it is made of coils wound around an iron core. Finally, the commutator is a brush assembly used to maintain the orientation of the magnetic field so that the torque is maximum.
Figure 3 shows a schematic representation of a brushed dc motor. At the top of the drawing, two vector diagrams show the direction of the magnetic field (H), current (I), and torque (T) when the torque is maximum. The torque comes to a
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 3
maximum when the current vector is perpendicular to the magnetic field vector. On the vector diagram at the right, the current vector is pointing out of the page. Thus, on the right side of the motor, the torque created by the interaction of the magnetic field and the current conductors is directed downward. On the vector diagram at the left, the current vector is pointing through the page. Thus, on the left side of the rotor, the torque is directed upward. The overall result is a torque producing a clockwise rotation of the rotor.
The change in the direction of the current is obtained using an ingenious system. Brushes make a mechanical contact with rings on the stator. The stator rings have gaps and when the brushes jump across a gap the direction of the current is reversed (every half-revolution).
Brushed dc motors are not expensive; however, they require more maintenance since the brushes will wear out eventually. This problem can be solved by using a brushless motor, which is the type of servo motor installed on the Linear Guide.
Figure 3. Brushed dc motor.
Permanent magnets
Brushes
Maximum torque Maximum torque
H
H
I I
T
T
Job Sheet 1 – Controlling the Servo Drive
4 © Festo Didactic 86692-20
Brushless motors
Brushless dc motors (Figure 4) are also permanent-magnet motors but, unlike brushed dc motors, the permanent magnets are mounted on the rotor. The motor windings are on the stator. The polarity of the current flowing in the windings still has to be modified at the right moment so that the interaction between the magnetic field and the current conductors produces the torque required to make the motor rotate. Switching the polarity of the current in the windings is done with a servo drive instead of mechanically (i.e., with brushes).
Figure 4. Brushless dc motor.
The Linear Guide is equipped with a brushless ac motor, not a dc motor. The construction of brushless ac motors is similar to the construction of brushless dc motors. The main difference between the two resides in the type of current used to power the motor.
Optical Encoders
Figure 1 shows a position servomechanism where the feedback signal is provided by a position sensor. The position sensor linked to the servo motor of the Flexible Manufacturing System (Advanced Applications) is equipped with an optical encoder (incremental encoder). This optical encoder is located in the motor casing.
Permanent magnets
Windings
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 5
a A second optical encoder (Conveyor Optical Encoder, Model 5928-A) is used in Job Sheet 2 and Job Sheet 3 to synchronize the movement of the Flat Belt Conveyor with the movement of the Part Feeder on the Linear Guide. This second optical encoder is not part of the servo motor control loop.
The optical encoder is directly coupled to the servo-motor shaft to prevent component wear caused by the mechanical parts having sliding contact with the motor. Direct coupling ensures that the rotation of the optical-encoder shaft is perfectly synchronized with the servo motor rotation. Even small changes in the angular position of the servo-motor shaft are detected by the optical encoder. To detect these changes, the optical encoder uses a system combining a light source, a light detector, and a coded disk. A Light Emitting Diode (LED) is used as a light source. The light is collimated by a lens and is directed toward a coded wheel. On the coded wheel, a pattern of translucent and opaque lines either allows light to reach the light detector or prevents it from doing so. Since the coded disk is mechanically connected to the servo-motor shaft, it rotates at the same speed as the motor shaft. By counting the on and off signal produced by the light detector, the position of the motor on the Linear Guide can be computed. Figure 5 shows a simplified version of an optical encoder circuit
Figure 5. Simplified version of an optical encoder.
The optical encoder shown in Figure 5 has a single light detector. This type of arrangement is used to count the number of rotations of the motor shaft. However, the direction of rotation of the motor cannot be deduced from the single output of the light detector. This is an important issue since the traveling direction is at least as important as the accurate positioning of the motor. To solve this problem, the encoder design must incorporate a second circle of opaque/translucent lines on the coded disk as well as another light detector. Figure 6 shows the circuit of a two-channel optical encoder. The output signals of Channel A and Channel B are 90 degrees out of phase; this allows the determination of the direction of rotation of the motor.
The disk of the optical en-
coder installed on the FMS
servo motor has 2000 lines.
Two signals in quadrature
generate 4 transitions for
each line, hence a total
of 8000 pulses per motor
revolution.
Light source Light detector
Coded disk
Job Sheet 1 – Controlling the Servo Drive
6 © Festo Didactic 86692-20
Figure 6. Two-channel optical encoder.
Servo drive and servo control
Servomechanisms can easily be represented using a pictorial model called a block diagram. A block diagram is a high-level type of flowchart giving the user an overview of a system or process. Figure 7 shows the block diagram for the position servomechanism shown in Figure 1.
Figure 7. Block diagram of a position servomechanism.
The task of the servo controller is similar to the task of an industrial process controller such as a pressure controller. The algorithm used to control the servomechanism is similar to the ones used in industrial process control. Most servomechanisms use a PID control algorithm. Figure 7 illustrates how the PID algorithm works for a position servomechanism. The actual position ( ) measured using the optical encoder is subtracted from a reference position ( r). The difference between the reference position and the actual position of the
Photodiodes
V cc
Channel A
Channel B
Ground
Signal processor
Coded disk
Comparators
LED Lens
Programmable positioning controller
Amplifier Motor/ Load
Encoder
Servo drive
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 7
motor is the error (e). The controller uses this error value with the PID algorithm to produce an output signal (u), which is amplified and sent to the servo motor. The operations performed by the controller on the error value can be shown by the following mathematical expression:
(1-1)
where Kp is the proportional gain Ki is the integral gain Kd is the derivative gain
Servo control with RSLogix 5000 Motion Instructions
The Kinetix 2000 servo drive that comes with the FMS makes the Part Feeder move along the Linear Guide. The drive is linked to your PLC through a SERCOS interface and can be controlled within RSLogix 5000 using the Motion Direct Commands. These commands are divided into four groups: Motion State, Motion Move, Motion Group, and Motion Event.
The Motion State instructions change the operating state of an axis. The five possible operating states are:
Axis ready (normal power-up state)
Direct drive control (for control using Motion Move instructions)
Servo control (for closed-loop motion)
Axis faulted (indicates that a fault is present)
Shutdown (drive disabled and Contactor Enable relay opened)
The Motion Move instructions are used to control the axis position when the drive is enabled. They include stop, home, jog, and gearing commands.
The Motion Group contains motion instructions that have an influence on all axes of a group. Special event checking functions can be enabled or disabled by the Motion Event instructions. The following Job Sheet will mostly deal with Motion State and Motion Move instructions.
SERCOS (Serial Real-time
Communication System)
uses optical fiber cables for
noise immunity.
© Festo Didactic 86692-20 9
Use the Servo Drive with the Motion Direct Commands of RSLogix 5000.
Set up and connections
1. Perform the basic safety procedures listed in Appendix B of this manual.
2. Use Table 1 and Figure 8 to identify the new components used in this Job Sheet.
Table 1. New components used for Job Sheet 1.
Name Model Description/Function
Linear Guide 5912-B Linear guide supporting the Part Feeder. The Linear Guide is equipped with a servo motor linked to the Part Feeder by a timing belt.
Servo Drive 5929-A Drive used to control the servo motor and monitor its position.
Figure 8. New components used for Job Sheet 1.
a Refer to the Equipment Utilization Chart in Appendix A of the manual to obtain the list of equipment required to complete this Job Sheet.
Controlling the Servo Drive
Job Sheet 1
OBJECTIVE
PROCEDURE
Servo Drive
Linear Guide
Job Sheet 1 – Controlling the Servo Drive
10 © Festo Didactic 86692-20
3. Install the Part Feeder on the Linear Guide (Figure 9).
Figure 9. Installing the Part Feeder on the Linear Guide.
4. Install the Linear Guide on the Flat Belt Conveyor.
1 2
3 4
5 6
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 11
5. Connect the equipment as shown in the wiring diagram presented in Figure 10.
Figure 10. Controlling the Servo Drive wiring diagram.
Job Sheet 1 – Controlling the Servo Drive
12 © Festo Didactic 86692-20
6. Once completed, the setup should look as shown in Figure 11.
Figure 11. Controlling the Servo Drive setup.
7. Turn on the computer, the switch, and the PLC.
Communication with the PLC
8. Open RSLinx and verify that Ethernet communication with the PLC works correctly using RSWho (Figure 12).
Figure 12. Network view in RSLinx.
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 13
Examination of the PLC program
9. Start RSLogix 5000. Open and examine the PLC program for Job Sheet 1. In particular, have a close look at the MainRoutine ladder of Figure 13 (Tasks MainTask MainProgram MainRoutine).
Job Sheet 1 – Controlling the Servo Drive
14 © Festo Didactic 86692-20
Figure 13. Job Sheet 1 program.
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 15
10. Some rungs have a series of “e” close to the rung number. Right-click on the rung number and select the Verify Rung option (Figure 14). This results in an error window. This is because the axis with the name MPF has not yet been created, causing some reference tags (starting with MPF) to be missing.
Figure 14. Verify Rung.
Addition of a servo drive axis
11. To cope with this situation, you need to create a new axis of type AXIS_SERVO_DRIVE. To do so, expand the Motion Groups menu, then right-click on the FMS folder. In the contextual menu, select New Axis AXIS_SERVO_DRIVE….
Job Sheet 1 – Controlling the Servo Drive
16 © Festo Didactic 86692-20
12. Give the name MPF (Mobile Part Feeder) to this new axis and add a description (Figure 15). Keep the box at the bottom unchecked.
Figure 15. Axis description (MPF).
13. Right-click on the newly created MPF axis (located in Motion Groups FMS) then, in the contextual menu, click on Properties.
14. Figure 16 to Figure 22 are the recommended settings for the different Axis Properties tabs. Enter all these settings and click Apply.
Figure 16. General (MPF).
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 17
Figure 17. Motion Planner (MPF).
Figure 18. Units (MPF).
Job Sheet 1 – Controlling the Servo Drive
18 © Festo Didactic 86692-20
Figure 19. Drive/Motor (MPF).
a Motor Feedback and Aux Feedback tabs cannot be modified at this point. It is also not necessary to configure the Homing tab for this Job Sheet.
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 19
Calculation of the Conversion Constant
The figure below represents the Servo Drive with the cover removed. As was stated previously, the FMS servo drive encoder produces 8000 counts per motor revolution. Three motor turns correspond to one pulley turn because of a 1:3 ratio gear assembly that is installed between the motor shaft and the pulley. With every pulley rotation, the belt advances by 10 teeth, because the pulley has 10 notches that pull the belt teeth. The distance between the belt teeth (or pitch) is 5.08 mm (0.2 in). Hence,
This leads to a Conversion Constant of 472.44 counts / mm.
Motor
Gear assembly Belt
Pulley
Job Sheet 1 – Controlling the Servo Drive
20 © Festo Didactic 86692-20
Figure 20. Conversion (MPF).
Figure 21. Hookup (MPF).
a Tune, Dynamics, Gains, Output, and Limits tabs are configured later, with the PLC in RUN mode. The Offset tab parameters all remain at zero.
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 21
Figure 22. Fault Actions (MPF).
Servo drive properties
15. Make sure the PLC SERCOS card is connected to the Kinetix 2000 Servo Drive through optical cables. The SERCOS/Node address of the drive is set to 01 by default (Figure 23).
Figure 23. SERCOS/Node address 01.
16. Go to I/O Configuration 1768 Bus 1768-M04SE SERCOS SERCOS Network, then right-click on the drive. In the contextual menu, click on Properties. Under the Power tab, the configuration should be different depending on your equipment rated voltage. The reason for this is that the DC+ and DC- power terminals of the 120 V model are connected to a separate booster circuit providing dc voltage, whereas the 220 V model takes single-phase ac voltage at the L1-L2 terminals. The Power tab for the 120 V
Job Sheet 1 – Controlling the Servo Drive
22 © Festo Didactic 86692-20
model is shown in Figure 24 and the one for the 220 V model is shown in Figure 25.
Figure 24. Drive power properties (120-V model).
Figure 25. Drive power properties (220-V model).
Testing the Servo Drive
17. Make sure that the PLC key is in the REM position. Save your program under a new name and download it to the PLC.
18. Put the PLC to Remote Run mode.
19. Press the red push button on the Indicator Light/Push-Button Station to power the drive (refer to rung 3 of the MainRoutine). Make sure that the seven-segment LED indicator displays a “4” after the startup routine. This signifies that the drive is configured and active but not enabled. The
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 23
operating state of the drive is then Axis ready (the Bus status LED on the drive is flashing green).
20. Fill the Part Feeder hoppers to 75% of their capacity with marbles. This adds weight to the Part Feeder and ensures the proper tuning of the servo motor for use with a filled Part Feeder. Also, make sure that the Part Feeder is at an intermediate position on the Linear Guide to avoid reaching one of the extremities.
21. Reopen the MPF Axis Properties. Under the Hookup tab, click on Test Command & Feedback and OK in the next window to start the test. Observe in which direction the Part Feeder is moving. It should be going from left to right (positive direction). If so, click OK, Yes, and twice OK to apply the right Drive Polarity. If not, verify your connections.
Tuning the Servo Drive
22. Under the Tune tab, enter the parameters of Figure 26 and press the Start Tuning and Yes buttons to accomplish the tuning process. The Part Feeder will briefly move in both directions. Once the command is completed, click OK to see the Tune Results window. Click OK three times to update a set of parameters in the Dynamics, Gains, Output and Limits tabs.
Figure 26. Tune.
In the Axis ready state, the
Part Feeder can still be
moved by hand.
Job Sheet 1 – Controlling the Servo Drive
24 © Festo Didactic 86692-20
Motion Direct Commands
23. Right-click on Motion Groups FMS MPF Motion Direct Commands. A list of commands appears at the left of the new window (Figure 27).
Figure 27. Motion Direct Commands window.
Simple jog sequence
24. Select MSO (Motion Servo On) and press Execute. This command enables the servo drive that is now in Direct drive control state. On the drive, the Bus status LED becomes steady green.
25. Select MAJ (Motion Axis Jog) and enter the settings of Figure 28 before pressing Execute. Select MAS (Motion Axis Stop) and press Execute before the mobile part feeder reaches the limit of its travel.
In the Direct drive control
state, the Part Feeder can-
not be moved by hand be-
cause the drive tries to
maintain the position.
You can opt for S-Curve
velocity profile instead of
Trapezoidal for smoother
acceleration and decelera-
tion reducing the stress on
the equipment and load.
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 25
Figure 28. MAJ parameters for simple jog (“Units” refer to mm).
26. Select MAJ, change Direction to Reverse, and press Execute. Select MAS (Motion Axis Stop) and press Execute before the Part Feeder reaches the limit of its travel.
27. Select MSF (Motion Servo Off) and press Execute. The drive returns to the Active state. Try to send another MAJ command. Does the mobile part feeder move?
Axis faulted and Shutdown states
28. Put the drive in Direct drive control state using the MSO command. Use the MAJ command with the parameters of Figure 28 to jog the Part Feeder forward at a moderate speed until the drive is faulted.
29. Execute the MAFR (Motion Axis Fault Reset) command to remove the fault. The interrogative mark disappears in RSLogix 5000. What is indicated in the Errors view when you try to execute the MSO command?
30. Because the drive is now in Shutdown state, execute the MASR (Motion Axis Shutdown Reset) command to resume operation.
31. Return the Part Feeder to the center position using the MSO and the MAJ (Reverse) commands.
The flashing letter “E” (code
E19) on the seven-segment
LED indicator and the
steady red Drive status LED
indicate the Axis faulted
state. In RSLogix 5000, an
interrogative mark appears
at the left of screen on Mo-
tion Groups FMS MPF.
Job Sheet 1 – Controlling the Servo Drive
26 © Festo Didactic 86692-20
Absolute reference positioning
32. With the drive in Direct drive control state, execute the MRP (Motion Redefine Position) command with the parameters shown in Figure 29 to set the present location as the home (“0”) position.
Figure 29. MRP parameters.
33. Now that the position has been redefined, execute the MAM (Motion Axis Move) command with the parameters shown in Figure 30. What is the distance traveled by the mobile part feeder?
The MASD (Motion Axis
Shutdown) and the MGSD
(Motion Group Shutdown)
commands put the drive
directly in Shutdown State,
blocking any axis motion.
Motion Group Shutdown is
easily accessible through a
button at the bottom of the
Motion Direct Commands
window.
Job Sheet 1 – Controlling the Servo Drive
© Festo Didactic 86692-20 27
Figure 30. MAM parameters.
Change of speed
34. Put the drive in Active state and position the Part Feeder at the left of the Linear Guide. Put the drive in Direct drive control state. Set the MAJ command with the parameters of Figure 28 to jog the mobile part feeder at a reduced speed.
35. While the Part Feeder is moving, execute the MCD (Motion Change Dynamics) command with the parameters of Figure 31. What happens?
Job Sheet 1 – Controlling the Servo Drive
28 © Festo Didactic 86692-20
Figure 31. MCD parameters.
36. Next, change the Speed field to -10.0. What do you observe?
37. Change the Speed field to 0. What do you observe?
38. Ask your instructor to check and approve your work.
Name: ______________________________ Date: ___________________
Instructor's approval: ______________________________________________