©
National Instruments Corporation
13
Getting Started with the NI 9502 and AKM Motors
Step 2: Configuring Hall Effect Sensors and Tuning the Motor
For proper phase switching to occur during Trapezoidal commutation mode, the Hall Effect sensors
from the motor must be connected to the correct Hall inputs on the NI 9502 module. The Hall Effect
sensor phase sequence is motor-dependent, so selecting the correct inputs requires manually testing the
motor wiring.
The following tutorial walks you through the Hall Effect sensor connections for the NI 9502 using the
9502 Trapezoidal Commutation
example installed in the
labview\examples\CompactRIO\
Module Specific\NI 9502\Trapezoidal Commutation
directory. This example shows how
to operate the NI 9502 module in Trapezoidal commutation mode using velocity and current control loops.
1.
Connect the motor and Hall Effect sensor inputs to the drive, but do not connect the motor to a load.
2.
Open the
9502 Trapezoidal Commutation
example.
3.
Configure the example to work with your hardware:
a.
Add your CompactRIO device to the LabVIEW project by right-clicking the
Project:9502
Trapezoidal Commutation.lvproj
item in the LabVIEW
Project Explorer
window and
selecting
New»Targets and Devices
.
b.
Select your target from the
Add Targets and Devices
dialog box.
c.
Click
OK
.
d.
Select
LabVIEW FPGA Interface
from the
Select Programming Mode
dialog box.
e.
Click
Continue
.
f.
Click
Discover
in the
Discover C Series Modules?
dialog box, if it appears.
g.
Locate the FPGA VI and move it from the example FPGA target to the FPGA target under
your device.
h.
Select the example target and remove it from the project.
i.
Rename the FPGA target from
FPGA Target 2
to
FPGA Target
.
j.
Right-click the NI 9502 module item in the
Project Explorer
window and select
Properties
to open the
C Series Module Properties
dialog box.
k.
Change the
Commutation Mode
from
Field Oriented Control
to
Trapezoidal
.
l.
(Optional) Remove the unavailable I/O nodes from under the NI 9502 item the
Project
Explorer
window.
m.
If the NI 9502 is not in slot 1 of the CompactRIO chassis, update the I/O nodes in the FPGA
VI to point to the correct location.
4.
Compile the
9502 Trapezoidal Commutation FPGA
VI.
5.
Open the
9502 Trapezoidal Commutation
desktop VI and run the VI.
Note
If the VI is not executable, right-click the Open FPGA VI reference function and select
Configure Open FPGA VI Reference
from the shortcut menu, then browse to the FPGA VI and
click
OK
.
6.
With the
hall wiring
property set to the default of
1, 2, 3
, enter a small positive velocity (such as
20 RPM) in the
Velocity Setpoint (rpm)
control.
7.
Click the
Enable
button to enable the drive and move the motor.