Motion Control - NI

Transcription

Contents and OverviewMotion ControlContentsOverviewMotion Products Selection Guide .550Tutorial .551The National Instruments multiaxis motion products deliver accurate,high-performance motion for all servo and stepper applications. Oureasy-to-use motion boards, software, and peripherals provide thefunctionality and power for integrated motion solutions. Themotion boards are programmable from LabVIEW, BridgeVIEW,LabWindows/CVI, Visual Basic, and C or C for Windows NT/98/95and other major operating systems. Integrated solutions and a line ofeasy-to-use plug and play motion controllers make our boards the bestchoice for PC-based motion control.Understanding Motion Basics .551Stepper and Servo Motors.552Microstepping in Stepper Motor Systems .553Feedback for Closed-Loop Control .554Motion Operation Modes .555SoftwareLabVIEW Motion Virtual Instruments .556Windows Software for Motion Control .557C Programming for Motion .557HardwareFlexMotion High-Performance Boards.558Specifications .561ValueMotion Boards .562Overview .562Stepper Boards .564Servo Boards .565Specifications .566PeripheralsUMI Wiring Interfaces .567nuDrive Power Drivers .568Motion Control BoardsNational Instruments has two comprehensive lines of motion controlproducts – FlexMotion for advanced power and performance andValueMotion for general-purpose, multiaxis motion applications.FlexMotion offers a six-axis servo architecture with up to two stepperaxes, which combines a Motorola real-time multitasking 32-bit CPU withan Analog Devices digital signal processor (DSP) to accurately controlmotors and generate trajectory solutions for the most complex,coordinated multiaxis control positioning sequences. FlexMotion hasonboard user programming for a wide range of advanced applications.ValueMotion consists of four-axis and two-axis stepper and servocontrollers. An onboard microprocessor and per-axis DSPs or stepcounters offer embedded real-time control. Point-to-point motion,multiaxis coordinated control, electronic servo gearing, and velocityprofiling are standard ValueMotion features.Motion Control SoftwareMotion ControlThe National Instruments motion product line includes a wide array ofapplication development tools for Windows NT/98/95. Use ourWindows DLLs, C-Callable function libraries, LabVIEW and BridgeVIEWVIs, or C and Visual Basic examples. We include pcRunner orFlexCommander Windows software, free of charge, for quick and easysystem set-up. The ServoTune software simplifies the setting of PID loopservo parameters.The Motion VI libraries for LabVIEW and BridgeVIEW maximize thepower of National Instruments motion controllers. A complete set ofpowerful motion functions, such as Load Target Position, Load Velocity,and Start Motion are implemented as fully functional virtual instruments.We also include ready-to-run high-level, multiaxis control VIs, along withnumerous application examples.Motion Control PeripheralsnuDrives are motor power drivers for use with National Instrumentsmotion control boards and application-specific motors, encoders, limits,and user I/O. A single control cable connects the motion control board tothe nuDrive, providing the pathway for all command and feedbacksignals. Optional universal motion interface (UMI) screw terminal wiringinterfaces provide access for third-party motor and driver/amplifierconnection, when nuDrive features do not match the application.548National InstrumentsPhone: (512) 794-0100 Fax: (512) 683-8411 info@natinst.com www.natinst.com

