Occurs when the system is initialize and after drivers are initialized.
Object.OnInitSystem()
The OnInitSystem event syntax has the following parts:
Name |
Type |
Description |
Object |
ASystem |
ASystem object |
The OnInitSystem event apply to the System module. If the event procedure does not contain code then ATEasy will not call the event.
The following list shows the order of OnInitSystem events combined with default output (see ModuleEvents.prj example for more information). After the Program OnInitSystem is called, ATEasy will output the application header to the log as shown below. The log output can be override to create custom output using SetLogString function:
* System.OnInit
* Driver1.OnInit
* Driver2.OnInit
* System.OnInitSystem
ATEasy Test Log.
----------------
Company... :
User name. : ron
Project... : ModuleEvents
Version... : 1 (Wed Oct 26 05 18:43:29)
* System.OnInitProgram
* Driver1.OnInitProgram
.\ModuleEvents.prg
* Driver2.OnInitProgram
.\ModuleEvents.prg
* Program.OnInit
================================================================================
Program... : Example
UUT....... :
Version... : 1 (Fri Mar 07 08 16:20:17)
Serial #.. :
Start time : 1/26/2010 4:18:09 PM
* System.OnInitTask
Use the OnInitSystem event to initialize the system to a know state. The event is called after all the drivers are initialized, so instruments are ready to be setup. If the event returned normally (not ignored) ATEasy will continue to run the App.StartupProgram or a program as set by the Run statement.
The following is an example of one way to use the OnInitSystem event:
System.OnInitSystem()
{
! ... system initialization code ...
print "System and all drivers has been initialized."
}
OnEnd, OnInit, OnInitProgram, Initialization Events, About Module Events, StartProgram, Run Statement,