Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 50 of 909
NOTE: Some word-processing software, such as Microsoft Word, has an option for
"smart quotes", which use angled single (ˊ) and double (˝) quotation marks . The
angled quotation marks are not recognized by the SMI editor. Therefore, any
"smart quotes" option must be disabled before copying and pasting the program
code.
Understanding the Program Requirements
SmartMotors use a simple form of code called "AniBasic", which is similar to the BASIC
programming language. Various commands include means to create continuous loops, jump
to different locations on given conditions and perform general math functions.
Note the following AniBasic program requirements:
l
The code is case sensitive:
l
All commands begin with or use all UPPERCASE letters.
l
All variables are preassigned and must use lower case.
l
Command names are reserved and cannot be used as variables.
l
A space is a programming element.
l
Comments require an apostrophe or ASCII character 39 (') between the commands and
the comment text.
NOTE: When copying and pasting code from another text editor, make sure
that your text editor is not inserting "smart quotes" (angled single or double
quotation marks). These are not the same as ASCIIcharacters 39 (') and 34
("), and the SMI program editor doesn't recognize them.
l
Each program must contain at least one occurrence of the END statement.
l
Each subroutine call must have a label with a RETURN statement somewhere below it.
l
Each Interrupt subroutine must end with the RETURNI statement.
l
The default syntax colors for the SMIeditor are: commands (blue), program flow
controls (pink), and comments(green). All other program text is shown in black. You
can change the syntax colors through the Editor tab in the Options window. For details
on the Options window, see SMIOptions on page 86.
l
There is no syntax checking performed until you do 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
l
As in BASIC, you can use the PRINT command to print to the screen, as shown in the
"Hello World" example. For details, see Creating a "Hello World" Program on page 51.
Part 1: Programming: Understanding the Program Requirements