OnInit / OnInitSystem / OnInitProgram
Brian B.
Loveland, CO

May 16, 2013
13 Posts

OnInit / OnInitSystem / OnInitProgram

Is there any settings within ATEasy 148b that would prevent OnInit from working?
The system's OnInit does not run at all. The system's OnInitProgram seems to be the first event to run.
The individual drivers' OnInits do not run either unless explicitly called.
According to the help file, the order is
system OnInit
driver OnInit
system OnInitSystem
...
system OnInitProgram
...

The system does not exit or abort.
TestExec seems to be working, but even there the OnInitProgram fires before OnInit.

So what am I doing wrong?

DrATEasy (Ron Y.)
Mission Viejo,

May 16, 2013
235 Posts

Re: OnInit / OnInitSystem / OnInitProgram

1. Order of events is correct however, events are called only if they have code in them.
2. Are you running using DoIt!? Or you just use the Start button? There is a setting to force calling events, however it applies to DoIt! (See Options dialog, Other page).
3. Try to run the ModuleEvents.prj example, It print the events that get called.
4. If you are using the TestExec, it will call all the drivers that are inserted after it (under System drivers) explicitly, See TestExec.InitializeDriversAndSystem() called from TestExec.OnInit(). You can place a break point there and see what happens.

Regards,
Ronnie

Brian B.
Loveland, CO

May 16, 2013
13 Posts

Re: OnInit / OnInitSystem / OnInitProgram

Many of the drivers that I am dealing with have code in the OnInit. I placed print statements in to trace through the program. This is how I verified the event was not being called. I also found that the .syt file OnInit event does not fire, but its OnInitProgram does.

I run the program executable directly as the program reads the commandline for parameters.

Brian B.
Loveland, CO

May 16, 2013
13 Posts

Re: OnInit / OnInitSystem / OnInitProgram

What about the drivers that need to be initialized before the TestExec?

Solution Available
DrATEasy (Ron Y.)
Mission Viejo,

May 16, 2013
235 Posts

Re: OnInit / OnInitSystem / OnInitProgram

1. Print statement will not work since the log is created only after the test TestExec.OnInit s called. Change to MsgBox.
2. The drivers that are inserted before the TestExec are called automatically by the run-time before the test executive get's called.

Brian B.
Loveland, CO

May 16, 2013
13 Posts

Re: OnInit / OnInitSystem / OnInitProgram

Thanks, that clears up a lot of confusion.



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]