:html
:Revision=1
<<
128.139
AutoRun-Object|AutoRun
$NoSort
--
The IP object <!RW>AutoRun allows access to the autorun system of the system.

The Autorun sequence may be started resp. stopped.

The parameter for the Autorun have to be set in the basic setup.
>>

<<
128.139.1
Functions of the AutoRun-Object|Functions
--
>>
<<
128.139.1.1
AutoRun.Mode|Mode
!128.139.2.1
--
<!DEF>
function <!TW>AutoRun.Mode : real;
<!TXT>
Returns the current mode of the Autorun system.

<!STBL>
<!+>Value<!+>Mode<!>
<!c>0<!>Autorun inactive<!>
<!c>1<!>Autorun active<!>
<!c>2<!>Autorun paused<!>
<!ETBL>

Example
<!CODE>
var
  vrLoopMode       : real;
step

  vrLoopMode   := AutoRun.Mode;
  Debug.SHOW(1,'Current mode of Autorun system: ', vrLoopMode);

end.
<!TXT>

<!RW>Autorun.Mode may be called as a procedure to change the mode.
>>
<<
128.139.1.2
AutoRun.Loops|Loops
--
<!DEF>
function <!TW>AutoRun.Loops (rWhich : real) : real;
<!TXT>
Returns (dependent on <!PW>rWhich) the remaining or total number of starts to do.

<!STBL>
<!+>rWhich<!+>Result<!>
<!c>0<!>Number of starts remaining<!>
<!c>1<!>Total number of starts as defined in the basic setup<!>
<!ETBL>

<!DEF>
function <!TW>AutoRun.Loops : real;
<!TXT>
has the same functionality as:
<!CODE>
AutoRun.Loops (0);
<!TXT>
So, returns the number of starts remaining.

Example
<!CODE>
var
  vrCountOfLoops : real;
step

  vrCountOfLoops := AutoRun.Loops(0);
  Debug.SHOW(1,'Number of starts remaining: ', vrCountOfLoops );

  vrCountOfLoops := AutoRun.Loops;
  Debug.SHOW(1,'Number of starts remaining: ', vrCountOfLoops );

  vrCountOfLoops := AutoRun.Loops(1);
  Debug.SHOW(1,'Total number of starts as defined in the basic setup: ', vrCountOfLoops );

end.
<!TXT>
>>

<<
128.139.2
Procedures of the AutoRun-Object|Procedures
--
>>
<<
128.139.2.1
AutoRun.Mode|Mode
!128.139.1.1
--
<!DEF>
procedure <!TW>AutoRun.Mode (rMode : real);
<!TXT>
Changes the mode of the Autorun system.

<!STBL>
<!+>Value<!+>Mode<!>
<!c>0<!>Autorun inactive<!>
<!c>1<!>Autorun active<!>
<!c>2<!>Autorun paused<!>
<!ETBL>

<!RW>Autorun.Mode may be called as a function to check the mode.

Example
<!CODE>
step

  if AutoRun.Mode = 0 then		// if Autorun-System not activ
  begin
    AutoRun.Mode(1);			// Autorun-System switch on
  end else if AutoRun.Loops = 1 then	// if last autorun is reached
  begin
    AutoRun.Mode(0);			// Autorun-System switch off
  end;

end.
<!TXT>
>>