Motion ControlOverviewWhat to Look for inMotion Control SystemsMotion control on the PC is the new standard for intelligentmotion integration. The combination of advanced performance,real-time, embedded CPU-based controllers, PCI busthroughput, and Windows graphical programming make PCbased motion the correct choice for powerful, easy-to-usesolutions. Motion control on the PC has moved beyond ASCIItext programming to interactive graphical interfaces and iconprograms on multiprocessor plug-in controller boards, whichoffload motion tasks from the host PC. These advantages provideseamless integration of motion, vision, data acquisition, andinstrument control functions in one system developed using thesame software with compatible tools and backed by a uniformworldwide sales and support network. National Instrumentsmotion products are excellent system solutions; they areunsurpassed when used in conjunction with vision andother applications.A motion control system must make integration of motioncomponents simple while maintaining the performance andflexibility of each component. National Instruments hasdeveloped a premium offering of motion products, and softwaredevelopment tools designed for integration. The connectivitybetween National Instruments motion system componentsfollows industry-standard specifications at each point – controllerto driver, driver to motor, and software to application. Thisconsistency makes your choice of any individual product, or anentire solution, the right choice.To ensure rapid system development, use motion hardwareand LabVIEW graphical programming software for Windowsfrom the same company that designed these tools to worktogether – National Instruments. Spend more time operating yourmotion system and less time figuring out how to configure it. Oursurprisingly simple – yetpowerful – operatorsoftware panels makeit easy to build andrun motionsystems.Motion Products forOEM ApplicationsMotion ControlOEMs need performance, reliability, flexibility, lower cost, andpremium support in their motion control products. NationalInstruments motion control products exceed OEM expectationsin all four areas; and as a result, are making equipmentmanufacturers successful worldwide. Our ValueMotion andFlexMotion products are performance motion controllers withthe correct level of compatibility for all OEM applications. Ourmotion products are manufactured and tested to exceedISO-9000 quality standards and CE conformance standards.The National Instruments Sales, Support, and Engineeringteam works closely with OEMs to provide product feature andfunction enhancement. Our sales people are engineers,trained to make your PC-based measurement andautomation application successful.For OEM support well beyondthe industry standard, contact oneof our motion product businessdevelopment managers to discussyour application requirements.OverviewAdvanced Motion PerformanceUsing PC-Based StandardsNational InstrumentsPhone: (512) 794-0100 Fax: (512) 683-8411 info@natinst.com www.natinst.com549

Motion ProductsSelection GuideSelecting MotionControl ProductsMotion Products Selection GuideMotionControllerPower Drive orWiring reCD ROMServoMotorPXIStepperMotorUMIStep 1Step 1 – Servo or steppermotor control?Motion systems control and drive servomotors, stepper motors, or both. Whenselecting the components of a system, youmust first determine the type of motorsthat you will be operating and controlling.When identifying motor type, it isimportant to know how many motors oraxes of motion are in the system; whetherall motors are the same size or varied; andwhich type of position and speed feedback(if any) will the motors or motion axes sendback to the controller board. Typical motorand feedback types for use with NationalInstruments motion products include:Servo Motors DC brush motorsBrushless motorsAC servo motorsLinear motorsThird PartyDriver UnitMotion Control 2-phase stepper motors 5-phase stepper motors Linear steppersFeedback Devices Quadrature encoder feedback Analog signal feedbackMotion I/O Limit switchesHome switchesBreakpoint outputsHigh-speed position capture inputsE-Stop and inhibit signalsStored program trigger inputsAnalog and Digital I/O 550A/D inputsD/A outputsNondedicated digital I/OOpto-22 compatible I/OStep 3Step 2Step 2 – Select a nuDrive or UMI.Motion systems include a power driver oramplifier unit that converts the controlsignals from the motion controller boardinto current and voltage power signals forthe motor. The nuDrive is a fully integratedmotor driver unit, and the UMI is auniversal motion interface connectivitymodule for discrete wiring to third-partyamplifier, driver and power electronicsdevices.nuDrive Servo, DC brush typeStepper, 2-phase microstep2 or 4-axis versionsPower supplies enclosedPer-axis motor driversMotion signal conditioningPower monitoring and E-StopPluggable screw terminalsUMIStepper MotorsHost PCandApplication Software Universal wiring interfacePer-axis connector layoutPer-axis and global inhibitsMotion signal conditioningPluggable screw terminals1-4 axis ValueMotion1-4 or 1-6 axis FlexMotionAll servo and stepper motor typesStep 3 – Select a FlexMotion orValueMotion controller.Which motion control board family youchoose depends on a number of factors.Do you need general purpose point-topoint motion or is the motion morecomplex, with circular movement,vector movement, and blended profiles?Are the motors stepper or servo or doesthe system use both? How many axes ormotors do you have to control? Doesyour system require embedded motionprograms or will the motion controlprograms run on the host PC? Thefeatures and capabilities of each motioncontrol board, provide a clear indicationof which board is the best choice foryour system.FlexMotion Dual processor CPU and DSPPowerful 6-axis servo motor control16 MHz encoder inputUp to 2-axis stepper controlPCI and ISA versionsOnboard embedded programsAdvanced motion profilesS-curve motionCircular, helical, and vector motionElectronic gearing and blendingQuadrature encoder and analogfeedback Single shielded cable motion I/O Optocoupled limit inputs and I/O Fast 62 µs PID loop update rateValueMotion 4-axis stepper boards forPXI/CompactPCI 2 or 4-axis servo for PCI and ISA 2 or 4-axis stepper for PCI and ISA Open and closed-loop stepper Dual processor, CPU and DSP Single and multiaxis point-to-pointmotion Electronic gearing for servo control Quadrature encoder feedback Single cable to nuDrive or UMI Lower cost general-purpose controlNational InstrumentsPhone: (512) 794-0100 Fax: (512) 683-8411 info@natinst.com www.natinst.comStep 4Step 4 – Select your motionprogramming method.Development Environmentsand Languages LabVIEWBridgeVIEWLabWindows/CVIC/C Visual BasicNI-Motion Driver Software Complete motion function librariesWindows NT/98/95 Programming32-bit DLLs, C/C librariesFree pcRunner andFlexCommander software Out-of-the-box motion withoutprogramming Free with all motion controlboards Multiplatform compatibility

