Chapter 6: program development and execution, 1 editing a program, 2 compilation – ElmoMC SimplIQ Software Manual User Manual

Page 63: Chapter 6: program development and execution -1, 1 editing a program -1, 2 compilation -1, Chapter 6

Advertising
background image

SimplIQ

Software Manual

Program Development and Execution

MAN-SIMSW (Ver. 1.4)

6-1

Chapter 6: Program Development and

Execution

The process of

SimplIQ

drive program development includes the following steps:

ƒ

Program editing: Write and/or edit the program.

ƒ

Compilation: Use the Compiler to process the program and find errors.

ƒ

Program loading: Load the program to the +flash memory of the drive.

ƒ

Debugging: Observe the behavior of the program and correct it where necessary.

ƒ

Running the program

ƒ

Saving to flash: Move the program permanently to the drive.

The Elmo Studio IDE includes all the tools needed to perform this procedure. Using the
Elmo Studio is fully explained in Chapter 4 of the Composer for

SimplIQ

Software Manual.

6.1

Editing a Program

The drive program is written in simple text, using any text editor. The Elmo Studio is
recommended for program editing because it provides several additional services such as
downloading a program to the drive, compiling the program and running it.

6.2

Compilation

Each user program must be compiled after editing. Although the Compiler does not reside
in the DSP software, it is described here because it is an integral part of the program
development process. The Compiler in the Elmo Studio is external, stand-alone software
that can be accessed through the Composer software. The user can write and compile a
program in off-line mode (without establishing communication with the drive) and then use
the Compiler to compile the program in order to produce address maps and run-time code.
If, in the course of compilation, the Compiler finds syntax errors, it stops the compilation
process and informs the user about the errors, presenting them in convenient form.

The Compiler is composed of a preprocessor and a code generator. The preprocessor
evaluates pragmas and constant expressions and is described in

section

6.3

.

The Compiler accepts the user program as a text file and files with target

SimplIQ

drive

information. This information is required in order to ensure that the compiled code can run
on the

SimplIQ

drive.

While the Compiler can locate syntax errors, it cannot find:
ƒ

Out-of-range command arguments

ƒ

Bad command contexts, such as an attempt to begin a motion when the motor is off.
These errors must be corrected in the debugging stage.

Advertising