HARSFEN0602ElmoHARmonicaSoftwareManual

PRELIMINARYDRAFT

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 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

 

An autoexec code is executed automatically

 

0

upon power on. An autoexec function can be

1

 

 

 

called later any time.

 

AUTO_ER

1

A motor fault event, in which MO=0 is set

2

 

automatically.

 

 

 

AUTO_STOP

 

Called when a digital input configured to the

 

 

2

“Hard-Stop” function is activated. Refer the IL

4

 

 

command.

 

AUTO_BG

 

Called when a digital input configured to the

 

 

3

“Begin” function is activated. Refer the IL

8

 

 

command.

 

AUTO_RLS

 

Called when a digital input configured to the

 

 

4

“RLS” function is activated. Refer the IL

16

 

 

command.

 

AUTO_FLS

 

Called when a digital input configured to the

 

 

5

“FLS” function is activated. Refer the IL

32

 

 

command.

 

AUTO_ENA

 

Called when a digital input configured to the

 

 

6

“Enable” function is activated. Refer the IL

64

 

 

command.

 

 

 

Called when a digital input #1 configured to the

 

AUTO_I1

7

“GPI (General purpose Input)” function is

128

 

activated. Refer the IL command.

 

 

 

 

 

 

Called when a digital input #2 configured to the

 

AUTO_I2

8

“GPI (General purpose Input)” function is

256

 

 

activated. Refer the IL command.

 

 

 

Called when a digital input #3 configured to the

 

AUTO_I3

9

“GPI (General purpose Input)” function is

512

 

 

activated. Refer the IL command.

 

AUTO_I4

 

Called when a digital input #4 configured to the

 

 

10

“GPI (General purpose Input)” function is

1024

 

 

activated. Refer the IL command.

 

AUTO_ I5

 

Called when a digital input #5 configured to the

 

11

“GPI (General purpose Input)” function is

2048

 

 

 

activated. Refer the IL command.

 

48

Page 50
Image 50
Elmo HARmonica, HARSFEN0602 Autoexec, Autoer, Autostop, Autobg, Autorls, Autofls, Autoena, AUTOI1, AUTOI2, AUTOI3, AUTOI4