Motion ControlTutorialMotion control is a broad term that can be simply defined as theprecise control of anything that moves. National Instrumentsmotion control products include PC-based controller boards,wiring, and connectivity devices, power driver units, andsoftware tools and applications. These motion products areoptimized for use in test and measurement automation,laboratory automation, industrial control, robotics, materialhandling, integrated machine vision, CNC machine tool control,and OEM motion applications.National Instruments motion products are designed forpowerful yet simple application in both point-to-point andadvanced multiaxis coordinated motion systems. The fullcomplement of software tools includes – 32-bit DLL and driversfor C/C /Visual Basic and LabWindows/CVI in WindowsNT/98/95. In addition, the software tools include ready-to-runapplications for out-of-the-box motion operation and VIs forgraphical object-oriented motion programming with LabVIEWand BridgeVIEW. As a user or integrator of motion controlproducts, it is easy to achieve optimal results and leverage offnew standards in motion programming with our PC-basedmotion control products.PC-Based Architecture forServo and Stepper ControlServo and stepper motors are widely used for position andvelocity control in a variety of electromechanical configurations.Use of the PC as an operator interface (HMI), local control host,and remote system controller platform is widely accepted andgrowing at a significant pace.Using an intelligent real-time controller board for motion inthe PC accomplishes two major objectives in integrating motion,vision, and data acquisition. The first is offloading low-level axiscontrol, closed-loop control, and multiaxis coordination from thehost PC; the second is providing a fast, flexible, industry-standardPC-based platform for integrated motion functions.Understanding Motion BasicsA motion control system consists of five major components – themechanical device being moved, the motor (servo or stepper)with feedback and motion I/O, the motor driver unit, theintelligent controller, and the programming/operator interfacesoftware. While solutions exist for a stand-alone distributed motioncontrol and closed architechture motion controllers from othervendors, it is clear that PC-based automation, as well as a focus onPC-based motion solutions and open standards for hardware andsoftware components, is fueling growth in this area.Understanding the requirements of your motion system andthe basic technologies for motion are key in selecting productsfor your application. This tutorial covers motion controller boardarchitecture, servo and stepper motors, motor drivers, feedbackfor closed-loop control, motion control modes, motion I/O, andindustry-standard signals for third-party motion componentconnectivity. The National Instruments motion products accessand control these technologies while emphasizing connectivitybetween components and graphical tools for development.DAC Outputs16-BitX6Motorola 32-Bit CPUReal-Time Embedded OSMulti-Tasking Event OSOn Board ProgrammingWatchdog FunctionDSP Motion BlockPID w/ Vff & Aff62 usVector Space Control6 Axis TrajectoryADC Inputs12-BitX8StepperCounter/TimersX2Host PCPentium orOther CPU24-BitDigital I/O100 Pin Motion I/O ConnectorSRAM24 Bit I/OConnectorHost PC BusCommunicationsandStatus InterfaceSRAMSignal Conditioning and OptocouplingPCI / ISA I/O ChannelEncoderProcessorFPGAPosition BreakpointHigh SpeedPosition CaptureX6Motion ControlLimit SwitchI/OFwd, Rev,HomeX6FlashEPROMTutorialIntroductionFigure 1. FlexMotion Dual-Processor Controller Block DiagramNational InstrumentsPhone: (512) 794-0100 Fax: (512) 683-8411 info@natinst.com www.natinst.com551

