Professional Documents
Culture Documents
1. CONTENTS
Step motors and drivers
NI motion control card
Labview programming
Linear and circular interpolation
1
Fig 1.2: The complete 3D model
X, Y axes:
Items Description
6 1 9 4
1 Moving part
8 Step Motors
7
9 Guiding shaft(Y)
2 3
1 10, 11 Limit switches (X)
2
Z axis
Items Description
1
1 Pulley
5 3
2 Belt
2
3 Step Motor
4
8 4 Encoder
8 Guiding shaft
6
9 Tool
3
P7S2-232-9D cable
SHC-88 cable
PCI 7344
UMI 7774
DB-15M cable
Driver
P70530
PS 24VDC
DB-25M cable
This part presents an overview of the motion control algorithms and capabilities of the
7344/7334 controller.
Dual Processor Architecture
Perform up to four axes of simultaneous, coordinated motion control in a
preemptive, multitasking, real-time environment with the 7344/7334 controller.
The high-performance capabilities of the 7344/7334 controller result from an
advanced dual-processor architecture using a Motorola MC68331 real-time 32-bit
CPU combined with an Analog Devices ADSP 2185 DSP and custom FPGAs.
5
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.
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.
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 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 chip—two per axis.
Each generator calculates an instantaneous position each PID update period. While
simple point-to-point moves require only one trajectory generator, two
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.
6
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.
Flash Memory
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.
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 following figures:
7
UMI 7774
8
Step motors and encoders
Stepper motors provide very precise, extremely cost-effective motion control. The 2
phase motors inherently move in small, precise, 1.8 degree increments at 200 steps per
revolution and are brushless and maintenance free. Stepping action is simple to control and
does not require complicated, expensive feedback devices. National Instruments also offers
encoders matched to the motors for applications where position verification is required.
Stepper motors are available from NI in three different National Electrical Manufacturers
Association (NEMA) frame sizes and with either a single or a dual shaft.
The motors provide optimum performance and easy connectivity when matched with
the P7000 series stepper drives available from NI.
Specifications: NEMA 23 Motor
Step angle: 1.8 deg
Steps per revolution: 200 (ppr)
Angular accuracy ±3%
Phases: 2
9
Specifications:
Resolution: 1000 (cpr)
Input voltage: 5V
Input current: 100 mA max (60 mA
typical)
Maximum frequency: 200 kHz
Max shaft speed: 8000 RPM
Fig 1.12. Encoder
Driver P70530
10
Fig 1.14. The pin-out of P70530
11
3. DRIVER SETTINGS
Step 1: Hardware Configuration
Motor Configuration by P70530 driver
12
Driver Setting for Getting Started
13
Step Resolution
14
Load Inertia: 0-1
15
Dynamic Smoothing: Minimal
Multi-stepping: Disabled
16
Encoderless Stall Detection: Enabled
17
Step 3: 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
18
2. Stepper Settings Tab
19
Motion I/O Settings:
20
Trajectory Settings:
1. Trajectory Settings Tab:
21
Find Reference Settings:
22
Gearing Settings:
23
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:
24
PWM Settings.
25
4. LABVIEW PROGRAMMING
4.1 Single axis control
26
Resolution 200 5000 10000 25000 50000
(steps/rev)
1
2
3
4
5
6
7
8
9
10
Exercise 2: Run an axis with the predefined displacement, initial velocity and
acceleration. Let observe the velocity and position graph and estimate the time of
acceleration and deceleration. Compare to the theory of point to point movement by
calculations?
4.2 Multi-axis control
28
Experiment 1: Drawing lines according to the sample figure.
29
Experiment 2: Drawing arc according to the following figure
30
Experiment 3: Blended movement
31
Experiment 4: Linear and arc movement
- Students complete the control program by adopting the most appropriate function
blocks to replace the blank blocks
- Choose the Board ID: must be the same with NI MAX settings
- Choose the movement axes: X,Y.
- Setting up the velocity, acceleration and vibration
- Setting up the target position
- Create an interface control
- RUN and evaluate the results
32
1 2 3 4 5 6
4
33
APPENDIX
34
Acceleration: long unsigned integer (U32)
Reset Position
Position: output
Read Velocity in RPM
35
Filtered Velocity: output (step/s).
Check Move Completed Status
Axis/VS Map
Move Complete: output (True/False)
Find Reference
Stop Motion
36
Radius: long unsigned integer (U32)
Travel Angle
Start Angle
Load Vector Space Position
Z Position
X Position
Y Position
37