8.19 EDH0162En1040 – 06/99
MM4005 4-Axis Motion Controller/Driver
D — Motion Program Examples
When learning a new computer language, there is no substitute for actually
writing some real programs. The motion controller’s command set is a spe-
cialized language that needs to be mastered in order to be able to create
complex applications. To help you familiarize yourself with MM4005 pro-
gramming structure and language, this appendix contains a few examples
that you can read and copy.
Example 1
The first example is a simple two-axes program that will generate the trian-
gle shown in Fig. D.1.
Fig. D.1 — Triangle Pattern.
Make sure there is no other program in memory with the same name (num-
ber). If you are operating the controller from a remote computer, start by
issuing the XX command for that program number. Then, enter the pro-
gramming mode by using the EP command. If you enter the program from
the front panel, ignore these two and the QP commands.
1XX
Erase program #1, if it exists.
1EP Enter programming mode and store all entries as
program #1.
1VA4 Set velocity of axis #1 to 4 mm/sec.
1PA10,1WS Move axis #1 to absolute position 10 mm; wait for
axis #1 to complete motion.
2VA4 Set velocity of axis #2 to 4 mm/sec.
2PA5,2WS Move axis #2 to absolute position 5 mm; wait for
axis #2 to complete motion.
2VA2 Change velocity of axis #2 to 2 mm/sec.
1PA0,2PA0 Move axis #1 to absolute position 0 mm and axis #2
to absolute position 0 mm.
1QP End of program; quit programming mode.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com