Motion Coordinator Technical Reference Manual
Programming 7-3
What is a program?
What is a program?
The traditional description of a program is a task that you want the computer
(the Motion Coordinator) to perform. The task is described using statements
written in the Trio BASIC language which the Motion Coordinator can understand.
A program is simply a list of instructions to the Motion Coordinator, some of
these instructions have a dedicated function to be performed by the controller,
others control the program flow, the sequence in which instructions are actually
executed.
Statements in your program must be written using a set of rules known as
'Syntax'. You must follow these rules if you are to write Trio BASIC programs. Trio
BASIC instructions are divided into the following types:
• Instructions
• Program Flow
• Controller Specific
• Identifiers
• Labels
• Data Storage
Controlling the Sequence of Events
In order to write a program we must break the function of our system down into
logical operations which the controller must perform. As we are not able to solve
every problem in a purely linear manner, we need more control of the ‘flow’ of
the program instructions, for example to make a decision and decide whether or
not certain instructions need to be executed, or to perform a certain task several
times. In programming terms we refer to these concepts as SEQUENCE,
SELECTION and ITERATION.