4programming basics, Programming basics, 4 programming basics – Lenze PMSS1000 Simple Servo User Manual

Page 9

Advertising
background image

Indexer-Programmer-Manual.pdf REV 1.3

MotionView Studio toolbar Icons From Left to Right:

Compile, Compile and load, Run, Reset Program, Stop and Disable, Single Step (Step Over), Single Step
(Step Into), Set Breakpoint, Remove breakpoint, Display Watch Window.

To load User program from PC use <Edit> <Import program from file> menu. Executing this menu loads
program from file to editor window. It doesn't load it to SSi memory yet.
To compile program and load it to SSi's memory use <Indexer> <Compile and load> menu. You can use
<Indexer> <Compile> menu to compile and check syntax errors without loading program to the SSi'
memory. If the compiler finds any syntax error, compilation stops and program will not be loaded to drive's
memory. Errors are reported in bottom portion of the screen in message area.
To save program on PC disk use <Edit> <Export program to file >.

To execute program use <Indexer> <Run> menu.

To execute program step by step use <Indexer> <Step Over> menu. SSi will execute program one
step at the time. Current program statement will be highlighted.
Breakpoint(s). It is convenient to set point in the program where you would like to stop and evaluate
some results. You can do it by pointing to lines of code you would like program to stop and hit
<Indexer><Set Breakpoint>. Red dot will mark the line showing that program will be stopped if it reaches
this line before executing it. Executing stop doesn't disable drive and all position variables are valid.
To Stop program execution and disable drive use <Indexer><Stop>. Program will stop after completing
current statement. You can resume program by hitting <Indexer><Run>.
To Reset Program execution from the beginning use <Indexer><Reset>. Program will be reset and drive
will be disabled. All position variables will no longer be valid.

1.4 Programming

Basics

It is usually useful to have all the moves a machine will do, along with I/O statements, etc., in a program.
We will now explore how programs are written and used.
Make sure the indexing drive is connected to your computer and on-line.
Select <Indexer program> on the left tree. MotionView loads program from indexer memory automatically
to the right window. Note that if there is no valid program in the indexer memory window on the right will
be empty. Clear program text on in the right window if any appears then type in following program:

UNITS=1
ACCEL = 5
DECEL = 5
ENABLE
MOVED 10
MOVEDISTANCE -10
END

9

Advertising