Elmo HARmonica Network Hardware User Manual


 
HARSFEN0602
according to system events. These routines will be executed only when their invocation
condition is satisfied. These automatic routines doesn’t have output and input arguments.
Syntax:
There are two options to define an auto routine: either as a function or as a label.
If it’s defined as a function, then all syntax rules for function definition are relevant (see the
chapter Function definition
).
An auto routine may be defined as a label: its name follows the sequence of characters ## or
#@ in the definition line. The body of the auto routine is between the definition line and the
keyword ‘return’ unless this return is inside some flow control block.
Note:
The keyword ‘return’ instructs after execution of an auto routine to return to the next line in
the code, where execution was halted by interrupt event.
After call such routine and performing its body, the program will return to the next line in
the code, where execution was halted by interrupt event.
There are no default handlers for auto routines. If a user does not define automatic routine,
then any handling will not be activated when an automatic event is asserted.
Routine name Priority
Activated by Mask (MI)
AUTOEXEC
0
An autoexec code is executed automatically
upon power on. An autoexec function can be
called later any time.
1
AUTO_ER
1
A motor fault event, in which MO=0 is set
automatically.
2
AUTO_STOP
2
Called when a digital input configured to the
“Hard-Stop” function is activated. Refer the IL
command.
4
AUTO_BG
3
Called when a digital input configured to the
“Begin” function is activated. Refer the IL
command.
8
AUTO_RLS
4
Called when a digital input configured to the
“RLS” function is activated. Refer the IL
command.
16
AUTO_FLS
5
Called when a digital input configured to the
“FLS” function is activated. Refer the IL
command.
32
AUTO_ENA
6
Called when a digital input configured to the
“Enable” function is activated. Refer the IL
command.
64
AUTO_I1
7
Called when a digital input #1 configured to the
“GPI (General purpose Input)” function is
activated. Refer the IL command.
128
AUTO_I2 8
Called when a digital input #2 configured to the
“GPI (General purpose Input)” function is
activated. Refer the IL command.
256
AUTO_I3 9
Called when a digital input #3 configured to the
“GPI (General purpose Input)” function is
activated. Refer the IL command.
512
AUTO_I4
10
Called when a digital input #4 configured to the
“GPI (General purpose Input)” function is
activated. Refer the IL command.
1024
AUTO_ I5
11
Called when a digital input #5 configured to the
“GPI (General purpose Input)” function is
activated. Refer the IL command.
2048