Motion Control Example Using Program Mode; Programming Notes; Figure Gs.6: Download The Program - IMS Mforce micro drive Reference

Motion control
Table of Contents

Advertisement

Motion Control Example Using Program Mode

1.
Click on drop-down menu View > New Edit Window to open the Program Edit Window.
2.
Type "XYZ Test" into the "Open a New file for editing" dialog box, and click "OK".
3.
Click anywhere within the Program Edit Window, and type (followed by ENTER):
VA LP=0
A=100000
D=100000
PG 1
LB AA
MR 250000
H
H 1000
MR –250000
H
H 1000
IC LP
PR " LP=",LP; 'print axis position, 4 characters used, the
BR AA, LP<3
E
PG
4.
Type FD in the Terminal Window and press ENTER to clear the MDrive buffer to factory
defaults before downloading any program.
5.
Click on drop-down menu Transfer > Download to transfer the program from the Program
Edit Window to the Terminal Window. (Under "Source Type" choose "Edit Window".)
6.
Type EX 1 in the Terminal Window and press ENTER to execute the program.
(EX = Execute at address 1.)
7.
The Motion Control MForce MicroDrive will turn the motor 250,000 microsteps in a clockwise
direction, accelerating at 100,000 microsteps per sec
sec
2
, pausing for 1000 milliseconds, then reversing the sequence in a counterclockwise direction,
repeating the motion cycle 3 times until the program ends.

Programming Notes

The example above demonstrates basic commands that verify that your Motion Control MForce MicroDrive
is communicating with your PC. More complex commands and movement may require that your I/O and/or
Analog Input be interfaced and configured. Refer to the Programming and Software Reference for details.
For more information on Programming and Command Control Sets, refer to the Programming and Soft-
ware Reference Manual available on the your product CD or via the IMS web site at http://www.imshome.
com/manuals.html.
Part 1: Hardware Specifications
'user variable name LP = start count 0
'set acceleration to 100000 steps/sec 2
'set deceleration to 100000 steps/sec 2
'enter program mode, start program at address 1
'label program AA
'move motor 250000 steps in the positive direction
'hold program execution until motion completes
'hold 1000 milliseconds
'move motor 250000 steps in the negative direction
'hold program execution until motion completes
'hold 1000 milliseconds
'increment user variable LP
'terminal will display LP=1 LP=2 LP=3
'branch to process label AA, if user variable LP< 3
'end program execution
'exit program, return to immediate mode

Figure GS.6: Download the Program

2
, then decelerating at 100,000 microsteps per
NOTE: Entering
MForce MicroDrive
commands into
the Program Edit
Window, to be edited and
saved, is called "Program
Mode".
NOTE: The program
can be stopped by
pressing the Escape
Button or by pressing Ctrl+C.
1-5

Advertisement

Table of Contents
loading

Table of Contents