G
‐
MAS
–
Gold
Maestro
Software
User’s
Manual
Software
User
Manual
XXXXXXXXXXXX(0.01)
3
‐
17
3.5.1.
The main() program structure
Elmo’s
recommended
structure
for
the
main()
function
of
a
G
‐
MAS
User
Application
program
is
presented
in
Figure
1
:
Figure
1:
Main()
program
structure
The
main()
starts
with
a
call
to
MainInit(),
a
function
that
performs
all
program
and
system
initializations
(more
on
this
later
within
the
manual’s
examples).
After
all
initializations
are
completed,
the
MachineSequences()
function
is
called.
This
function
intentionally
starts
the
execution
of
the
machine
sequences
and
motions.
During
the
machine
operation,
the
MachineSequences()
function
does
not
return
to
the
main(),
until
the
program
requests
to
terminate
(due
to,
e.g.
errors,
user
request
to
close,
etc.).
When
the
machine
operation
is
complete,
the
Machine
Sequences()
function
returns
to
the
main(),
which
calls
the
MainClose()
function
to
close
everything
that
requires
closing,
before
the
program
terminates.
This
is
the
main()
function
of
the
program.
Simple
and
clean
as
possible.
Now
we
progress
into
the
MachineSequences()
function
to
find
the
implementation
of
the
machine
sequences,
using
the
States
Machine
structure.
Содержание Gold Maestro G-MAS
Страница 1: ...G MAS Gold Maestro Software User s Manual March 2011 Ver 1 0 www elmomc com...
Страница 40: ...G MAS Gold Maestro Software User s Manual Software User Manual XXXXXXXXXXXX 0 01 3 38 Then the next stage is...
Страница 43: ...G MAS Gold Maestro Software User s Manual Software User Manual XXXXXXXXXXXX 0 01 3 41 Then the next stage is...