
P
ar
t
1: P
rog
ra
m
ming
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 52 of 909
Adding Comments to the Code
You can add comments to the code by inserting a single quotation mark (') between the
commands and your comment text.
NOTE:
Comments do not get sent to the SmartMotor.
RUN?
'The program stops here until it receives a RUN command
("Hello World",#13)
'#13 is a carriage return
END
'The required END command
Checking the Program Syntax
You can syntax check the program by doing one of the following:
l
From the main menu, select
Compile > Scan file for errors
l
Select the Scan File for Errors button on the toolbar
l
Press Ctrl+F7
If errors are found, correct them and re-check the syntax.
The program will also be syntax checked as part of the download procedure. For details, see
Downloading a Program to the SmartMotor on page 52.
Saving the Program
After entering the program, you can save it as follows:
1. From the main menu, select:
File > Save As
, or click the Save button (
) on the
toolbar. The Save As window opens.
2. Select a drive/folder on your PC or use the default location.
3. Assign a name, such as "HelloWorld.sms".
4. Click Save to write the program to the specified location and close the window.
If you attempt to syntax check or compile and download an unsaved program, the SMI
software automatically opens the Save As window, which requires you to save the program
before continuing.
Downloading a Program to the SmartMotor
NOTE:
In addition to the software information in this section, there is context-
sensitive help available within the SMI software interface, which is accessed by
pressing the F1 key or selecting Help from the SMI software main menu.
After you've created a program, it must be downloaded to the SmartMotor. This section
explains how to syntax check and download the program.
NOTE:
Comments do not get sent to the SmartMotor.
Part 1: Programming: Adding Comments to the Code