Axis Servo System Using Labview
Axis Servo System Using Labview
- X, Y axes:
1
6 1 9 4
5
10
1
8
2 3
11
Items Description
1 Moving part
7 Encoders
8 Step Motors
10, 11 Limit switches (X)
- Z axis
2
1
5 3
2
4
8
7
9
1 Pulley
2 Belt
3 Step Motor
4 Encoder
9 End effector
1.1 Hardware
1.1.1 NI PS-15 Supply Power
3
NI PS-15 (National Instruments Power Supply):
4
powerful function set provide high-speed communications while off-loading complex
motion functions from the host PC for optimized system performance.
The 7344/7334 controller uses the digital signal processor (DSP) for all closed-loop
control including position tracking, PID control closed-loop computation, and motion
trajectory generation. The DSP chip is supported by custom FPGAs that perform the
high-speed encoder interfacing, position capture and breakpoint functions, motion I/O
processing, and stepper pulse generation for hard real-time functionality. The embedded,
multitasking real-time CPU handles host communications, command processing, multi-
axis interpolation, onboard program execution, error handling, general-purpose digital
I/O, and overall motion system integration functions.
Embedded Real-Time Operating System (RTOS)
The embedded firmware is based upon an embedded RTOS kernel for optimum system
performance in varying motion applications. Motion tasks are prioritized. Task execution
order depends on the priority of each task, the state of the entire motion system, I/O or
other system events, and the real-time clock.
The DSP chip is a separate processor that operates independently from the CPU but is
closely synchronized by an internal packet-based command, data, and messaging event
structure. The 7344/7334 controllers are true multiprocessing and multitasking embedded
controllers. The advanced architecture of the 7344/7334 controller enables advanced
motion features, such as enhanced PID functions.
Trajectory Generators
The 7344/7334 controller trajectory generators calculate the instantaneous position
command that controls acceleration and velocity while it moves the axis to its target
position. This command is then sent to the PID servo loop or stepper pulse generator,
depending on how you configure the axis. To implement infinite trajectory control, the
7344/7334 controller has eight trajectory generators implemented in the DSP chiptwo
per axis. Each generator calculates an instantaneous position each PID update period.
While simple point-to-point moves require only one trajectory generator, two
5
simultaneous generators are required for blended moves and infinite trajectory control
processing.
Analog Feedback
The 7344/7334 controller has an 8-channel multiplexed, 12-bit ADC. The converted
analog values are broadcast to both the DSP and CPU via a dedicated internal high-speed
serial bus. The multiplexer scan rate is approximately 50 s per enabled ADC channel.
This provides the high sampling rates required for feedback loop closure, joystick inputs,
or monitoring analog sensors. Four of these channels are intended for calibration, leaving
the other four available for analog feedback.
Flash Memory
Nonvolatile memory on the 7344/7334 controller is implemented with flash ROM. This
means that the 7344/7334 controller can electrically erase and reprogram its own ROM.
Since all the embedded firmware, including the RTOS and DSP code, of the 7344/7334 is
stored in flash memory; you can upgrade the onboard firmware contents in the field for
support and new feature enhancement.
Axes and Motion Resources
The 7344/7334 controller can control up to four axes of motion. The axes can be
completely independent, simultaneously coordinated, or mapped in multidimensional
groups called vector spaces. You can also synchronize vector spaces for multi-vector
space coordinated motion control.
Axes
At a minimum, an axis consists of a trajectory generator, a PID (for servo axes) or stepper
control block, and at least one output resource, either a DAC output (for servo axes) or a
stepper pulse generator output. Servo axes must have either an encoder or ADC channel
feedback resource.
Closed-loop stepper axes also require a feedback resource, open-loop stepper axes do not.
These axis configurations are shown in the figure 1.6. With the 7344/7334 controller, you
can map one or two feedback resources and one or two output resources to the axis. An
axis with its primary output resource mapped to a stepper output is by definition a stepper
6
axis. An axis with its primary output resource mapped to a DAC is by definition a servo
axis.
7
Introduction
The UMI-7774 and UMI-7772 (UMI-7774/72) are standalone connectivity accessories
designed to be used with National Instruments 73xx series motion controllers for up to
four axes of simultaneous or independent control. Ideally suited to industrial and
laboratory applications, the UMI-7774/72 connects third-party stepper and servo drives
(amplifiers) and/or feedback and digital I/O to National Instruments motion controllers.
You can use the UMI-7774/72 with a wide variety of drives designed for many types of
motors or actuators and power ranges. This flexibility allows you to use the UMI-7774/72
in systems where you must use a third-party drive. To work correctly with the UMI-
7774/72, drives must have industry standard interfaces. For stepper systems, the industry
standard command signals are step and direction, or clockwise (CW) and counter-
clockwise (CCW), pulse inputs. For servo systems, the industry standard command signal
is a 10 V analog input.
Features
The UMI-7774/72 simplifies field wiring by supplying a separate feedback and control
D-SUB connector for each axis. The UMI-7774/72 connects the motion input and output
to the motion controller through a single interface cable.
You can connect the UMI-7774/72 digital inputs and outputs to the controller with a
separate interface cable to provide access to up to eight digital inputs and eight digital
outputs on the controller. Also, the UMI-7774/72 features a host bus monitor power
interlock that automatically disables the drive if the host computer is shut down or the
motion input/output interface cable is disconnected.
1.1.4 Driver P70530
14
Encoder
Fig1.10: Encoder
Specifications:
Resolution: 1000 counts per revolution
Input voltage: 5V
Input current: 100 mA max (60 mA typical)
Channel Configuration: Quadrature A, B and Index
Operating Temperature: -2085 0C
Maximum frequency: 200Khz
Max shaft speed: 8000 RPM
15
1.2 Introduction to the control software
1.2.1 LabVIEW
LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a programming
environment in which you create programs using a graphical notation (connecting
functional nodes via wires through which data flows); in this regard, it differs from
traditional programming languages like C, C++, or Java, in which you program with text.
The LabVIEW development environment works on computers running Windows, Mac
OS X, or Linux. LabVIEW can create programs that run on those platforms, as well as
Microsoft Pocket PC, Microsoft Windows CE, Palm OS, and a variety of embedded
platforms, including Field Programmable Gate Arrays (FPGAs), Digital Signal
Processors (DSPs), and microprocessors.
Using the very powerful graphical programming language that many LabVIEW users
affectionately call "G" (for graphical). And because LabVIEW has such a versatile
graphical user interface and is so easy to program with, it is also ideal for simulations,
presentation of ideas, general programming, or even teaching basic programming
concepts.
LabVIEW offers more flexibility than standard laboratory instruments because it is
software-based. It has extensive libraries of functions and subroutines to help you with
most programming tasks, without the fuss of pointers, memory allocation, and other
arcane programming problems found in conventional programming languages. LabVIEW
also contains application-specific libraries of code for data acquisition (DAQ), General
Purpose Interface Bus (GPIB), and serial instrument control, data analysis, data
presentation, data storage, and communication over the Internet. The Analysis Library
contains a multitude of useful functions, including signal generation, signal processing,
filters, windows, statistics, regression, linear algebra, and array arithmetic.
16
Single Axis Control Interface.
17
1.2.2 Single Axis Control
Hardware connections
General Diagram
18
PS-15 Power Supply Connection
19
Using the cable (SHC88-C88-S) to connect PCI 7344 card with UMI7774
20
4. Connected to Driver 70530 by using DB15M cable
Driver 70530 Connection
System Configurations
21
Step 1: Hardware Configurations
22
Motor Selection: NI NEMA 23 (T21NRLH).
Step Resolution
23
Load Inertia: 0-1
24
25
Dynamic Smoothing: Minimal
Multistepping: Disabled
26
Encoderless Stall Detection: Enabled
27
Step 2: Configuring NI Motion Controller
Using NI MAX software, on the MAX interface, we choose:
My System > Devices and Interfaces > NI Motion Devices > PCI-7340 (1) > Default
7340 Settings > Axis 1
Axis Configuration:
1. Axis Configuration Tab
28
2. Stepper Settings Tab
29
Motion I/O Settings:
30
Trajectory Settings:
1. Trajectory Settings Tab:
31
Find Reference Settings:
32
Gearing Settings:
33
Control Loop Update Period: Update Period: 5.0 Miliseconds.
Save to All Axes and Initialize.
ADC Settings
Channel: Disabled.
Save to All Axes and Initialize.
Encoder Settings:
34
PWM Settings.
35
Step 4: Run and monitor the machine, recording data (error) for each step
resolution
Report: Data recording and calculating the error.
- Step resolution: 200 steps/rev
Iteration Error Iteration Error Iteration Error
1 8 15
2 9 16
3 10 17
4 11 18
5 12 19
6 13 20
7 14
2 9 16
3 10 17
4 11 18
5 12 19
6 13 20
7 14
36
Iteration Error Iteration Error Iteration Error
1 8 15
2 9 16
3 10 17
4 11 18
5 12 19
6 13 20
7 14
1 8 15
2 9 16
3 10 17
4 11 18
5 12 19
6 13 20
7 14
2 9 16
3 10 17
37
4 11 18
5 12 19
6 13 20
7 14
1 8 15
2 9 16
3 10 17
4 11 18
5 12 19
6 13 20
7 14
1 8 15
2 9 16
3 10 17
4 11 18
5 12 19
6 13 20
7 14
38
1.2.3 Multi-axis control
Preparation
Students must prepare these things at home:
- Study on the hardware of the system: components, functions, drivers
specifications, controllers (Similarly to the single axis case).
- Study on the hardware connections. (Similarly to the single axis case).
- Study on the configuration for controller by using NI MAX and P70530 driver
- Understand the multi-axis control interface
- Study on the functional block of NI Motion.
Multi-axis control interface
39
Fig 1.32: Functional block of NI Motion
40
Velocity: long signed integer.
Load Acceleration/Deceleration.
Position: output
Read Velocity in RPM
41
Filtered Velocity: output (step/s).
Check Move Completed Status
Axis/VS Map
Move Complete: output (True/False)
Find Reference
Stop Motion
42
Radius: long unsigned integer (U32)
Travel Angle
Start Angle
Load Vector Space Position
Z Position
X Position
Y Position
43
Experiment 1: Drawing lines according to the sample figure.
Step 1: Hardware and software configuration of NI MAX (review the single axis
experiment)
Step 2: Set up the movement parameters
- Home position: (0, 0)
- Starting position: (35, 35)
Step 3: Run and monitor the movement.
- Find the reference position
- Reset position of motor
- Enter the coordinate of the points.
- Set ON of Straight Line to activate the linear movement
- Press Start to start.
44
Experiment 2: Drawing arc according to the following figure
Step 1: Hardware and software configuration of NI MAX (review the single axis
experiment)
Step 2: Set up the movement parameters
- Home position: (0, 0)
- Starting position: (5, 25)
Step 3: Run and monitor the movement.
- Find the reference position
- Reset position of motor
- Enter the coordinate of the points.
- Set ON of Arc to activate the circular movement
- Press Start to start.
45
Step 1: Hardware and software configuration of NI MAX (review the single axis
experiment)
Step 2: Set up the movement parameters
- Home position: (0, 0)
- Starting position: (5, 25)
Step 3: Run and monitor the movement.
- Find the reference position
- Reset position of motor
- Enter the coordinate of the points.
- Set ON of Straight Line and Arc to activate the linear and circular movement
- Press Start to start.
46
- Check the program again and RUN
- Supervise and evaluate the results
2-Axis Linear Movement
1 2 3 4 5 6 7
1 2 3 4 5 6
47