Installation guide

8 Setup & Installation
default). When finished click the Done button. Now
make the motor move by clicking the Move Re-
sponse button. The motor should complete the pro-
grammed profile and the position error plot should
appear on the screen. You may have to adjust the dis-
play time in order to see the whole move.
6) Repeat step 5 for all servo axes. Then click on the
Exit command button and OK when save parameter
screen appears.
7) Compile and Download the project into the unit by
clicking on the Compile and then the Download
command buttons of the MCPI. This will save the new
servo parameters to the MX2000 controller. Note that
initially, you can leave the Task blank and command
motion using the HOST Commands. Host commands
are entered in the Terminal Mode from the MCPI.
Enter the terminal mode by clicking on the Terminal
command button.
8) Make it move! Now that you have compiled and
downloaded your project into the unit, you are ready to
make the motor move. First you must enter the speed
at which you wish the motor to turn, such as 1 rev/sec.
Do this by typing speed(axis)=1<CR> (<CR> means
the Return or Enter key). Now enter the acceleration,
for example 50 revs/sec/sec by typing accel(axis)=
50<CR>. Set the deceleration to match by typing de-
cel(axis)=50<CR>. Make sure to connect CLR to
COM for sinking I/O or CLR to +24V for sourcing
I/O on the DSP board or no motor motion will occur.
With the motor secured to the bench, you can now
command a move. If the axis you want to move is a
servo drive you must enable the drive first. This is ac-
complished by typing wndgs(axis)=1<CR>. To com-
mand an incremental move of 10 revolutions type
move(axis)=10<CR>. The designated axis motor
should now move 10 revolutions. If it does not, check
your wiring. Also verify your configuration settings.
In addition, check the motor direction to insure it
meets your requirements. The motor direction can be
reversed in the System folder if necessary.
Note: Axis is the desired axis you want to address.
9) Write a BASIC Program. Now that you have made
a simple move, you are ready to write your Task in
the MCPI BASIC-like language. Refer to Section 7
for a complete description of all of the Program
Commands. You can start by opening your Task and
entering the commands. First, let’s enter the exact
same commands that you used in the Terminal HOST
mode. Enter speed(axis)=1<CR>, accel(axis)=
50<CR>, decel(axis)=50<CR>, and move(axis)=10
<CR> commands as you did in step 8). If the axis is a
servo drive enter the WNDGS(axis)= 1<CR> com-
mand before the move command as you did in step
8). You must enter two more commands to tell the
unit that the program is done after it performs the
move. Type WAITDONE(axis)<CR> and
END<CR> as the last lines of the program. Since
your program has changed, you must compile and
download it into the unit again for the changes to take
effect. If you receive compilation errors, check your
spelling and syntax with the information in Section 7.
10) Execute the Program. From the Terminal Host
Mode, click on the RUN button to make the motor
move 10 revolutions. If desired you can now add
lines to the program to perform more sophisticated
motion. For example, type x=10 <CR>. This assigns
the REAL variable “x” a value of 10. Change the
MOVE(axis)=10 line to MOVE(axis)=x. Now the
motor will move the designated axis whatever dis-
tance has been assigned to x. Recompile and down-
load your program, then run it. It should operate the
same as before, but now the program is now using x
as the move distance in place of 10 as before. Change
the value of x to different distance values to verify
that it works correctly.
11) Expand the Program and Debug it. Now that you
have written a simple program, you can add more
complexity by adding more commands. You can do
complex looping, access I/O, and motion functions as
required. It will be helpful now to use the DEBUG
feature of the MCPI environment. Again, refer to
Section 12 for a detailed description of the debug
mode. If you compile your program in Debug Mode,
you can enter the debug screen as your program runs
and step through your code to verify proper opera-
tion. Once the code is functioning correctly, you
should re-compile in Release Mode as this will speed
up program execution.
3.2.2 - Installation into Mechanical
System
Once you have tested everything out in a controlled envi-
ronment, you may complete the installation into your
system. This will require making all the necessary wiring
connections for limit switches, additional I/O, analog in-
puts, encoder, etc. The first thing that must be done is to
retune your servo axes, repeat steps 5 to 7. Start simple!!
Just as you started with a simple move on the bench, you
should start simple here as well, slowly adding comple x-
ity as you debug your code and gain more confidence in
programming. You may use the Debug Mode to help in
this process. See Section 12 Debug Environment for
more information.