TutorialMotion on I/OServo and StepperControl BoardsLimitSwitchesThird PartyDrive UnitMotorsABPCEncodersLabVIEWSoftwareFigure 2. Typical Motion System ComponentsMotion ControlDual Processors for EmbeddedReal-Time PC-Based Motion ControlThe heart of the National Instruments PC-based controlarchitecture is a dual-processor controller board with onboardCPU and DSP components. The CPU, an embedded 32-bitmicrocontroller with a firmware real-time operating system(RTOS), provides high-performance motion system control,high-speed host PC-bus communications, motion trajectorypath planning, motion I/O monitoring and control, andcoordination of the multiaxis DSP, FPGA, and counter/timerelements. The DSP adds hard, real-time control of motionwithout interruption from the host PC or commandcommunications. The DSP calculates and executes closed-loopPID servo updates simultaneously with trajectory position,velocity, acceleration, and other parameters. The DSP alsoupdates the motor command output signals and receives theencoder feedback data for autonomous processing, leveragingoff the FPGAs, DACs, ADCs, and other interface components.While all of our motion control products are based on thedual-processor architecture, our two product families,ValueMotion and FlexMotion, use these CPU, DSP, andcounter/timer capabilities differently, providing a choice ofgeneral-purpose or high-performance solutions. All NationalInstruments motion controller boards are designed forintegrated operation of their dual processor configuration in theLabVIEW and BridgeVIEW graphical programmingenvironments, as well as with LabWindows CVI, C/C , VisualBasic, and other major development tools.Stepper and Servo MotorsStepper and servo motors are both generic terms covering manytechnologies. Stepper motors are discrete motion devices thatmove to positions that relate directly to the number of input controlpulses, at a velocity that relates directly to the pulse rate. Servomotors are continuous motion devices that use feedback signals toprovide position and velocity control in a closed-loop environment.552Driving a controlled current through a number of wire coilswithin the motor generates the magnetic forces in a motor.Depending on their design, motors have many coils oriented inspecific magnetic positions within their housing. By pulsing orsteady control of current through different motor coils in a knownpattern, electromagnetic fields develop in the motor, causingincremental or continuous motion.The current and voltage that drives a motor typically comesfrom a power electronics device, known as an amplifier or driver.Motor drivers are located between the motion controller boardand the motor.Servo MotorsServo motors cover a very broad array of motor types. TheNational Instruments ValueMotion and FlexMotion servo motorcontroller boards are designed to work with all types of servomotors using industry-standard control and feedback signals.The primary types of servo motors are DC brush servo, andbrushless servo. Servo motors are continuous positioning devicesthat require feedback to the motion controller board toaccomplish closed-loop control of positioning and velocity. Anopen-loop servo motor rotates or moves uncontrolled as long aspower is applied to it. By implementing a control loop around aservo motor, using a PID controller and feedback from anencoder device mounted on the motor, it is possible to accuratelyand reliably move to the desired position at well controlledvelocities following user-specified motion trajectory paths.All servo motor systems use a motor driver power unit tocontrol the voltage and current that flows through the motorarmature and motor windings. The basic principle of motion inservo motors is based on the flow of current through a wire coil,generating a magnetic field that reacts with permanentmagnets in the motor to cause attraction and repelling forcesthat cause movement.National InstrumentsPhone: (512) 794-0100 Fax: (512) 683-8411 info@natinst.com www.natinst.com

