Rockwell Automation 1398-PDM-xxx IQ Master Version 3.2.4 for IA-2000 and IQ-5000 Positioning Drive Modules, IQ-55 User Manual

Page 137

Advertising
background image

A Tutorial Introduction • Programming Basics

115

Publication 1398-PM601A-EN-P — October 2000

T

U

IT

OR

IA

L

Select the Close button or press Enter on the keyboard to close the Compile Results message box.

At the bottom of your screen there will be a window showing the Compiler errors and warnings that
have been generated. In this case, there is a Syntax Error in line 5. If the cursor is in the Edit window
(the one that says *FILE1 at the top) the bottom right-hand corner shows what line the cursor is on.
Move the cursor to line 5 (the line with the Syntax Error) by using the arrow keys or the mouse. The line

MOVE DISTANCE -10

, generated a Syntax Error because “MOVE DISTANCE” is not a valid com-

mand. Select the text “MOVE DISTANCE” by either pressing and holding the mouse button when the
mouse cursor is just before the M and dragging the cursor to the E in DISTANCE, or positioning the
cursor just before the M, holding down the SHIFT key and using the arrow buttons to move the cursor
to after the E in DISTANCE. “MOVE DISTANCE” should now be highlighted. Replace MOVE DIS-
TANCE with MOVD by typing MOVD. (Typing while text is selected will replace the selected text
with what is typed.) Press F2 to compile. There should no longer be any errors.

Save the program to disk by selecting Save As from the File menu. This will display a dialog box asking
for the name of the program (it is possible leave the name “File1”) and to select the directory where you
want the program to be stored.

1

Name the program

LEARN.QPS

. Once the program is named and the

directory selected, select the OK button to save the file. Notice that the * in front of the name at the top
of the editor window has disappeared. The * means that changes have been made since the program was
last saved.

Next save the program to the ULTRA Plus or IQ by selecting Save Program to IQ from the File menu.
This will display the following dialog box:

1.

The default directory can be set from the Windows Program Manager by clicking once on the IQ Master icon, select-
ing Properties, and typing the DOS path that you would like to be the default directory into the Working Directory
field of the dialog box.

Advertising