OnInitSwitchUut Event (ASystem, ADriver, AProgram) |
Version 8 |
Occurs when the application switches a UUT.
Object.OnInitSwitchUut ( )
The OnInitSwitchUut event syntax has the following parts:
Name |
Type |
Description |
Object |
ASystem, ADriver, AProgram |
Module object |
The OnInitSwitchUut event occurs when ATEasy switches a program from one UUT to another. The event is called after the actual switch is done and the new UUT index is set to App.UutNextIndex in as a parameter. For sequential (see App.UutRunMode) UUTs ATEasy will switch UUT according to the value set to the App.UutSwitchLevel property. For parallel UUTs the event is only called once at the beginning of the program execution. After ATEasy switches a UUT the Program, Task, Test, Log and other internal variables are set to the new program instance that corresponds to the UUT.
Use this event to implement special switching, setting up of variables or user interface to prepare to the new UUT.
The OnInitSwitchUut events apply to the Program, System and Driver modules, ATEasy will call first the System and then the System Drivers (in reverse order), and the Program as shown here (output from ATEasy ModuleEvents example):
* System.OnInit
* Driver1.OnInit
* Driver2.OnInit
* System.OnInitSystem
ATEasy Test Log.
----------------
Company... :
User name. : RonY
Project... : ModuleEvents
Version... : 1 (Wed Oct 26 05 18:43:29)
* System.OnInitSwitchUut
* Driver1.OnInitSwitchUut
* Driver2.OnInitSwitchUut
* Program.OnInitSwitchUut
* System.OnInitProgram
The following statement set the status bar with the new UUT switched to Serial Number:
Program.OnInitSwitchUut()
{
! ... UUT initialization code ...
sbr.Panes("Serial Number").Text=Program.SerialNumber
! ... set switching accordingly
RELAY Close(App.UutIndex*10)
}
OnEndSwitchUut, App.UutCount, App.UutIndex, App.UutRunMode, App.UutSwitchLevel, App.UutLog, App.UutNextIndex, App.UutProgram, App.UutSwitchLevel, Initialization Events, About Module Events