Motion ControlTutorialMicrostepping in Stepper Motor SystemsThe DC brush servo motor, the simplest servo motor design, iscost effective for its performance and power in general-purposeservo applications. DC brush servo motors are self-commutatingmotion devices that rotate continuously while current is appliedto the motor brush contacts. The current flows through thebrushes to the armature and then through the motor coils,creating the magnetic forces that cause motion. Changing thedirection of current flow through the motor reverses thedirection of rotation. Encoder feedback to the motion board isrequired to provide accurate control of position and velocity witha DC brush servo motor. Encoders are mounted on the shaft ofa motor or on the coupled mechanical unit as a linear or rotarydevice, directly translating movement into feedback data.Advanced stepper motor driver technology provides a capabilityknown as microstepping. Microstepping is based in the steppermotor driver component. It provides for the predeterminedsubdivision of each full step into microsteps by proportioning thecurrents in each coil to produce carefully balancedelectromagnetic locations between the full steps. To quicklyreview the technology of microstepping, sine and cosineproportioned values of current are carefully sent to particularmotor coils, resulting in the simulation of interim microsteplocations. The advantage of microstepping is multiplication ofthe number of steps per revolution, thereby increasing theresolution of a stepper motor system. Additionally, because moresteps are provided, the movement between steps is smaller andthe resulting step motion is typically smoother. Microsteppingtechnology is widely accepted and fully implemented in allNational Instruments stepper control and driver products.Because stepper motion is controlled by the generation ofstep pulses from the controller board, it is clear that the steppermotor controller must carefully control the number of pulses(position), the frequency of the pulses (velocity), and the rate ofchange of frequency (acceleration/deceleration). This process isreferred to as trajectory control, where the trajectory is thepredictable path of speed changes that the motor undergoes asit moves from its starting position to its desired end positionthrough its profile or as it runs continuously at desired velocities.Stepper Motors10x Microstepping1 Full Step 10 MicrostepsMotion ControlStepper motors rely on the principle of commutation oralternating magnetic forces, to provide predictable controlledmotion. Commutation in motion applications is the controlledsequencing of drive currents and voltages in motor coilwindings to provide torque and therefore, movement. In astepper motor system, individual step signals from a motioncontrol board are converted into an energizing pattern for themotor coils.As the commutation pattern varies, the motor moves from onediscrete position to another. When the pattern is held in a singlestate, the stepper motor holds its position with a known torque(holding torque). These single-state locations are known as thefull-step locations of a stepper motor. One important steppermotor specification is the number of full steps per revolution(rotary motion) or full steps per unit length (linear motion).The steps/revolution parameter of a stepper motor indicatesthe basic resolution of the motor. For example, a stepper motorwith a resolution of 200 steps/revolution could also be referredto as 1.8 degree/step motor. If the motion control board output200 steps to a full-step motor driver connected to a 1.8-degreestepper motor, the resulting movement would be a full360 degrees of movement or one revolution of the motor. Ifthose 200 steps were generated evenly over a period of oneminute, the speed of rotation of the motor would be onerevolution per minute (rpm).TutorialDC Brush Servo MotorsMicrostepsFull StepsMicrosteppingPower Driver UnitMotorStepsStepper MotorControl BoardStepDirStepper MotorOutput SignalsMotorFigure 3. Stepper Motor Controllers and nuDrives Support MicrosteppingNational InstrumentsPhone: (512) 794-0100 Fax: (512) 683-8411 info@natinst.com www.natinst.com553

TutorialMotion ControlTutorialFeedback for Closed-LoopMotion ControlMotion systems use feedback signals to provide closed-loopcontrol of position and velocity. Although feedback is optionalin stepper motor systems, servo motor systems require feedbackfor proper control, operation, accurate motor position, andvelocity maintenance. The most common feedback used withintelligent motion control boards is quadrature incrementalencoder feedback.Feedback devices provide signals that convey position andvelocity data to a motion controller. The signals are converted onthe motion controller into count values that correspond toposition. Position values, measured over fixed periods of time,correspond to velocity. Each motion axis has separatefeedback signals.LightSourceDiskGridAssemblyPhoto SensorPickupQuadratureOutputABABMotion ControlI554Figure 4. Encoders are electro optic devices thatprovide position and velocity feedback.Quadrature Encoder FeedbackQuadrature incremental encoders are optoelectronic feedbackdevices that use a patterned optical mask and optointerrupterLED source/transistor detector pairs to generate two digitaloutput waveforms, where the pulse location of the waveformsare 90 degrees out of phase with each other. This 90 degreephase difference in the waveforms (quadrature) is used by theencoder input circuitry to enhance the resolution of the positioncount value and to determine the direction of motion. If the Aphase signal leads or comes before the B phase signal, thenmotion direction is considered clockwise or forward. For theopposite phasing, the direction is considered counter-clockwiseor reverse.The quadrature encoder input circuits decode the phasing ofthe signals and count the quadrature pulses to derive positioninformation. The position count value is maintained in a 32-bitregister, providing more than 4 billion position locations.The detector circuits for encoder feedback on the motioncontroller boards incorporate digital signal filtering techniques toavoid deception by noise pulses or erroneous data that does notfit the quadrature model.Analog FeedbackAlthough quadrature encoder feedback is the most commontype used, you can use analog feedback to provide the sameposition and velocity data. If an analog input signal is measuredand converted by an ADC on the motion board, the analogvalue generates a corresponding digital value. This value is thenused as position data and the overall range of available positionsis determined from the resolution of the ADC. Analog feedback,provided on the National Instruments FlexMotion boards, is veryuseful in specialized motion applications.Motor Driver Power DevicesMotor driver power devices take the control signals generatedby the motion control board and convert them into powersignals that are appropriately controlled for the motor connectedto the driver. Motor drivers vary with actual motor types, and asa result the motor drivers for stepper motors are different frommotor drivers for DC brush or brushless servo motors. Eachmotor driver type is designed to convert the control signals fromthe controller board into power signals required by the motor.Motor driver units require the addition of a power supply or anumber of power supplies to provide the appropriate currentsand voltages used in a motion system. While the level of voltageand current provided is important, additional considerationshould be given to reserve capacity to store extra energy for thepeak current demands of a motor during its startup oracceleration phase. Switching power supplies typically sufferfrom output shutdown when the motor driver attempts to drawthe extra current that it requires during acceleration.National Instruments motion control products provide twodifferent solutions for motor driver configuration. The nuDriveunits are fully enclosed motor driver subsystems with a singlecable connection from the motion control board. nuDrivesinclude the appropriate motor driver types per axis, for small DCbrush type servo or stepper motors, along with bulk DC powersupplies specifically designed to provide the voltage andcurrents demanded by these drivers. Additionally, nuDrive unitsincorporate all of the necessary low-voltage power supplies,wiring connectivity, signal conditioning, and monitoring that areappropriate for motion system integration with encoders, limitswitches, and other motion I/O devices.If nuDrive voltage and current capabilities do not meet therequirements of a specific motor, it is simple to connect tothird-party motor drivers using a universal motion interfacemodule (UMI).National InstrumentsPhone: (512) 794-0100 Fax: (512) 683-8411 info@natinst.com www.natinst.com

Motion ControlTutorialCircular, Spherical, and HelicalInterpolation ModesMotion Operation ModesS-Curve Acceleration/Deceleration ModesPC-based servo and stepper controller boards offer a wide varietyof operation modes. The modes listed provide operational featuresand functionality at a high level, making it simple to solve motionapplications. Access these standard operation modes in a fullyintegrated motion system with powerful software tools. Easy-touse Windows software, drivers, and Motion VIs make modeoperation, parameter loading, and status display a snap. Motion iscontrolled in absolute or relative mode, and you can use allposition breakpoint, position value capture, and status functions.S-curve acceleration and deceleration modesprovide complete flexibility in the control ofprofiles for smoothing motion and eliminatingjerk from mechanical systems. The degree ofS-curve on a motion profile is controlled by separate acceleration and deceleration smoothing (jerk-limit) factors.Point-to-Point Position ModeIn point-to-point mode, each axis is independently programmed with motion profileparameters. Values for velocity, acceleration,deceleration, S-curve, and target position areloaded prior to a start command.Point-To-PointIn these modes, the motion parametersdescribing arcs, vector velocity, accel/decel,radius, start angle, and target angle are loaded CircularInterpolationbefore the move is started. For helicalinterpolati

The Motion VI libraries for LabVIEW and BridgeVIEW maximize the power of National Instruments motion controllers. A complete set of . mechanical device being moved, the motor (servo or stepper) Motion Control / / / / Motion Control Tutorial National Instruments Phone: (512) 794-0100 Fax: (512) 683-8411 info@natinst.com www.natinst .